lkml.org 
[lkml]   [2002]   [Dec]   [14]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateSat, 14 Dec 2002 23:25:20 +0300
FromOleg Drokin <>
SubjectRe: [BK][PATCH] ReiserFS CPU and memory bandwidth efficient large writes
Hello!

On Sat, Dec 14, 2002 at 12:10:55PM -0800, Andrew Morton wrote:
> > Well, 450 bytes is way below 4k (~7 times less if we'd take task struct
> > into account) ;)
> > I can replace that on-stack array with kmalloc, but that probably
> > would be a lot of overhead for no benefit.
> It would be a little overhead.  kmalloc is damn quick, and remember
> that this data has to be copied from userspace and has go to disk
> sometime.   These things will make the kmalloc overhead very small.

Hm. Ok, this can be done.

> > What do you think is safe stack usage limit for a function?
> As little as possible?

reiserfs v3  was traditionally hungry on stack space I think.

> One way of measuring these things is with your trusty linusometer.
> Manfred and I were sent back to the drawing board last week for a
> function which used 400 bytes...

;)

> > (and btw you have not even seen reiser4 stack usage ;) )
> uh-oh.   We need to be very sparing indeed.
> I had a patch once which would print out "maximum stack space
> ever used by this process" on exit, but Alan fumbled it.  I shall
> resurrect it.

We have that for reiser4, that how we learn about all the stack overflows we
have/had ;)

Bye,
    Oleg
-
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:31    [from the cache]
©2003-2008