From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dave Hansen Subject: Re: [PATCH 25/26] r/o bind mounts: scalable writer count Date: Mon, 25 Jun 2007 08:36:24 -0700 Message-ID: <1182785784.26162.90.camel@localhost> References: <20070622200303.82D9CC3A@kernel> <20070622200336.4C7DB006@kernel> Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit Cc: haveblue@us.ibm.com, akpm@osdl.org, linux-fsdevel@vger.kernel.org, hch@infradead.org, viro@ftp.linux.org.uk To: Miklos Szeredi Return-path: Received: from e1.ny.us.ibm.com ([32.97.182.141]:53871 "EHLO e1.ny.us.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751248AbXFYPg2 (ORCPT ); Mon, 25 Jun 2007 11:36:28 -0400 Received: from d01relay02.pok.ibm.com (d01relay02.pok.ibm.com [9.56.227.234]) by e1.ny.us.ibm.com (8.13.8/8.13.8) with ESMTP id l5PFaRKJ001893 for ; Mon, 25 Jun 2007 11:36:27 -0400 Received: from d01av02.pok.ibm.com (d01av02.pok.ibm.com [9.56.224.216]) by d01relay02.pok.ibm.com (8.13.8/8.13.8/NCO v8.3) with ESMTP id l5PFaRBF458098 for ; Mon, 25 Jun 2007 11:36:27 -0400 Received: from d01av02.pok.ibm.com (loopback [127.0.0.1]) by d01av02.pok.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id l5PFaQ1d012094 for ; Mon, 25 Jun 2007 11:36:27 -0400 In-Reply-To: Sender: linux-fsdevel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org On Sat, 2007-06-23 at 13:28 +0200, Miklos Szeredi wrote: > > I'd suggest something along these lines in final mntput: > > lock_and_coalesce_cpu_mnt_writer_counts(); > mnt_unlock_cpus(); > BUG_ON(atomic_read(&mnt->__mnt_writers)); > > since there's basically no other we'll notice if there _is_ an > imbalance. That's a very good idea. I've added that check, but a WARN_ON() instead of a BUG_ON(). Does __mntput() seem like the right place to you? -- Dave