Re: [PATCH] mm/slab.c : prefetchw the start of new allocated objects

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

 



From: Eric Dumazet <[email protected]>
Date: Fri, 29 Jul 2005 11:05:09 +0200

> Some CPU lacks a prefetchw() and currently do nothing, so I ask this
> question : Should'nt make prefetchw() do at least a prefetch() ? A
> read hint is better than nothing.

This is not true, especially on SMP.  If the only prefetch variant
available does a "prefetch for read", the cpu will only grab the
cacheline in shared state if other cpus have a dirty copy.

And, as a result, when the write to the cache line occurs yet
another bus transaction will go out in order to get exclusive
access to the cache line on the local cpu.  This is extremely
inefficient.

So it's better in this case to make no prefetch, and thus only
incur one bus transaction when the memory access occurs.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]
  Powered by Linux