Skip to content

pid: replace idr api with xarray

Brian Foster linux-mm lkml 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3pid: replace pidmap_lock with xarray lockkernel/pid.c+40 -390 replies
2/3pid: split cyclic id allocation cursor from idrarch/powerpc/platforms/cell/spufs/sched.c fs/proc/loadavg.c include/linux/pid_namespace.h +2 more+9 -60 replies
3/3pid: switch pid_namespace from idr to xarrayinclude/linux/pid_namespace.h include/linux/threads.h init/main.c +2 more+51 -590 replies

Reviews trailers per patch

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

Read the v1 thread

Cover letter [PATCH 0/3] pid: replace idr api with xarray

Hi all,

This series is a few patches to switch struct pid management over from the idr api to the xarray api. The underlying data structures are already the same between both apis, but the idr relies on the old and slightly customized radix-tree implementation to accomplish things like efficient free id tracking, which xarray already supports directly.

This is all based on a prototype patch[1] from Willy that fell out from discussion on a separate series to try and improve /proc readdir performance using radix-tree tags (to be replaced with xarray marks). I've basically split it up into a few smaller patches, made some minor tweaks, and ran some tests on the result.

Willy,

Re: the above, I've included your s-o-b on each of the patches. I'm not sure what your preference or the proper etiquette is here. Let me know if you want me to change authorship or tags or whatever in any way..

Brian

[1] https://lore.kernel.org/linux-fsdevel/[email protected]/

Brian Foster (3):
pid: replace pidmap_lock with xarray lock
pid: split cyclic id allocation cursor from idr
pid: switch pid_namespace from idr to xarray

 arch/powerpc/platforms/cell/spufs/sched.c |   2 +-
 fs/proc/loadavg.c                         |   2 +-
 include/linux/pid_namespace.h             |   9 +-
 include/linux/threads.h                   |   2 +-
 init/main.c                               |   3 +-
 kernel/pid.c                              | 133 +++++++++++-----------
 kernel/pid_namespace.c                    |  23 ++--
 7 files changed, 85 insertions(+), 89 deletions(-)
Signature · 1 line
2.35.3