Re: 2.6.6-rc3-mm2 (4KSTACK)

Steve Lord
2004-05-07T15:55:17Z

Dave Jones wrote:
> On Fri, May 07, 2004 at 08:51:05AM +0200, Arjan van de Ven wrote:
> >
> > On Fri, May 07, 2004 at 01:37:54AM +0100, Paul Jakma wrote:
> > > On Thu, 6 May 2004, Arjan van de Ven wrote:
> > >
> > > > Ok I don't want to start a flamewar but... Do we want to hold linux
> > > > back until all binary only module vendors have caught up ??
> > >
> > > What about normal linux modules though? Eg, NFS (most likely):
> > >
> > > https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=121804
> >
> > NFSv4 has a > 1Kb stack user; Dave Jones has a fix pending for that...
>
> Hmm, this one maybe?
>
> Dave
>

>
> - if (mlen > sizeof(buf))
> + obj.data = kmalloc(1024, GFP_KERNEL);
> + if (!obj.data)
> + return -ENOMEM;
> +
> + if (mlen > 1024) {

That's what I hate about all of this, just think how much stack that
kmalloc can take in low memory situations.... it might end up in
writepage on another nfs file.... Moving stuff off the stack and
into kmalloc just reduces the possibility of stack overflow, it
does not fix the problem. Having memory reclaim take place inside
the thread which is waiting for memory makes that a pretty hard
problem to fix.

Steve