[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CA+55aFy8Nq7yf9CJwFuyfSmkUzFKRHHOE6O8=4HjmaWpku3fhw@mail.gmail.com>
Date: Thu, 12 Sep 2013 10:30:14 -0700
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: Waiman Long <Waiman.Long@...com>
Cc: Alexander Viro <viro@...iv.linux.org.uk>,
Thomas Gleixner <tglx@...utronix.de>,
linux-fsdevel <linux-fsdevel@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
"Chandramouleeswaran, Aswin" <aswin@...com>,
"Norton, Scott J" <scott.norton@...com>
Subject: Re: [PATCH 0/2 v2] dcache: get/release read lock in
read_seqbegin_or_lock() & friend
On Thu, Sep 12, 2013 at 9:38 AM, Linus Torvalds
<torvalds@...ux-foundation.org> wrote:
> On Thu, Sep 12, 2013 at 7:55 AM, Waiman Long <Waiman.Long@...com> wrote:
>> Change log
>> ----------
>> v1->v2:
>> - Rename the new seqlock primitives to read_seqexcl_lock* and
>> read_seqexcl_unlock*.
>
> Applied.
Btw, when I tried to benchmark this, I failed miserably.
Why?
If you do a threaded benchmark of "getcwd()", you end up spending all
your time in a spinlock anyway: get_fs_root_and_pwd() takes the
fs->lock to get the root/pwd.
Now, AIM7 probably uses processes, not threads, so you don't see this,
and maybe I shouldn't care. But looking at it, it annoys me
enormously, because the whole get_fs_root_and_pwd() is just stupid.
Putting it all under the RCU lock and then changing it to use
get_fs_root_and_pwd_rcu() that just uses the fs->seq sequence
read-lock looks absolutely trivial.
Linus
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists