lkml.org 
[lkml]   [2003]   [Jul]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] Port SquashFS to 2.6
On Sun, 20 July 2003 11:16:18 +0100, postmaster@lougher.demon.co.uk wrote:
> joern@wohnheim.fh-wedel.de wrote:
> >
> > As a rule of thumb, stay below 1k or you will get regular email from
> > me. :)
>
> I tend to allocate (small) buffers on the stack, when their size does not
> seem to warrant either: a globally kmalloced buffer and consequent locking,
> or a locally kmalloced buffer kfreed on exit from the function, which seems
> wasteful. However, if 1K is the perceived wisdom on stack limits, then I will
> alter the code.

At least you should think twice before going above. Even with wli's
stack reduction work applied, you still have close to 4k for kernel
stack. But measuring the stack consumption of all the possible call
chains in the kernel is still a hard problem, so you will have a hard
time proving that any one bigger stack allocation is fine.

Jörn

--
When people work hard for you for a pat on the back, you've got
to give them that pat.
-- Robert Heinlein
-
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 13:47    [W:0.025 / U:0.592 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site