[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <45FA1864.9010909@redhat.com>
Date: Fri, 16 Mar 2007 00:09:08 -0400
From: Rik van Riel <riel@...hat.com>
To: Valdis.Kletnieks@...edu
CC: Andreas Mohr <andi@...x01.fht-esslingen.de>,
Dave Kleikamp <shaggy@...ux.vnet.ibm.com>,
Ashif Harji <asharji@...uwaterloo.ca>, linux-mm@...ck.org,
Nick Piggin <npiggin@...e.de>, Jan Kara <jack@...e.cz>,
linux-kernel@...r.kernel.org, akpm@...ux-foundation.org
Subject: Re: [PATCH] mm/filemap.c: unconditionally call mark_page_accessed
Valdis.Kletnieks@...edu wrote:
> On the other hand, Andreas suggested only marking it once every 32 calls,
> but that required a helper variable. Statistically, jiffies%32 should
> end up about the same as a helper variable %32.
>
> This of course, if just calling mark_page_accessed() is actually expensive
> enough that we don't want to do it unconditionally.
Not caching a needed page and having to wait for a disk seek
to complete will be *way* more expensive than any call to
mark_page_accessed().
A modern CPU can do somewhere on the order of 50 million
instructions in the time it takes to bring one page in from
disk.
However, this does not mean we should unconditionally call
mark_page_accessed(), since that could cause use to push
wanted data out of the cache because of one program that
does its streaming accesses in a strange way...
This is a situation where getting it right almost certainly
matters.
--
Politics is the struggle between those who want to make their country
the best in the world, and those who believe it already is. Each group
calls the other unpatriotic.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists