Re: Purpose of the mm/slab.c changes

Davide Libenzi (davidel@xmailserver.org)
Sat, 22 Sep 2001 14:03:02 -0700 (PDT)


On 22-Sep-2001 Ralf Baechle wrote:
> On Sun, Sep 09, 2001 at 01:58:44PM -0700, Davide Libenzi wrote:
>
>> >> Do You see it as a plus ?
>> >> The new allocated slab will be very likely written ( w/o regard
>> >> about the old content ) and an L2 mapping will generate
>> >> invalidate traffic.
>> >
>> > If your invalidates are slower than your RAM, you should
>> > consider getting another computer.
>>
>> You mean a Sun, that uses a separate bus for snooping ? :)
>> Besides to not under estimate the cache coherency traffic ( that on many CPUs
>> uses the main memory bus ) there's the fact that the old data eventually
>> present in L2 won't be used by the new slab user.
>
> That's actually what having a slab cache of pre-initialized elements tries
> to achieve.
>
> On anything that uses a MESI-like cache coherence protocol a cached dirty
> cache line that is written to will not cause any coherency traffic and
> thus be faster.

MESI is a bit more complicated than clean/dirty status.
This is a very good state machine graph for MESI :

http://odin.ee.uwa.edu.au/~morris/CA406/cache_coh.html

Besides this, i don't get how a LIFO could help you.
the slab-alloc code will run on a processor B, if these two ops are
executed very close in time ( due LIFO ) there's a good probability of
modified->shared migration that will result in pushback ops.
A FIFO will result in more time between free and alloc with a good probability
that the interlock will be relaxed.

- Davide

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/