Re: [patch] arch hook for notifying changes in PTE protections bits

From: David S. Miller
Date: Sat Mar 19 2005 - 19:39:05 EST


On Sat, 19 Mar 2005 12:30:05 -0800
David Mosberger <davidm@xxxxxxxxxxxxxxxxx> wrote:

> I agree about your concern about cost. Accessing the page_map is
> expensive (integer division + memory access) and we have to do that in
> order to find out if the page is i-cache clean.

First, it's a multiply by reciprocol. At least on sparc64 I get
this emitted by the compiler.

Secondly, if you're willing to sacrifice 8 bytes per page struct
simply define WANT_PAGE_VIRTUAL and page struct will be exactly
64 bytes and thus the divide a will turn into a simple shift.
-
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/