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

From: Andi Kleen
Date: Wed Apr 16 2008 - 09:02:32 EST



> no, the primary motivation Arjan and me started working on 4K stacks and
> implemented it was what Denys mentioned: i had a testcase that ran
> 50,000 threads before it ran out of memory - i wanted it to run 100,000
> threads. The improved order-0 behavior was just icing on the cake.

I checked the original changelog and it mentions both with the
dumb reason covered in one sentence and the stall issue deserving
a full paragraph.

Well frankly that was a dumb reason then. Ok I hadn't imagined you
both really spent time on something dumb :) The stall reason
at least made some sense, although I suspect it is obsolete by now.

My objection to the 100k threads would be less that they
shouldn't be needed (we all know that user space does dumb things), but
that when you have them either with 4k stacks (or 50k threads with 8k
stack) you're dangerously near lowmem exhaustion on 32bit and then
sooner or later the system will have trouble anyways from low lowmem.
It's fundamentally not a reliable setup.

-Andi

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