linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Rik van Riel <riel@redhat.com>
To: Valdis.Kletnieks@vt.edu
Cc: Andreas Mohr <andi@rhlx01.fht-esslingen.de>,
	Dave Kleikamp <shaggy@linux.vnet.ibm.com>,
	Ashif Harji <asharji@cs.uwaterloo.ca>,
	linux-mm@kvack.org, Nick Piggin <npiggin@suse.de>,
	Jan Kara <jack@suse.cz>,
	linux-kernel@vger.kernel.org, akpm@linux-foundation.org
Subject: Re: [PATCH] mm/filemap.c: unconditionally call mark_page_accessed
Date: Fri, 16 Mar 2007 00:09:08 -0400	[thread overview]
Message-ID: <45FA1864.9010909@redhat.com> (raw)
In-Reply-To: <200703160351.l2G3p3GJ020217@turing-police.cc.vt.edu>

Valdis.Kletnieks@vt.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, 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>

  reply	other threads:[~2007-03-16  4:09 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <Pine.GSO.4.64.0703081612290.1080@cpu102.cs.uwaterloo.ca>
     [not found] ` <20070312142012.GH30777@atrey.karlin.mff.cuni.cz>
     [not found]   ` <20070312143900.GB6016@wotan.suse.de>
     [not found]     ` <20070312151355.GB23532@duck.suse.cz>
     [not found]       ` <Pine.GSO.4.64.0703121247210.7679@cpu102.cs.uwaterloo.ca>
     [not found]         ` <20070312173500.GF23532@duck.suse.cz>
     [not found]           ` <Pine.GSO.4.64.0703131438580.8193@cpu102.cs.uwaterloo.ca>
     [not found]             ` <20070313185554.GA5105@duck.suse.cz>
2007-03-14 19:58               ` Ashif Harji
2007-03-14 20:55                 ` Dave Kleikamp
2007-03-14 21:33                   ` Andreas Mohr
2007-03-14 22:08                     ` Dave Kleikamp
2007-03-15  1:36                       ` Xiaoning Ding
2007-03-15  5:22                         ` Ashif Harji
2007-03-15 12:46                           ` Dave Kleikamp
2007-03-15 12:50                             ` Nick Piggin
2007-03-15 19:07                           ` Andrew Morton
2007-03-15 21:49                             ` Andrea Arcangeli
2007-03-15 22:06                               ` Andrew Morton
2007-03-15 23:15                                 ` Andrea Arcangeli
2007-03-15 15:00                     ` Rik van Riel
2007-03-15 17:37                     ` Valdis.Kletnieks
2007-03-15 18:35                       ` Rik van Riel
2007-03-16  3:51                         ` Valdis.Kletnieks
2007-03-16  4:09                           ` Rik van Riel [this message]
2007-03-16 14:20                   ` Anton Blanchard
2007-03-15 10:39                 ` Peter Zijlstra
2007-03-15 12:38                   ` Nick Piggin
2007-03-15 15:06                     ` Rik van Riel
2007-03-15 15:56                 ` Chuck Ebbert
2007-03-15 16:29                   ` Nick Piggin
2007-03-15 17:04                     ` Rik van Riel
2007-03-15 17:44                     ` Hugh Dickins
2007-03-15 20:01                       ` Nick Piggin
2007-03-15 22:59                       ` Andrea Arcangeli
2007-03-15 23:15                         ` Dave Kleikamp
2007-03-15 23:28                           ` Andrea Arcangeli
2007-03-15 19:55                     ` Ashif Harji
2007-03-15 20:07                       ` Nick Piggin
2007-03-15 20:31                         ` Andreas Mohr

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=45FA1864.9010909@redhat.com \
    --to=riel@redhat.com \
    --cc=Valdis.Kletnieks@vt.edu \
    --cc=akpm@linux-foundation.org \
    --cc=andi@rhlx01.fht-esslingen.de \
    --cc=asharji@cs.uwaterloo.ca \
    --cc=jack@suse.cz \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=npiggin@suse.de \
    --cc=shaggy@linux.vnet.ibm.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