lkml.org 
[lkml]   [1998]   [Sep]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Interesting scheduling times - NOT
On Mon, Sep 21, 1998 at 07:04:20AM +0000, Linus Torvalds wrote:
> Jamie Lokier wrote:
> >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.

No no, I had in mind keeping a pointer to the task_struct at the base of
the stack:

static inline struct task_struct * get_current(void)
{
struct task_struct **current;
__asm__("andl %%esp,%0; ":"=r" (current) : "0" (~8191UL));
return *current;
}

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

But still, for an N-way cache you can play with N task structs before
trouncing the cache. N is often 2 or 4. 2 is the bare minimum task
structs played with, at a context switch.

And when you have a number of processes doing similar kinds of I/O, they
will tend to be trouncing the same areas of their kernel stacks too.

-- Jamie

-
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/

\
 
 \ /
  Last update: 2005-03-22 13:44    [W:0.050 / U:0.180 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site