From owner-freebsd-arch@freebsd.org Tue Nov 26 18:21:39 2019 Return-Path: Delivered-To: freebsd-arch@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9B6981BE071 for ; Tue, 26 Nov 2019 18:21:39 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qv1-xf2a.google.com (mail-qv1-xf2a.google.com [IPv6:2607:f8b0:4864:20::f2a]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 47Msg65N6Tz4742 for ; Tue, 26 Nov 2019 18:21:38 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qv1-xf2a.google.com with SMTP id i3so7693241qvv.7 for ; Tue, 26 Nov 2019 10:21:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=XL3xOCiqfmZLu0LAv5g5Yl3KYy/Uw88e0I+rIN2rBNE=; b=DeBJQl3rfjKIqul9BLGNpvzHDSy0yRuFQuI59UgvqGrl4KLHC8dUYQs6HoA/ncZymv kWktEONnPyfVUuaeGlxuP7VdAR1zJHklq2NI+5DmCgvCG1Su0fRHp216aK8J1k1lJUZq /KC2r+l8yCxa/MreggLCeQ2ERjvK36K12dZBe3ql2SG7hzIpnc3bjVOlsBcyT4kw5w9e Pjl0kHaMkw2ffGW15JTKI32kvdCyoUyt4i8WWE+kXIPVHwbbWFW5GZMkFFJsL+8NZoLd z0kvA/DmP269CwPmvH6gtHsBqxUNnxMD4mgL0m/SRQotSi7qeumd1uBEKCS2a7mhrEEU 4UJw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=XL3xOCiqfmZLu0LAv5g5Yl3KYy/Uw88e0I+rIN2rBNE=; b=XZJoHIpwffxJEX9vweIikGwODt+uU6ct1MM1+NiQ2rhyUo0j0bMYbaeHV++5O843RH kBwp23nJ+NWNGSU8TjcxaRwTXHwTeRf+Iuzpkg1ccCuQkqBbEVx5ZfHuYoc771A9wHRq VhI7El1SXbTiUO64DhPEP+NZdRzU5Ufa6eJrZBE2lNVTgR4HJI1B3ruZMx4NpVbsUa55 lnMhFjWiOSUsjjq96vl+DfCp5hKmYgSJLHPzszeaOXDzxZ/OcABkGDFQpK1I3seYCg7j asfodd9mNfzMIA5aomJF3ztEtCcAzvbG2Dlp2kCLpQ1wIu2xkOGpfrWkYFt2j4OWPgCF x2KQ== X-Gm-Message-State: APjAAAWglgfVPoCSVVKR2qke/wucB9obC9KgIBbT/wRzKs65Ss6Pv/DT ugpoUwvQTtcRKTUvbvPZdXwH75LUbe7GMOptvBz1Vw== X-Google-Smtp-Source: APXvYqzI7AOucn/CUB5tMX9wHMXqCnWLLiuPY667+c4b76TEO7qKjC3gZM77YClYmgWc8yPv/C5EPqn2olCnUMwE7R8= X-Received: by 2002:a0c:c125:: with SMTP id f34mr22882732qvh.22.1574792491494; Tue, 26 Nov 2019 10:21:31 -0800 (PST) MIME-Version: 1.0 References: <201911260917.xAQ9Hcf1001914@gndrsh.dnsmgr.net> In-Reply-To: <201911260917.xAQ9Hcf1001914@gndrsh.dnsmgr.net> From: Warner Losh Date: Tue, 26 Nov 2019 11:21:20 -0700 Message-ID: Subject: Re: Killing Giant for 13 To: "Rodney W. Grimes" Cc: "freebsd-arch@freebsd.org" X-Rspamd-Queue-Id: 47Msg65N6Tz4742 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bsdimp-com.20150623.gappssmtp.com header.s=20150623 header.b=DeBJQl3r; dmarc=none; spf=none (mx1.freebsd.org: domain of wlosh@bsdimp.com has no SPF policy when checking 2607:f8b0:4864:20::f2a) smtp.mailfrom=wlosh@bsdimp.com X-Spamd-Result: default: False [-2.86 / 15.00]; ARC_NA(0.00)[]; TO_DN_EQ_ADDR_SOME(0.00)[]; R_DKIM_ALLOW(-0.20)[bsdimp-com.20150623.gappssmtp.com:s=20150623]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-arch@freebsd.org]; DMARC_NA(0.00)[bsdimp.com]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[bsdimp-com.20150623.gappssmtp.com:+]; RCPT_COUNT_TWO(0.00)[2]; R_SPF_NA(0.00)[]; FORGED_SENDER(0.30)[imp@bsdimp.com,wlosh@bsdimp.com]; MIME_TRACE(0.00)[0:+,1:+,2:~]; IP_SCORE(-0.86)[ipnet: 2607:f8b0::/32(-2.27), asn: 15169(-1.95), country: US(-0.05)]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; FROM_NEQ_ENVFROM(0.00)[imp@bsdimp.com,wlosh@bsdimp.com]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Nov 2019 18:21:39 -0000 On Tue, Nov 26, 2019 at 2:17 AM Rodney W. Grimes < freebsd-rwg@gndrsh.dnsmgr.net> wrote: > > I'd like to kill Giant in 13 and schedule a firm removal date. > > > > The issues are (a) old drivers that aren't MP safe (b) some console / > ATKBD > > interactions (c) newbus and (d) a few stays that haven't been > characterized. > > > > (a) should be deleted or updated before the deadline > > (b) should be fixed by $SOMEONE[tm] > > (c) there's some work underway to refine the locking protocols to allow > one > > to not have Giant held (there's real questions about how effective it is > > when things sleep or contend) > > (d) I'm researching. > > > > Would there be support for setting a firm deadline for Giant removal of > > around June 2020? This would be months ahead of a speculative 13.0 > timeline > > (Earliest would be December 2020, latest would be maybe October 2021, > the > > exact details aren't super relevant for a June target date). > > > > This is a preliminary inquiry to get a feel for support for this option > and > > to gather additional issues and requirements. Comments? > > I see one reply to this, yet am seeing commits killing drivers, that > at least on surface appear to be not so old, and possibly relevant. > > Though I have no objectionion to the removal of GIANT, I do have objection > to what appears to be execuction before research and discussion, especially > as I believe the item would of be under (d) above, as I do not consider > a driver that came into the tree at 10.0 "OLD". > If we drop Giant, we can't support Giant locked drivers. Giant is a funky lock designed to be a virtual splhigh for the driver while holding it (so only one thread can be executing with Giant, but if that thread sleeps, Giant is dropped unlike every other lock in the system). Sometimes converting code to a normal mutex just works, other times not. It's one reason all drivers haven't been converted. It's also a big wart on our system because it is so "special" that people looking at Giant locked code tend to think of it as a mutex rather than as a SPL and make mistakes. However, the hpt27xx driver turns out not to be Giant locked on versions of FreeBSD >= 10. So it's off the list. Scott has backed that out just now. Even so, there's little evidence of its use in the wild, so it's not a top-tier driver... But this is an iterative process, and sometimes mistakes are made. As an open source project, though, people can look at the code to double check the analysis if there's an interest in the driver. People can help by looking at things on the list to see what the efforts would be to convert the drivers. The more eyes we have the better. But if we can find no-one to test the fixed driver on actual hardware, it's been our tradition to commit the locked driver (which may be broken) and then remove the driver. The idea has been that if someone shows up with hardware and tests it, we can easily reinstate it to the tree. So far, though, none of the drivers John Baldwin locked checked in and then removed because nobody has time to test it had anybody showing up with test results after the fact... The bottom line remains, though, that no matter when a driver arrived in the tree, if it's Giant locked and we remove Giant, it's going to go. There's been a 20 year, almost, transition period allowed... We're well past the time to complete the plan... Warner