[PATCH] no-execute -- please test

Paul Mackerras paulus at samba.org
Tue Aug 15 09:34:27 EST 2006

Albert Cahalan writes:

> The first is to avoid taking the initial fault on the segment
> which contains the instruction pointer.

Good idea.

> The second is to avoid cache or TLB invalidates or flushes
> in certain circumstances. OpenBSD developers report that
> this type of optimization is of great benefit on sparc and ppc.
> It's an optimization than is only valid when no-execute is
> in use, so the performance effects go both ways.

We have a bit per page that says if the page is icache dirty or not.
On machines with no-execute support, we already avoid flushing the
page until some process first tries to execute from it.  If we
extended that to this scheme, when we made a segment executable, we
would have to find and flush all icache-dirty pages in the segment (up
to 65536 pages).  We wouldn't want to do that every time we made a
segment executable - it would need to be optimized (e.g. keep a count
per segment of icache-dirty pages in the segment).


More information about the Linuxppc-dev mailing list