Re: [GIT PULL] MD update for 4.9

From: Linus Torvalds
Date: Fri Oct 07 2016 - 14:03:53 EST

On Fri, Oct 7, 2016 at 10:39 AM, Shaohua Li <shli@xxxxxxxxxx> wrote:
> I did try your patch and it improved 10% in my machine, but this isn't
> relevent to the pull. We can do the tunning later if necessary. I'm
> hoping the intel guys can share some hints, but apparently Linus isn't a
> fan for such tuning.

We've had horrible experiences with prefetching in the past. We've
seen microarchitectures that do really bad things when the prefetch
takes a TLB miss, for example, and suddenly they stall on the
prefetch, and actually slow the code down.

Admittedly, most of the bad cases are probably not a big deal for
streaming raid rebuild code, so it may well be that it works better

So I'm not categorically against prefetching, but it needs to be
tested across a lot of different (micro-)architectures. Right now, I
guess something very specific like AVX512 means effectively just one
or two microarchitectures and then it's easy to say "it always helps".

The worst cases for the kernel have generally been in generic code.