lkml.org 
[lkml]   [2004]   [Oct]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] reduce stack usage of NFS (was Re: How to safely reduce...)
Denis Vlasenko wrote:
>>>>I can convert these into kmalloc'ed variants but hesitate to do so
>>>>because of possible 'need to kmalloc in order to free memory for kmalloc'
>>>>deadlocks.
>>>
>>>how about a memory pool?
>>>
>>>It's not THE solution but I suspect the depth of callchains of these isn't too deep so it would work
>>
>>I can't see that any of the callchains Denis listed can deadlock. None
>>of them appear to lie in the memory reclaim paths.
>
>
> This patch reduces stack usage to below 100 bytes for
> the following functions:
>
> stack usage in 2.6.9
> nfs3_proc_create: 544
> _nfs4_do_open: 516
> nfs_readdir: 412
> nfs_symlink: 368
> _nfs4_open_delegation_recall: 368
> nfs3_proc_rename: 364
> _nfs4_open_reclaim: 364
> nfs_mknod: 352
> nfs_mkdir: 352
> nfs_proc_create: 344
> nfs3_proc_link: 328
> nfs_lookup_revalidate: 312
> nfs_lookup: 292
>
> (btw: in function nfs_readdir: local variable 'desc' seem to be
> easily replaceable with &my_desc, or am I missing something?)
>
> Compile tested only. I can't run test it until next Wednesday :(
>
> Please review, especially for leaks on error paths.

Hi Denis,
I checked all of it. Looks right & it builds.

--
~Randy
-
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 14:07    [W:1.941 / U:0.296 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site