Re: [PATCH] avoid unnecessary cache flushes

Richard Henderson
2001-09-04T16:44:17Z

On Tue, Sep 04, 2001 at 11:53:22AM +1000, Paul Mackerras wrote:
> If the page is a private page (private COW or anonymous page) then I
> don't see where the kernel would be modifying the page.

ptrace set breakpoint?

> For alpha, the thing that my patch does that might hurt is the change
> from flush_icache_page to flush_icache_range in kernel/ptrace.c. Any
> comment on that?

Hum. Yes. We need a way to distinguish between userspace and
kernelspace icache flushes.

Previously, flush_icache_page was used exclusively for userspace
and flush_icache_range exclusively for kernelspace. Since I _do_
have address space numbers, I can avoid the "flush all" by allocating
a new ASN for the user process. Which doesn't work for the kernel
of course; there I do have to flush all.

r~