lkml.org 
[lkml]   [2003]   [Dec]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
DateFri, 26 Dec 2003 16:35:56 -0800 (PST)
FromLinus Torvalds <>
SubjectRe: Page aging broken in 2.6


On Sat, 27 Dec 2003, Benjamin Herrenschmidt wrote:
>
> Or do what I propose here, that is have ptep_test_and_clear_* be
> responsible for the flush on archs where it is necessary, but then
> it would be nice to have more than the ptep as an argument...

The dirty handling already does the TLB flush (in that case it's a
correctness issue, not a hint). So it's only ptep_test_and_clear_young()
that matters.

I don't know whather that ever ends up being performance-critical, and I
don't see what else could be passed into it. We literally don't _have_
anythign else than the pte.

But the ppc architecture could easily decide to walk the hash tables and
invalidate in ptep_test_and_clear_young(). And if it ends up being a
performance issue, it _appears_ that all users of "page_referenced()"
(which is the only thing that does this) are actually using the return
value as just a boolean. And it's entirely possible that we should break
out of "page_referenced()" on the _first_ hit of "yes, this has been
referenced".
That would make it much less CPU-intensive to make
"ptep_test_and_clear_young()" slightly heavier to execute. It would also
cause "page_referenced()" to not clear _all_ mapped reference bits at the
same time - which might unfairly cause multi-used pages to stay in memory.
On the other hand, that might be the _right_ behaviour.

Rik? Andrea?

Worth testing, perhaps.

Linus
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2009-11-18 23:46    [from the cache]
©2003-2010