Re: [PATCH] Fix WARN_ON / WARN_ON_ONCE regression

Jeremy Fitzhardinge
2006-10-05T21:43:21Z

Andrew Morton wrote:
> So how's this look?
>

Looks fine to me. Other than the general question of why WARN_ON*
returns a value at all, and if so, does the final unlikely() really do
anything.

> I worry a bit that someone's hardware might go and prefetch that static
> variable even when we didn't ask it to. Can that happen?
>

Sure, the CPU has the option, but if it goes around speculatively
polluting its caches with unused stuff, it isn't going to perform very
well in general. So presumably the CPU won't do it unless it really
thinks it will help.

J