From: Andi Kleen <andi@firstfloor.org>
To: Wu Fengguang <fengguang.wu@intel.com>
Cc: Andi Kleen <andi@firstfloor.org>,
Andrew Morton <akpm@linux-foundation.org>,
Vladislav Bolkhovitin <vst@vlnb.net>,
Jens Axboe <jens.axboe@oracle.com>,
Jeff Moyer <jmoyer@redhat.com>, Nick Piggin <npiggin@suse.de>,
Ingo Molnar <mingo@elte.hu>,
Linus Torvalds <torvalds@linux-foundation.org>,
Peter Zijlstra <a.p.zijlstra@chello.nl>,
linux-mm@kvack.org, Chenfeng Xu <xcf@ustc.edu.cn>
Subject: Re: [PATCH 3/3] readahead: introduce context readahead algorithm
Date: Tue, 14 Apr 2009 12:00:02 +0200 [thread overview]
Message-ID: <20090414100002.GW14687@one.firstfloor.org> (raw)
In-Reply-To: <20090414092704.GD7001@localhost>
> I'll list some possible situations. I guess you are referring to (2.3)?
Yep. Thanks for the detailed analysis.
> 2.3) readahead cache hits: rare case and the impact is temporary
>
> The page at @offset-1 does get referenced by this stream, but it's
> created by someone else at some distant time ago. The page at
> @offset-1 may be lifted to active lru by this second reference, or too
> late and get reclaimed - by the time we reference page @offset.
>
> Normally its a range of cached pages. We are a) either walking inside the
> range and enjoying the cache hits, b) or we walk out of it and restart
> readahead by ourself, c) or the range of cached pages get reclaimed
> while we are walking on them, and hence cannot find page @offset-1.
>
> Obviously (c) is rare and temporary and is the main cause of (2.3).
> As soon as we goto the next page at @offset+1, we'll its 'previous'
> page at @offset to be cached(it is created by us!). So the context
> readahead starts working again - it's merely delayed by one page :-)
Thanks. The question is how much performance impact this has on
the stream that is readaheaded. I guess it would be only a smaller
"hickup", with some luck hidden by the block level RA?
The other question would be if it could cause the readahead code
to do a lot of unnecessary work, but your answer seems to be "no". Fine.
I think the concept is sound.
-Andi
--
ak@linux.intel.com -- Speaking for myself only.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2009-04-14 9:56 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20090412071950.166891982@intel.com>
[not found] ` <20090412072052.686760755@intel.com>
[not found] ` <20090412084819.GA25314@elte.hu>
2009-04-12 12:35 ` [PATCH 3/3] readahead: introduce context readahead algorithm Wu Fengguang
2009-04-16 17:12 ` Vladislav Bolkhovitin
[not found] ` <87zlej7kwf.fsf@basil.nowhere.org>
2009-04-14 9:27 ` Wu Fengguang
2009-04-14 10:00 ` Andi Kleen [this message]
2009-04-14 10:58 ` Wu Fengguang
2009-04-14 11:11 ` Wu Fengguang
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=20090414100002.GW14687@one.firstfloor.org \
--to=andi@firstfloor.org \
--cc=a.p.zijlstra@chello.nl \
--cc=akpm@linux-foundation.org \
--cc=fengguang.wu@intel.com \
--cc=jens.axboe@oracle.com \
--cc=jmoyer@redhat.com \
--cc=linux-mm@kvack.org \
--cc=mingo@elte.hu \
--cc=npiggin@suse.de \
--cc=torvalds@linux-foundation.org \
--cc=vst@vlnb.net \
--cc=xcf@ustc.edu.cn \
/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).