From: Chris Mason <chris.mason@oracle.com>
To: Suparna Bhattacharya <suparna@in.ibm.com>
Cc: linux-fsdevel@vger.kernel.org, akpm@osdl.org, zach.brown@oracle.com
Subject: Re: [RFC PATCH 1/3] Introduce a place holder page for the pagecache.
Date: Fri, 3 Nov 2006 09:10:21 -0500 [thread overview]
Message-ID: <20061103141021.GP31240@think.oraclecorp.com> (raw)
In-Reply-To: <20061103071257.GA13999@in.ibm.com>
On Fri, Nov 03, 2006 at 12:42:57PM +0530, Suparna Bhattacharya wrote:
> >
> > My original code was fairly dumb and didn't use gang lookups. It also
> > dropped the radix tree lock after every insert/delete. The code posted
> > here is about 2x as fast (or 1/2 the regression, depending on how you
> > look at it). For smaller read ios, the performance hit is about zero.
> > The cost of radix tree insertion is offset by less mutex and semaphore
> > locking.
>
> OK, so you think the main overheads had to do with radix-tree locking,
> rather than with the additional node insertions ?
It depends on the machine I suppose. If you have a lot of cpus trying
to work concurrently on the same file, bouncing the lock between them
(especially on numa) may be the most expensive part. Hopefully we can
talk the XFS guys into some benchmarking, since they have a bunch of
numbers for comparison already.
But there are other costs, including slab churn as we allocate/free
radix nodes etc etc. I think (well, hope) that on most hardware this is
a very small cost in comparison with the actual IO.
[ ... ]
> > Yes, my goal was to get the code fast enough for most machines, so that
> > we could test the result and see what impact it would have on the rest
> > of the page cache. From here we can decide if additional radix tuning
> > is a good idea, or if we just want to stick with the mutex/semaphore
> > combo in use now.
>
> Yup, that makes sense.
>
> The complexity in find_and_insert_placeholder_pages does worry me though,
> wouldn't want to end up debugging tricky problems in that code after all
> this. Do you have any ideas on that ?
If we push bulk insertion down into the radix code,
find_and_insert_placeholders will become less complex. We could even
preallocate a node that is already filled with place holders and pop
that into multiple spots in the radix tree.
-chris
next prev parent reply other threads:[~2006-11-03 14:11 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-27 18:22 [RFC PATCH 0/3] O_DIRECT locking rework Chris Mason
2006-10-27 18:23 ` [RFC PATCH 1/3] Introduce a place holder page for the pagecache Chris Mason
2006-11-01 10:23 ` Suparna Bhattacharya
2006-11-01 12:41 ` Chris Mason
2006-11-03 7:12 ` Suparna Bhattacharya
2006-11-03 14:10 ` Chris Mason [this message]
2006-10-27 18:25 ` [RFC PATCH 2/3] Change O_DIRECT to use placeholders Chris Mason
2006-10-27 18:26 ` [RFC PATCH 3/3] DIO: don't fall back to buffered writes Chris Mason
2006-11-01 10:51 ` Suparna Bhattacharya
2006-11-01 12:47 ` Chris Mason
2006-11-03 7:25 ` Suparna Bhattacharya
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=20061103141021.GP31240@think.oraclecorp.com \
--to=chris.mason@oracle.com \
--cc=akpm@osdl.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=suparna@in.ibm.com \
--cc=zach.brown@oracle.com \
/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;
as well as URLs for NNTP newsgroup(s).