linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@suse.de>
To: Andrew Morton <akpm@osdl.org>
Cc: torvalds@osdl.org, linux-kernel@vger.kernel.org, npiggin@suse.de,
	linux-mm@kvack.org
Subject: Re: Lockless page cache test results
Date: Thu, 27 Apr 2006 09:45:33 +0200	[thread overview]
Message-ID: <20060427074533.GJ9211@suse.de> (raw)
In-Reply-To: <20060426131200.516cbabc.akpm@osdl.org>

[-- Attachment #1: Type: text/plain, Size: 2311 bytes --]

On Wed, Apr 26 2006, Andrew Morton wrote:
> Jens Axboe <axboe@suse.de> wrote:
> >
> > With a 16-page gang lookup in splice, the top profile for the 4-client
> > case (which is now at 4GiB/sec instead of 3) are:
> > 
> > samples  %        symbol name
> > 30396    36.7217  __do_page_cache_readahead
> > 25843    31.2212  find_get_pages_contig
> > 9699     11.7174  default_idle
> 
> __do_page_cache_readahead() should use gang lookup.  We never got around to
> that, mainly because nothing really demonstrated a need.
> 
> It's a problem that __do_page_cache_readahead() is being called at all -
> with everything in pagecache we should be auto-turning-off readahead.  This
> happens because splice is calling the low-level do_pagecache_readahead(). 
> If you convert it to use page_cache_readahead(), that will all vanish if
> readahead is working right.

You are right, I modified it to use page_cache_readahead() and that
looks a lot better for the vanilla kernel. Here's a new graph of
2.6.17-rc3 and 2.6.17-rc3-lockless. Both base kernels are the splice
branch, so it contains the contig lookup change as well.

I'm still doing only up to nr_cpus clients, as numbers start to
fluctuate above that.

Things look pretty bad for the lockless kernel though, Nick any idea
what is going on there? The splice change is pretty simple, see the top
three patches here:

http://brick.kernel.dk/git/?p=linux-2.6-block.git;a=shortlog;h=splice

The top profile for the 4-client case looks like this:

samples  %        symbol name
77955    77.7141  find_get_pages_contig
8034      8.0092  splice_to_pipe
5092      5.0763  default_idle
4330      4.3166  do_splice_to
1323      1.3189  sys_splice

where vanilla is nowhere near that bad. I added a third graph, which is
lockless with the top patch backed out again so it's using
find_get_page() for each page. The top profile then looks like this for
the 4-client case:

samples  %        symbol name
10685    39.2730  default_idle
4120     15.1432  find_get_page
2608      9.5858  sys_splice
1729      6.3550  radix_tree_lookup_slot
1708      6.2778  splice_from_pipe
1071      3.9365  splice_to_pipe

Finally, I'll just note that the find_get_pages_contig() was modified
for the lockless kernel (read_lock -> spin_lock), so it isn't something
silly :-)

-- 
Jens Axboe


[-- Attachment #2: lockless-3.png --]
[-- Type: image/png, Size: 4089 bytes --]

  reply	other threads:[~2006-04-27  7:45 UTC|newest]

Thread overview: 52+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-04-26 13:53 Lockless page cache test results Jens Axboe
2006-04-26 14:43 ` Nick Piggin
2006-04-26 19:46   ` Jens Axboe
2006-04-27  5:39     ` Chen, Kenneth W
2006-04-27  6:07       ` Nick Piggin
2006-04-27  6:15       ` Andi Kleen
2006-04-27  7:51         ` Chen, Kenneth W
2006-04-26 16:55 ` Andrew Morton
2006-04-26 17:42   ` Jens Axboe
2006-04-26 18:10     ` Andrew Morton
2006-04-26 18:23       ` Jens Axboe
2006-04-26 18:46         ` Andrew Morton
2006-04-26 19:21           ` Jens Axboe
2006-04-27  5:58           ` Nick Piggin
2006-04-26 18:34       ` Christoph Lameter
2006-04-26 18:47         ` Andrew Morton
2006-04-26 18:48           ` Christoph Lameter
2006-04-26 18:49           ` Jens Axboe
2006-04-26 20:31             ` Christoph Lameter
2006-04-28 14:01               ` David Chinner
2006-04-28 14:10                 ` David Chinner
2006-04-30  9:49                 ` Nick Piggin
2006-04-30 11:20                   ` Nick Piggin
2006-04-30 11:39                   ` Jens Axboe
2006-04-30 11:44                     ` Nick Piggin
2006-04-26 18:58       ` Christoph Hellwig
2006-04-26 19:02         ` Jens Axboe
2006-04-26 19:00       ` Linus Torvalds
2006-04-26 19:15         ` Jens Axboe
2006-04-26 20:12           ` Andrew Morton
2006-04-27  7:45             ` Jens Axboe [this message]
2006-04-27  7:47               ` Jens Axboe
2006-04-27  7:57               ` Nick Piggin
2006-04-27  8:02                 ` Nick Piggin
2006-04-27  9:00                   ` Jens Axboe
2006-04-27 13:36                     ` Nick Piggin
2006-04-27  8:36                 ` Jens Axboe
     [not found]             ` <20060428112835.GA8072@mail.ustc.edu.cn>
2006-04-28 11:28               ` Wu Fengguang
2006-04-27  5:49         ` Nick Piggin
2006-04-27 15:12           ` Linus Torvalds
2006-04-28  4:54             ` Nick Piggin
2006-04-28  5:34               ` Linus Torvalds
2006-04-27  9:35         ` Jens Axboe
2006-04-27  5:22       ` Nick Piggin
2006-04-26 18:57     ` Jens Axboe
2006-04-27  2:19       ` KAMEZAWA Hiroyuki
2006-04-27  8:03         ` Jens Axboe
2006-04-27 11:16           ` Jens Axboe
2006-04-27 11:41             ` KAMEZAWA Hiroyuki
2006-04-27 11:45               ` Jens Axboe
2006-04-28  9:10 ` Pavel Machek
2006-04-28  9:21   ` Jens Axboe

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=20060427074533.GJ9211@suse.de \
    --to=axboe@suse.de \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=npiggin@suse.de \
    --cc=torvalds@osdl.org \
    /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).