[lkml]   [2002]   [May]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] 2.5.12: remove VALID_PAGE

On Wed, 1 May 2002, Roman Zippel wrote:
> This patch removes VALID_PAGE() and replaces it with pte_valid_page()/
> virt_to_valid_page(). The VALID_PAGE() test is basically always too late
> for configuration with discontinous memory. The real input value (the
> virtual or physical address) has to be checked. Nice side effect: the
> kernel becomes 1KB smaller.

Can you please do this differently, by splitting up the pte->page
conversion and explicitly using a physical PFN in between the two?

In other words, I'd much rather have

unsigned long pfn = pte_pfn(pte);

if (pfn_valid(pfn)) {
struct page *page = pfn_to_page(pfn);

and make the physical page address visible.

The reason I'd rather do it that way is that sometimes we right now go to
"struct page" for no really good reason, other than the fact that we don't
have any other good "intermediate" representation.

So using a pte_pfn()/pfn_to_page() interface would allow other places to
take advantage of this too, instead of adding two new special-case
functions that aren't useful for anything else.


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:25    [W:0.048 / U:35.652 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site