From mboxrd@z Thu Jan 1 00:00:00 1970 From: Linus Torvalds Subject: Re: [RFC, PATCH, RESEND] fs: push rcu_barrier() from deactivate_locked_super() to filesystems Date: Fri, 8 Jun 2012 16:46:47 -0700 Message-ID: References: <1339191663-17693-1-git-send-email-kirill.shutemov@linux.intel.com> <20120608150253.e42464a6.akpm@linux-foundation.org> <20120608221446.GA18250@otc-wbsnb-06> <20120608152550.258d6a30.akpm@linux-foundation.org> <20120608222734.GT30000@ZenIV.linux.org.uk> <20120608153120.b722d7c3.akpm@linux-foundation.org> <20120608233127.GB18981@otc-wbsnb-06> <20120608163751.7a8ec2bc.akpm@linux-foundation.org> Mime-Version: 1.0 Return-path: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type; bh=MwO50W5j53rqC7VCEFFZm0IltU59I0OODmZaWYnxf/k=; b=iT8ddMIM2YQB5Z08r4+D4miG18x0uCwMtgIFaALPUq8MWCKYWAbmbj4X1xZ3uvbeel 6/kfSL5qnYzhHbK9XbuDb/Kdl0VowcTHId31UqneLmU3HvOXpp3jx67Wmdd6Q+S/BHn/ X1Lk4mvVJgAWGx18adV1HO7lz5MlVzryEOHlaZZoPjtm2aUNMH8V1P3vnATIlV1T/Ctq ZnC8x9om6emE2Ht1pIqvuwBaIh17NC2MsvgKuCY64M/EIBHWsMmdlXVcmWdZQDTXLUjf OxV8sy4yyik3Yst4xT0cjgkNtN0qNC9oZo5woiC3XkldE/Jf2BcsH0YQTIVLBnewRd/A ldLQ== In-Reply-To: <20120608163751.7a8ec2bc.akpm@linux-foundation.org> Sender: ecryptfs-owner@vger.kernel.org List-ID: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Andrew Morton Cc: "Kirill A. Shutemov" , Al Viro , Boaz Harrosh , Tao Ma , Nick Piggin , "Dmitry V. Levin" , v9fs-developer@lists.sourceforge.net, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-afs@lists.infradead.org, linux-btrfs@vger.kernel.org, ceph-devel@vger.kernel.org, linux-cifs@vger.kernel.org, samba-technical@lists.samba.org, codalist@telemann.coda.cs.cmu.edu, ecryptfs@vger.kernel.org, osd-dev@open-osd.org, linux-ext4@vger.kernel.org, fuse-devel@lists.sourceforge.net, linux-mtd@lists.infradead.org, jfs-discussion@lists.sourceforge.net, logfs@logfs.org, linux-nfs@vger.kernel.org, linux-nilfs@vger.kernel.org, linux-ntfs-dev@lists.sourceforge.net, ocfs2-devel@oss.oracle.com, reiserfs-devel@vger.kernel.org On Fri, Jun 8, 2012 at 4:37 PM, Andrew Morton wrote: > > So how about open-coding the rcu_barrier() in btrfs and gfs2 for the > non-inode caches (which is the appropriate place), and hand the inode > cache over to the vfs for treatment (which is the appropriate place). The thing is, none of the inode caches are really up to the VFS. They are per-filesystem caches, that just *embed* an inode as part of the bigger ext4_inode or whatever. But apart from the fact that the embedded inode requires them to then use the proper "call_rcu()" stuff to do the delayed free, they really are pretty much filesystem data structures. The VFS layer can neither free them or allocate them, since the VFS layer doesn't even know how big the structures are, or where the inodes are embedded, or how to initialize them (or even when to allocate them). Of course, if you just mean having a VFS wrapper that does static void vfs_inode_kmem_cache_destroy(struct kmem_cache *cachep) { rcu_barrier(); kmem_cache_destroy(cachep); } then we could do that. Not much better than what Kirill's patch did, but at least we could have that comment in just one single place. Linus