[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20120609002557.b8aba759.akpm@linux-foundation.org>
Date: Sat, 9 Jun 2012 00:25:57 -0700
From: Andrew Morton <akpm@...ux-foundation.org>
To: Marco Stornelli <marco.stornelli@...il.com>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>,
"Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>,
Al Viro <viro@...iv.linux.org.uk>,
Boaz Harrosh <bharrosh@...asas.com>,
Tao Ma <boyu.mt@...bao.com>, Nick Piggin <npiggin@...nel.dk>,
"Dmitry V. Levin" <ldv@...linux.org>,
v9fs-developer@...ts.sourceforge.net, linux-kernel@...r.kernel.org,
linux-fsdevel@...r.kernel.org, linux-afs@...ts.infradead.org,
linux-btrfs@...r.kernel.org, ceph-devel@...r.kernel.org,
linux-cifs@...r.kernel.org, samba-technical@...ts.samba.org,
codalist@...emann.coda.cs.cmu.edu, ecryptfs@...r.kernel.org,
osd-dev@...n-osd.org, linux-ext4@...r.kernel.org,
fuse-devel@...ts.sourceforge.net, linux-mtd@...ts.infradead.org,
jfs-discussion@...ts.sourceforge.net, logfs@...fs.org,
linux-nfs@...r.kernel.org, linux-nilfs@...r.kernel.org,
linux-ntfs-dev@...ts.sourceforge.net, ocfs2-devel@....oracle.com,
reiserfs-devel@...r.kernel.org
Subject: Re: [RFC, PATCH, RESEND] fs: push rcu_barrier() from
deactivate_locked_super() to filesystems
On Sat, 09 Jun 2012 09:06:28 +0200 Marco Stornelli <marco.stornelli@...il.com> wrote:
> Il 09/06/2012 02:28, Andrew Morton ha scritto:
> > On Fri, 8 Jun 2012 16:46:47 -0700 Linus Torvalds<torvalds@...ux-foundation.org> wrote:
> >
> >> 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.
> >
> > That's conceptually what I meant. But it has the problem that new and
> > out-of-tree filesystems might forget to do it. Which is why I suggest
> > adding a kmem_cache* argument to unregister_filesystem() for this.
> >
> > It's a bit awkward, and the fs can pass in NULL if it knows what it's
> > doing. But it's reliable.
> > --
>
> The call of rcu_barrier should be mandatory for the "unload fs module"
> problem, right? If the fs is compiled statically maybe we could avoid
> it, but (eventually) this kind of decision is per-fs, so this could be a
> clue that the call of rcu_barrier maybe is inside each fs not in VFS.
>
No, this is unrelated to module unloading and the problem affects
statically linked filesystems also. The requirement is that all inodes
which are pending rcu freeing be flushed (and freed) before their cache
is destroyed in kmem_cache_destroy().
And... it seems that I misread what's going on. The individual
filesystems are doing the rcu freeing of their inodes, so it is
appropriate that they also call rcu_barrier() prior to running
kmem_cache_free(). Which is what Kirill's patch does. oops.
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists