mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Linux Kernel list <linux-kernel@vger.kernel.org>
Cc: Rik van Riel <riel@surriel.com>, Andrew Morton <akpm@osdl.org>
Subject: Page aging broken in 2.6
Date: Fri, 26 Dec 2003 18:28:59 +1100	[thread overview]
Message-ID: <1072423739.15458.62.camel@gaston> (raw)

HI !

I don't know if x86 is affected (I suspect not) but ppc and ppc64
definitely are.

in mm/rmap.c, in page_referenced(), we do that twice:

                if (ptep_test_and_clear_young(pte))
                        referenced++;

And we never flush the TLB entry. 

I don't know if x86 (or other archs really using page tables) will
actually set the referenced bit again in the PTE if it's already set
in the TLB, if not, then x86 needs a flush too.

ppc and ppc64 need a flush to evict the entry from the hash table or
we'll never set the _PAGE_ACCESSED bit anymore.

On the other hand, I'd like to propose a semantic change here, by
changing ptep_test_and_clear_dirty() as well so that the flush is done
by the arch function and not explicitely by the generic code in both
cases. (I'm not sure if it's worth adding an mm parameter to the call
or if the arch will figure it out, we don't have it at hand in
page_referenced()).

That way, arch that don't need the flush (if any) can avoid it, and
in the case of ptep_test_and_clear_dirty, I may have a better way of
implementing it without a flush in mind.

Comments ?

Ben.



             reply	other threads:[~2003-12-26  7:29 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-12-26  7:28 Benjamin Herrenschmidt [this message]
2003-12-26  7:40 ` Andrew Morton
2003-12-26  9:21   ` Arjan van de Ven
2003-12-26  9:58     ` Benjamin Herrenschmidt
2003-12-26 19:44     ` Davide Libenzi
2003-12-26  9:33   ` Russell King
2003-12-26 10:07     ` Benjamin Herrenschmidt
2003-12-26 17:59 ` Linus Torvalds
2003-12-26 23:55   ` Benjamin Herrenschmidt
2003-12-27  0:35     ` Linus Torvalds
2003-12-27  0:44       ` Benjamin Herrenschmidt
2003-12-27  0:53         ` Linus Torvalds
2003-12-27  0:59           ` Linus Torvalds
2003-12-27  1:03           ` Benjamin Herrenschmidt
2003-12-27  2:37             ` Andrea Arcangeli
2003-12-27  5:02               ` Benjamin Herrenschmidt
2003-12-27 10:16               ` William Lee Irwin III
2003-12-27  2:47           ` Rik van Riel
2003-12-27  3:00             ` Andrew Morton
2003-12-27  3:31               ` Rik van Riel
2003-12-27  3:54               ` Linus Torvalds
2003-12-27 16:34                 ` Martin J. Bligh
2003-12-27 23:07               ` Roger Luethi
2003-12-27 23:55                 ` William Lee Irwin III
2003-12-28 11:23                   ` Roger Luethi
2003-12-28 16:35                     ` William Lee Irwin III
2003-12-28 17:15                       ` Roger Luethi
2003-12-28  0:04                 ` Andrew Morton
2003-12-28 11:58                   ` Roger Luethi
2003-12-27  1:41       ` Andrea Arcangeli
2003-12-26 10:45 Manfred Spraul

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=1072423739.15458.62.camel@gaston \
    --to=benh@kernel.crashing.org \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=riel@surriel.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

all inboxes | Powered by JetHome®