diff options
author | Steven Whitehouse <[email protected]> | 2010-07-28 17:56:23 +0100 |
---|---|---|
committer | Linus Torvalds <[email protected]> | 2010-07-28 11:10:03 -0700 |
commit | d2a97a4e99ff0ffdccd1fc46f22fb34270ef1e56 (patch) | |
tree | f9ac90f438bb3221a6e383e7f1c9c817e95ad44b /tools/perf/util/trace-event-scripting.c | |
parent | fc0f5ac8fe693d1b05f5a928cc48135d1c8b7f2e (diff) |
GFS2: Use kmalloc when possible for ->readdir()
If we don't need a huge amount of memory in ->readdir() then
we can use kmalloc rather than vmalloc to allocate it. This
should cut down on the greater overheads associated with
vmalloc for smaller directories.
We may be able to eliminate vmalloc entirely at some stage,
but this is easy to do right away.
Also using GFP_NOFS to avoid any issues wrt to deleting inodes
while under a glock, and suggestion from Linus to factor out
the alloc/dealloc.
I've given this a test with a variety of different sized
directories and it seems to work ok.
Cc: Andrew Morton <[email protected]>
Cc: Nick Piggin <[email protected]>
Cc: Prarit Bhargava <[email protected]>
Signed-off-by: Steven Whitehouse <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'tools/perf/util/trace-event-scripting.c')
0 files changed, 0 insertions, 0 deletions