lkml.org 
[lkml]   [2001]   [Jun]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] fs/devfs/base.c
Alan Cox writes:
> > - the kernel stack is 4kB, and _nobody_ has the right to eat up a
> > noticeable portion of it. It doesn't matter if you "know" your caller
>
> Umm Linus on what platform - its 8K or more on all that I can think of

I assume he's referring to what's left after you take out the task
struct. More than 4 kiB, so 4 kiB is a conservative estimate.

> > Ergo: the simple rule of "don't allocate big structures of the stack" is
> > always a good rule, and making excuses for it is bad.
>
> We have a very large number of violators of 1K of stack, and very
> few of 2K right now.

I guess we should ask the question as to what's an acceptable usage.
Theoretically, any amount could pose a problem, but that's hardly a
useful position to work from. Some decision or guideline about a
practical limit would be helpful. My gut feeling is that 1 kiB is
around the limit for functions with a well defined call path. The
limit should probably be less for generic functions and interrupt
handlers.

Regards,

Richard....
Permanent: rgooch@atnf.csiro.au
Current: rgooch@ras.ucalgary.ca
-
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/

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