Re: Interesting scheduling times - NOT

Linus Torvalds (torvalds@transmeta.com)
21 Sep 1998 07:04:20 GMT


In article <19980920160844.D24495@tantalophile.demon.co.uk>,
Jamie Lokier <lkd@tantalophile.demon.co.uk> wrote:
>On Sat, Sep 19, 1998 at 10:44:34AM +0200, Gabriel Paubert wrote:
>> Aren't most of the variables referenced at the same addess modulo 4k since
>> they are in the task_state+stack structure ? In this case you repeatedly
>> access the same cache set, meaning that your code is a cache thrashing
>> benchmark every time you scan a queue with more elements than the L1 cache
>> associativity. (And maybe some variables are modified, causing copybacks
>> of dirty cache lines, I can't tell, not having access to the source
>> right now.)
>
>Aha. Sounds like a good case for SLAB-allocating the task_state
>structure separate from the stack. And also varying the initial
>kernel stack pointer within the stack pages.

Ehh. And in the process completely breaking the whole "current" macro.

You'd speed up one small thing only to slow down everything else.

Hardware is getting better all the time. The time when direct-mapped or
even two-way mapped caches were de rigeur are long gone.

Linus

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