Re: [PATCH] [3/5] CPA: Make advised protection check trulyadvisory

From: Thomas Gleixner
Date: Sat Feb 09 2008 - 10:39:21 EST


On Fri, 8 Feb 2008, Andi Kleen wrote:

>
> Only force RO in the advisory protection checks when all pages in the
> range are RO. Previously it would trigger when any page in the range
> was ro.
>
> I believe this will make try_preserve_large_page much safer to use.

It might be quite useful to know it for sure.

Thinking about the whole set of changes, you are right, that the
current check for the first page only is not correct, but I don't see
how your changes make it more correct.

The correct way to fix this is to check, whether all the small pages,
which fit in the range of the large page, which we want to preserve,
have the same resulting pgprot flags.

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