From: Dave Chinner <david@fromorbit.com>
To: wangdi <di.wang@whamcloud.com>
Cc: Al Viro <viro@ZenIV.linux.org.uk>,
Boaz Harrosh <bharrosh@panasas.com>,
lsf-pc@lists.linux-foundation.org, linux-fsdevel@vger.kernel.org,
Jinshan Xiong <jinshan.xiong@whamcloud.com>
Subject: Re: [LSF/MM TOPIC] Parallelize file operation (like creation, unlink) under large shared directory
Date: Tue, 24 Jan 2012 19:53:11 +1100 [thread overview]
Message-ID: <20120124085311.GP15102@dastard> (raw)
In-Reply-To: <4F1C7CDE.4010000@whamcloud.com>
On Sun, Jan 22, 2012 at 01:17:18PM -0800, wangdi wrote:
> On 01/22/2012 12:39 PM, Al Viro wrote:
> >On Sun, Jan 22, 2012 at 12:31:31PM -0800, wangdi wrote:
> >
> >>We actually already implemented this for ext4, and we saw a lot performance improvement(at least 30% improvements for open/create in a single directory)for lustre stack,
> >>but we want to make this improvement accessible through the VFS. Probably XFS and Btrfs could also benefit from this.
> >You do realize that i_mutex locking is relied upon for protection of a lot
> >of stuff besides the obvious (i.e. on-disk directory contents)?
> >I'm not saying that it's hopeless, but it's highly non-trivial; the things
> >like rmdir/mount races, access to ->d_parent/->d_name in a lot of code,
> >etc. need to be taken care of and it is a _lot_ of code review to deal
> >with - just to verify the correctness of such changes.
>
> Yes, I agree it is non-trivial change here. What I want to say is
> that i_mutex lock might be too big in some cases, and it just
> serializes everything. So it might be useful if we could refine
> this lock a bit. For example we can define this lock with several
> modes, (read, write, current read, current write, exclusive etc),
> and different code can get the lock with different mode as required,
> which might bring us some concurrency.
Irix used a read/write lock for the VFS level locking. XFS still has
that same locking for it's directory operations. Lookup takes it in
read mode, and now XFS has lockless inode cache lookups, too. Hence
if we can etch the correct Cthulu Summoning Patterns^W^W^W locking
primitives in the VFS, XFS can definitely take advantage of it...
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
prev parent reply other threads:[~2012-01-24 8:53 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-21 20:54 [LSF/MM TOPIC] Parallelize file operation (like creation, unlink) under large shared directory wangdi
2012-01-22 13:55 ` Boaz Harrosh
2012-01-22 20:31 ` wangdi
2012-01-22 20:39 ` Al Viro
2012-01-22 21:17 ` wangdi
2012-01-24 8:53 ` Dave Chinner [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120124085311.GP15102@dastard \
--to=david@fromorbit.com \
--cc=bharrosh@panasas.com \
--cc=di.wang@whamcloud.com \
--cc=jinshan.xiong@whamcloud.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=lsf-pc@lists.linux-foundation.org \
--cc=viro@ZenIV.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox