Re: [PATCH] 2.5.12: remove VALID_PAGE

From: Linus Torvalds (torvalds@transmeta.com)
Date: Wed May 01 2002 - 23:56:48 EST


On Thu, 2 May 2002, Roman Zippel wrote:
> > [ pte_pfn ]
>
> Do you have an example, where that would be useful?

> I know these are special cases, but this covers everything that's
> currently needed.

.. but the _design_ is bad (limited usability anywhere else). And my
suggested interface is actually likely to generate better code, ie instead
of having two tests (one inside "pte_valid_page()", and one on the return
value), you'd only have one (in "valid_pfn()").

The whole notion of "pte_valid_page()" is horrible: you're doing two
_completely_ different things in the function - validation and "pte->page"
conversion. That's bad programming.

                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/



This archive was generated by hypermail 2b29 : Tue May 07 2002 - 22:00:12 EST