Skip to content

vfs: Convert file allocation code to use the IDR

Sandhya Bankar linux-fsdevel lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest13 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/13idr: Add ability to set/clear tagsinclude/linux/idr.h lib/radix-tree.c tools/testing/radix-tree/idr-test.c+95 -200 replies
2/13idr: Add idr_for_each_entry_tagged()include/linux/idr.h lib/idr.c tools/testing/radix-tree/idr-test.c +2 more+61 -120 replies
3/13idr, radix-tree: Add get_tag_batch functioninclude/linux/idr.h include/linux/radix-tree.h lib/radix-tree.c +2 more+83 -20 replies
4/13idr, radix-tree: Implement copy_preloadinclude/linux/idr.h include/linux/radix-tree.h lib/radix-tree.c +3 more+182 -00 replies
5/13vfs: Replace array of file pointers with an IDRfs/file.c include/linux/fdtable.h+79 -1111 reply
6/13vfs: Remove next_fd from fd alloc code path.fs/file.c include/linux/fdtable.h+0 -70 replies
7/13vfs: Remove full_fds_bits from fd allocation code path.fs/file.c include/linux/fdtable.h+1 -190 replies
8/13vfs: Use idr_tag_get() in fd_is_open().fs/file.c include/linux/fdtable.h+6 -60 replies
9/13vfs: Rewrite close_files()fs/file.c+11 -260 replies
10/13vfs: Replace close_on_exec bitmap with an IDR tagfs/exec.c fs/fcntl.c fs/file.c +3 more+41 -720 replies
11/13vfs: Add init_task.h includefs/file.c+1 -00 replies
12/13vfs: Convert select to use idr_get_tag_batch()fs/select.c+8 -70 replies
13/13vfs: Delete struct fdtablefs/compat.c fs/file.c fs/proc/array.c +3 more+54 -3470 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 00/13] vfs: Convert file allocation code to use the IDR

Currently the file descriptors are allocated using a custom allocator. This patchset replaces the custom code with an IDR. This replacement will result in some memory saving for processes with relatively few open files and improve performance of workloads with very large numbers of open files.

Note: Some more performance benchmark needs to be run on this patchset. Can anyone please help in runnning benchmark for this patchset.

Matthew Wilcox (5):
idr: Add ability to set/clear tags
idr: Add idr_for_each_entry_tagged()
idr, radix-tree: Add get_tag_batch function
idr, radix-tree: Implement copy_preload
vfs: Add init_task.h include

Sandhya Bankar (8):
vfs: Replace array of file pointers with an IDR
vfs: Remove next_fd from fd alloc code path.
vfs: Remove full_fds_bits from fd allocation code path.
vfs: Use idr_tag_get() in fd_is_open().
vfs: Rewrite close_files()
vfs: Replace close_on_exec bitmap with an IDR tag
vfs: Convert select to use idr_get_tag_batch()
vfs: Delete struct fdtable

 fs/compat.c                                 |   6 +-
 fs/exec.c                                   |   2 +-
 fs/fcntl.c                                  |   2 +-
 fs/file.c                                   | 606 ++++++----------------------
 fs/proc/array.c                             |   2 +-
 fs/proc/fd.c                                |   6 +-
 fs/select.c                                 |  21 +-
 include/linux/fdtable.h                     |  66 +--
 include/linux/file.h                        |   1 -
 include/linux/idr.h                         | 110 ++++-
 include/linux/radix-tree.h                  |   5 +
 lib/idr.c                                   |  30 +-
 lib/radix-tree.c                            | 169 +++++++-
 tools/testing/radix-tree/idr-test.c         |  85 +++-
 tools/testing/radix-tree/linux/radix-tree.h |   2 +
 tools/testing/radix-tree/main.c             |  38 ++
 tools/testing/radix-tree/test.c             |   9 +-
 tools/testing/radix-tree/test.h             |   3 +-
 18 files changed, 578 insertions(+), 585 deletions(-)
Signature · 1 line
1.8.3.1