From: Wu Fengguang <wfg@mail.ustc.edu.cn>
To: Linus Torvalds <torvalds@osdl.org>
Cc: Badari Pulavarty <pbadari@us.ibm.com>,
lkml <linux-kernel@vger.kernel.org>,
Andrew Morton <akpm@osdl.org>, Jens Axboe <axboe@suse.de>,
Nick Piggin <nickpiggin@yahoo.com.au>
Subject: Re: [RFC] kernel facilities for cache prefetching
Date: Fri, 5 May 2006 22:44:51 +0800 [thread overview]
Message-ID: <346840286.22726@ustc.edu.cn> (raw)
Message-ID: <20060505144451.GA6134@mail.ustc.edu.cn> (raw)
In-Reply-To: <Pine.LNX.4.64.0605040800080.3908@g5.osdl.org>
On Thu, May 04, 2006 at 08:03:50AM -0700, Linus Torvalds wrote:
> Actually, I did something even simpler for a totally one-off thing: you
> don't actually even need to drop caches or track pretty much anything,
> it's sufficient for most analysis to just have a timestamp on each page
> cache, and then have some way to read out the current cached contents.
>
> You can then use the timestamps to get a pretty good idea of what order
> things happened in.
> The really nice thing was that you don't even have to set the timestamp in
> any complex place: you do it at page _allocation_ time. That automatically
> gets the right answer for any page cache page, and you can do it in a
> single place.
Looks nice. A detailed scheme might be:
1) ctime/atime for each radixtree node(or, cluser of pages)
It seems to be a good accuracy/overhead compromise.
And is perfect for the most common case of sequential accesses.
struct radix_tree_node {
+ unsigned long ctime, atime;
}
radix_tree_node_alloc()
{
+ node->ctime = some_virtual_time();
}
radix_tree_lookup_slot()
{
+ node->atime = some_virtual_time();
}
2) eviction-time for each recently evicted page
Store eviction-time _in place_ in the slot that used to store the
page's address, with minimal space/time impact.
+#define SLOT_IS_EVICTION_TIME 1
radix_tree_delete()
{
- pathp->node->slots[pathp->offset] = NULL;
+ pathp->node->slots[pathp->offset] =
+ some_virtual_time() | SLOT_IS_EVICTION_TIME;
}
Regards,
Wu
next prev parent reply other threads:[~2006-05-05 14:44 UTC|newest]
Thread overview: 48+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-05-02 7:50 [RFC] kernel facilities for cache prefetching Wu Fengguang
2006-05-02 7:50 ` Wu Fengguang
2006-05-02 12:46 ` Diego Calleja
2006-05-02 14:42 ` Wu Fengguang
2006-05-02 14:42 ` Wu Fengguang
2006-05-02 16:07 ` Diego Calleja
2006-05-03 6:45 ` Wu Fengguang
2006-05-03 6:45 ` Wu Fengguang
2006-05-03 18:14 ` Diego Calleja
2006-05-03 23:39 ` Zan Lynx
2006-05-04 1:37 ` Diego Calleja
2006-05-02 15:55 ` Linus Torvalds
2006-05-02 16:35 ` Andi Kleen
2006-05-03 4:11 ` Wu Fengguang
2006-05-03 4:11 ` Wu Fengguang
2006-05-03 17:28 ` Badari Pulavarty
[not found] ` <346733486.30800@ustc.edu.cn>
2006-05-04 15:03 ` Linus Torvalds
2006-05-04 16:57 ` Badari Pulavarty
2006-05-05 14:44 ` Wu Fengguang [this message]
2006-05-05 14:44 ` Wu Fengguang
2006-05-03 7:13 ` Wu Fengguang
2006-05-03 7:13 ` Wu Fengguang
2006-05-03 12:59 ` Nikita Danilov
2006-05-03 22:20 ` Rik van Riel
2006-05-06 1:11 ` Wu Fengguang
2006-05-06 1:11 ` Wu Fengguang
2006-05-04 0:28 ` Linda Walsh
2006-05-04 1:31 ` Linus Torvalds
2006-05-04 7:08 ` Ph. Marek
2006-05-04 7:33 ` Arjan van de Ven
2006-05-04 12:14 ` Wu Fengguang
2006-05-04 12:14 ` Wu Fengguang
2006-05-04 12:34 ` Arjan van de Ven
2006-05-03 21:45 ` Linda Walsh
2006-05-04 12:12 ` Wu Fengguang
2006-05-04 12:12 ` Wu Fengguang
2006-05-04 18:57 ` Linda Walsh
2006-05-05 15:20 ` Wu Fengguang
2006-05-05 15:20 ` Wu Fengguang
2006-05-04 9:02 ` Helge Hafting
2006-05-02 7:58 ` Arjan van de Ven
2006-05-02 8:06 ` Wu Fengguang
2006-05-02 8:06 ` Wu Fengguang
2006-05-02 8:30 ` Arjan van de Ven
2006-05-02 8:53 ` Wu Fengguang
2006-05-02 8:53 ` Wu Fengguang
2006-05-06 6:49 ` Denis Vlasenko
2006-05-02 8:55 ` Arjan van de Ven
2006-05-02 11:39 ` Jan Engelhardt
2006-05-02 11:48 ` Wu Fengguang
2006-05-02 11:48 ` Wu Fengguang
2006-05-02 22:03 ` Dave Jones
2006-05-02 8:09 ` Jens Axboe
2006-05-02 8:20 ` Wu Fengguang
2006-05-02 8:20 ` Wu Fengguang
2006-05-03 22:05 ` Benjamin LaHaise
2006-05-02 19:10 ` Pavel Machek
2006-05-02 23:36 ` Nigel Cunningham
2006-05-03 2:35 ` Wu Fengguang
2006-05-03 2:35 ` Wu Fengguang
2006-05-03 2:32 ` Wu Fengguang
2006-05-03 2:32 ` Wu Fengguang
2006-05-03 7:19 ` Wu Fengguang
2006-05-03 7:19 ` Wu Fengguang
2006-05-04 12:28 ` Wu Fengguang
2006-05-04 12:28 ` 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=346840286.22726@ustc.edu.cn \
--to=wfg@mail.ustc.edu.cn \
--cc=akpm@osdl.org \
--cc=axboe@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=nickpiggin@yahoo.com.au \
--cc=pbadari@us.ibm.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.