From mboxrd@z Thu Jan 1 00:00:00 1970 Message-Id: <200703160351.l2G3p3GJ020217@turing-police.cc.vt.edu> Subject: Re: [PATCH] mm/filemap.c: unconditionally call mark_page_accessed In-Reply-To: Your message of "Thu, 15 Mar 2007 14:35:17 EDT." <45F991E5.1060001@redhat.com> From: Valdis.Kletnieks@vt.edu References: <20070312142012.GH30777@atrey.karlin.mff.cuni.cz> <20070312143900.GB6016@wotan.suse.de> <20070312151355.GB23532@duck.suse.cz> <20070312173500.GF23532@duck.suse.cz> <20070313185554.GA5105@duck.suse.cz> <1173905741.8763.36.camel@kleikamp.austin.ibm.com> <20070314213317.GA22234@rhlx01.hs-esslingen.de> <200703151737.l2FHb81d001600@turing-police.cc.vt.edu> <45F991E5.1060001@redhat.com> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="==_Exmh_1174017063_1561P"; micalg=pgp-sha1; protocol="application/pgp-signature" Content-Transfer-Encoding: 7bit Date: Thu, 15 Mar 2007 23:51:03 -0400 Sender: owner-linux-mm@kvack.org Return-Path: To: Rik van Riel Cc: Andreas Mohr , Dave Kleikamp , Ashif Harji , linux-mm@kvack.org, Nick Piggin , Jan Kara , linux-kernel@vger.kernel.org, akpm@linux-foundation.org List-ID: --==_Exmh_1174017063_1561P Content-Type: text/plain; charset=us-ascii On Thu, 15 Mar 2007 14:35:17 EDT, Rik van Riel said: > Valdis.Kletnieks@vt.edu wrote: > > On Wed, 14 Mar 2007 22:33:17 BST, Andreas Mohr said: > > > >> it'd seem we need some kind of state management here to figure out good > >> intervals of when to call mark_page_accessed() *again* for this page. E.g. > >> despite non-changing access patterns you could still call mark_page_accessed() > >> every 32 calls or so to avoid expiry, but this would need extra helper > >> variables. > > > > What if you did something like > > > > if (jiffies%32) {... > > > > (Possibly scaling it so the low-order bits change). No need to lock it, as > > "right most of the time" is close enough. > > Bad idea. That way you would only count page accesses if the > phase of the moon^Wjiffie is just right. 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. --==_Exmh_1174017063_1561P Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (GNU/Linux) Comment: Exmh version 2.5 07/13/2001 iD8DBQFF+hQncC3lWbTT17ARAgv6AKCXLpBf4us71IBVrMARlvAeBwOXLQCg66hV v+Hvy/9LDhPZFr9yT8zEcTw= =9M8W -----END PGP SIGNATURE----- --==_Exmh_1174017063_1561P-- -- 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: email@kvack.org