Re: Does process need to have a kernel-side stack all the time?

From: Denys Vlasenko
Date: Mon Apr 14 2008 - 10:54:46 EST


On Monday 14 April 2008 16:17, Denis V. Lunev wrote:
> On Mon, 2008-04-14 at 15:47 +0200, Denys Vlasenko wrote:
> > Currently, when process sleeps, we save some
> > state in stack, and such a change may require
> > some substantial surgery.
> >
> > Can you tell me whether this is possible at all,
> > and how difficult you estimate it to be?
>
> I do not think that this can help. Usually, the process (thread) invokes
> some syscall like sleep and goes to the waiting state _from the kernel_,
> i.e. the kernel stack is used at that moment and will be required during
> wake up.

See my quote above. That's exactly what I said. This is how it currently
works.

But do you really need 4k to remember that "this thread went to sleep by
executing sleep(60)"? Theoretically, you may get away with much smaller
save area to remember that, and be able to wake up and return to userspace.
--
vda
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/