Posted May 25, 2011 13:00 UTC (Wed) by rilder (subscriber, #59804)
Parent article: The problem with prefetch
Fair enough. However, I have a question regarding this. The whole change depends on hardware branch predictors which are not constant across hardware. I am not sure how well the branch predictors were pre-Nehalem/pre-Sandybridge, so if new kernels are used on slightly older hardware, won't they suffer from lack of both software/hardware prefetch hints ? I guess they could have made this a CONFIG_xxx option but may be that was infeasible/cluttering the code further.
Posted May 25, 2011 16:26 UTC (Wed) by ds2horner (subscriber, #13438)
[Link]
I believe your question more succinct than my attempt to raise the issue ( above).
In Andi Kleen's patch (LWN article linked to in the main article), he attempted to have the prefetch remain for list processing on CPUs (namely the K7 family) that would benefit from it.
His approach was to change the prefetch calls to list_prefetch calls and make the list_prefetch a no-op on most rchitectures (and mapping to prefetch via CONFIG_LIST_PREFETCH for MK7 only (presumably with more to be added if they would benefit).
But my main question was, other than the K7 where there is historical "evidence" that this CPU benefited, who would now do the justification for other older processors (like the P3s)?