From owner-freebsd-geom@freebsd.org Thu May 19 20:56:44 2016 Return-Path: Delivered-To: freebsd-geom@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B27FFB41182 for ; Thu, 19 May 2016 20:56:44 +0000 (UTC) (envelope-from bright@mu.org) Received: from mailman.ysv.freebsd.org (unknown [127.0.1.3]) by mx1.freebsd.org (Postfix) with ESMTP id A35511E8C for ; Thu, 19 May 2016 20:56:44 +0000 (UTC) (envelope-from bright@mu.org) Received: by mailman.ysv.freebsd.org (Postfix) id 9B4A6B4117B; Thu, 19 May 2016 20:56:44 +0000 (UTC) Delivered-To: geom@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9AAB6B41176; Thu, 19 May 2016 20:56:44 +0000 (UTC) (envelope-from bright@mu.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.freebsd.org (Postfix) with ESMTP id 8EEA91E8A; Thu, 19 May 2016 20:56:44 +0000 (UTC) (envelope-from bright@mu.org) Received: from Alfreds-MacBook-Pro-2.local (c-76-21-10-192.hsd1.ca.comcast.net [76.21.10.192]) by elvis.mu.org (Postfix) with ESMTPSA id B15C0346DDE2; Thu, 19 May 2016 13:56:43 -0700 (PDT) Subject: Re: Removing Giant asserts from geom To: Konstantin Belousov References: <20160519105634.GO89104@kib.kiev.ua> <573DEA73.4080408@mu.org> <20160519191247.GQ89104@kib.kiev.ua> Cc: geom@freebsd.org, arch@freebsd.org From: Alfred Perlstein Message-ID: <53397f3f-1056-ceb7-ce3a-5269ac1d29e2@mu.org> Date: Thu, 19 May 2016 13:57:53 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:45.0) Gecko/20100101 Thunderbird/45.1.0 MIME-Version: 1.0 In-Reply-To: <20160519191247.GQ89104@kib.kiev.ua> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 May 2016 20:56:44 -0000 On 5/19/16 12:12 PM, Konstantin Belousov wrote: > On Thu, May 19, 2016 at 09:31:47AM -0700, Alfred Perlstein wrote: >> It seems like it should be the opposite, the DROP_GIANTs should be >> turned into mtx_assert(&Giant, MA_NOTOWNED) as giant is removed from the >> tree. >> >> Meaning Giant should be pushed further back until it is eliminated. >> Doing as this patch proposes hides that we still have callers holding >> Giant which is not good. > Did you read the third paragraph of my email ? OK, and why is thread0 needing Giant for so long? > FWIW, the assumed model of the kernel locking which must be in somebody > mind when talking about 'pushing back Giant' is not true for last 5-6 > years for our kernel in general, and for the VFS in particular. OK, makes sense, still would prefer to have assertions that don't allow mistakes to creep in. FreeBSD's assertions on locking and VFS make it much easier to develop under. -Alfred