Re: [PATCH] Mutilated form of Andi Kleen's AMD prefetch erratapatch

From: Andrew Morton
Date: Wed Oct 01 2003 - 10:19:43 EST


Andi Kleen <ak@xxxxxxx> wrote:
>
> > I'm a bit confused as to what significance the faulting address has btw:
> > kernel code can raise prefetch faults against addresses which are less
> > than, and presumably greater than TASK_SIZE.
>
> Currently it can't - hlist either prefetches to zero or to a valid
> address and everybody else using prefetch should also use valid addresses.

mumble, mutter.

> But it's conceivable that future kernels make more extensive use of
> prefetch.

yup.

Why is it not sufficient to do something like:

if (!(error_code & 4) && is_prefetch(...))
return;

near the start of do_page_fault()?

kernel-mode faults aren't very common. Most of them occur in
generic_file_read(), for reads into freshly-allocated memory (I think).
And the frequency of these is limited by disk bandwidth...
-
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/