xfs
[Top] [All Lists]

Re: [RFC, PATCH] fs: push rcu_barrier() from deactivate_locked_super() t

To: "Kirill A. Shutemov" <kirill.shutemov@xxxxxxxxxxxxxxx>, Pekka Enberg <penberg@xxxxxxxxxx>
Subject: Re: [RFC, PATCH] fs: push rcu_barrier() from deactivate_locked_super() to filesystems
From: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>
Date: Fri, 8 Jun 2012 14:43:58 -0700
Cc: Alexander Viro <viro@xxxxxxxxxxxxxxxxxx>, Eric Van Hensbergen <ericvh@xxxxxxxxx>, Ron Minnich <rminnich@xxxxxxxxxx>, Latchesar Ionkov <lucho@xxxxxxxxxx>, David Howells <dhowells@xxxxxxxxxx>, "Tigran A. Aivazian" <tigran@xxxxxxxxxxxxxxxxxxxx>, Chris Mason <chris.mason@xxxxxxxxxx>, Sage Weil <sage@xxxxxxxxxxxx>, Steve French <sfrench@xxxxxxxxx>, Jan Harkes <jaharkes@xxxxxxxxxx>, coda@xxxxxxxxxx, Tyler Hicks <tyhicks@xxxxxxxxxxxxx>, Dustin Kirkland <dustin.kirkland@xxxxxxxxxxx>, Boaz Harrosh <bharrosh@xxxxxxxxxxx>, Tao Ma <boyu.mt@xxxxxxxxxx>, Benny Halevy <bhalevy@xxxxxxxxxx>, Jan Kara <jack@xxxxxxx>, Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>, Andreas Dilger <adilger.kernel@xxxxxxxxx>, "Theodore Ts'o" <tytso@xxxxxxx>, Nick Piggin <npiggin@xxxxxxxxx>, OGAWA Hirofumi <hirofumi@xxxxxxxxxxxxxxxxxx>, Christoph Hellwig <hch@xxxxxxxxxxxxx>, Miklos Szeredi <miklos@xxxxxxxxxx>, Mikulas Patocka <mikulas@xxxxxxxxxxxxxxxxxxxxxxxx>, William Irwin <wli@xxxxxxxxxxxxxx>, David Woodhouse <dwmw2@xxxxxxxxxxxxx>, Dave Kleikamp <shaggy@xxxxxxxxxx>, Joern Engel <joern@xxxxxxxxx>, Prasad Joshi <prasadjoshi.linux@xxxxxxxxx>, Petr Vandrovec <petr@xxxxxxxxxxxxxx>, Trond Myklebust <Trond.Myklebust@xxxxxxxxxx>, KONISHI Ryusuke <konishi.ryusuke@xxxxxxxxxxxxx>, Anton Altaparmakov <anton@xxxxxxxxxx>, Mark Fasheh <mfasheh@xxxxxxxx>, Joel Becker <jlbec@xxxxxxxxxxxx>, Anders Larsen <al@xxxxxxxxxxx>, Phillip Lougher <phillip@xxxxxxxxxxxxxxx>, Artem Bityutskiy <dedekind1@xxxxxxxxx>, Adrian Hunter <adrian.hunter@xxxxxxxxx>, Evgeniy Dushistov <dushistov@xxxxxxx>, Ben Myers <bpm@xxxxxxx>, Alex Elder <elder@xxxxxxxxxx>, xfs@xxxxxxxxxxx, Timo Warns <warns@xxxxxxxxxxxx>, Alexey Khoroshilov <khoroshilov@xxxxxxxxx>, Seth Forshee <seth.forshee@xxxxxxxxxxxxx>, Namjae Jeon <linkinjeon@xxxxxxxxx>, Josh Boyer <jwboyer@xxxxxxxxxx>, Fengguang Wu <fengguang.wu@xxxxxxxxx>, Kai Bankett <chaosman@xxxxxxxxxx>, Frederic Weisbecker <fweisbec@xxxxxxxxx>, "Dmitry V. Levin" <ldv@xxxxxxxxxxxx>, v9fs-developer@xxxxxxxxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, linux-fsdevel@xxxxxxxxxxxxxxx, linux-afs@xxxxxxxxxxxxxxxxxxx, linux-btrfs@xxxxxxxxxxxxxxx, ceph-devel@xxxxxxxxxxxxxxx, linux-cifs@xxxxxxxxxxxxxxx, samba-technical@xxxxxxxxxxxxxxx, codalist@xxxxxxxxxxxxxxxxxxxxxxxx, ecryptfs@xxxxxxxxxxxxxxx, osd-dev@xxxxxxxxxxxx, linux-ext4@xxxxxxxxxxxxxxx, fuse-devel@xxxxxxxxxxxxxxxxxxxxx, linux-mtd@xxxxxxxxxxxxxxxxxxx, jfs-discussion@xxxxxxxxxxxxxxxxxxxxx, logfs@xxxxxxxxx, linux-nfs@xxxxxxxxxxxxxxx, linux-nilfs@xxxxxxxxxxxxxxx, linux-ntfs-dev@xxxxxxxxxxxxxxxxxxxxx, ocfs2-devel@xxxxxxxxxxxxxx, reiserfs-devel@xxxxxxxxxxxxxxx
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=/eLnw8vQp4o0eJinXjEZbCDLMosAi0gt/nL4y64h78M=; b=qfZgVjf9zjLNnqs2VhCarG+vtahN2baUimlErRUT28hech7yyXInijyTfjYrw3XLX+ ouxdwOeD6E7Fjtc6IzqYTy98stMZ6tc+q8ymvXffLoe0u9cSqqgC26RjV9ATtUxRzjFZ 319x9R6jiXZGP56DSDKoxA9P9Cn4IbISeT6qXb0rm/zIoBQqZoEgxtENfOBSToBXd4cW i1pX54/U/9moW3Hc1jK3qdfVLDzKvRg8lKtcN2NET8E9PK2kKUkg7XDahcD3PYgCHQrD 4HknYNPt1N+DS07baIn/JffG3nWp++lhDmEnAmLTQ44we/C/aSRi8Avs27b1W9tGrXvu IUCw==
In-reply-to: <1339190930-17233-1-git-send-email-kirill.shutemov@xxxxxxxxxxxxxxx>
References: <1339190930-17233-1-git-send-email-kirill.shutemov@xxxxxxxxxxxxxxx>
Sender: linus971@xxxxxxxxx
On Fri, Jun 8, 2012 at 2:28 PM, Kirill A. Shutemov
<kirill.shutemov@xxxxxxxxxxxxxxx> wrote:
> From: "Kirill A. Shutemov" <kirill.shutemov@xxxxxxxxxxxxxxx>
>
> There's no reason to call rcu_barrier() on every deactivate_locked_super().
> We only need to make sure that all delayed rcu free inodes are flushed
> before we destroy related cache.
>
> Removing rcu_barrier() from deactivate_locked_super() affects some
> fas paths. E.g. on my machine exit_group() of a last process in IPC
> namespace takes 0.07538s. rcu_barrier() takes 0.05188s of that time.

I think we should just delete it.

kmem_cache_destroy() (at least for SLUB) already has:

                if (s->flags & SLAB_DESTROY_BY_RCU)
                        rcu_barrier();

in it. But I think it's too late - it gets called *after* we do
kmem_cache_close(), and I get the feeling that we should do it before.

Shouldn't that be sufficient? And if other slab allocators don't have
this, we should add it to them too.

Hmm?

              Linus

<Prev in Thread] Current Thread [Next in Thread>