Re: Software prefetching considered harmful

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 20 May 2011 00:34, Ingo Molnar <mingo@xxxxxxx> wrote:
> * David Miller <davem@xxxxxxxxxxxxx> wrote:
>
>> So, to reiterate, I think you should kill all the list handling
>> prefetches off.
>
> Agreed.
>
>> What we can do is say "for this specific list use, prefetch does
>> in fact help".  And provide an interface for that.  I imagine there
>> are things like inode dirty writeback or some dcache stuff that
>> walks large lists and for which prefetch might be appropriate.
>
> I think the best 'interface' for that is to open-code the prefetch()
> right into the loop. This way it becomes well documented and very
> visible as well.

I talked to some of the CPU people in ARM and, while there are a
variety of ARM implementations, for many of them prefetch(0) would
result in a TLB miss and go for an expensive page table walk. For
mostly 1-element lists like hash table look-up it's not worth having
the prefetch (could make it worse).

Prefetch is indeed useful for traversing longer lists (and probably
more work inside the loop) but I guess we can code the prefetch()
explicitly as Dave and Ingo suggested.

-- 
Catalin
--
To unsubscribe from this list: send the line "unsubscribe linux-arch" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel]     [Kernel Newbies]     [x86 Platform Driver]     [Netdev]     [Linux Wireless]     [Netfilter]     [Bugtraq]     [Linux Filesystems]     [Yosemite Discussion]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]

  Powered by Linux