Re: [PATCH] Port SquashFS to 2.6

From: Jörn Engel (joern@wohnheim.fh-wedel.de)
Date: Sun Jul 20 2003 - 05:38:56 EST


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/



This archive was generated by hypermail 2b29 : Wed Jul 23 2003 - 22:00:39 EST