Skip to content

ida: Allow allocations of contiguous IDs

Michal Wajdeczko linux-fsdevel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 10 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3ida: Introduce ida_weight()include/linux/idr.h lib/idr.c+26 -03 replies
2/3ida: Introduce ida_alloc_group_range()include/linux/idr.h lib/idr.c+172 -461 reply
3/3ida: Add kunit based tests for new IDA functionslib/Kconfig.debug lib/Makefile lib/ida_kunit.c+153 -06 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] ida: Allow allocations of contiguous IDs

Some drivers (like i915) may require allocations of contiguous ranges of IDs, while current IDA supports only single ID allocation and does not guarantee that next returned ID will be next to the previous one.

Extend implementation of IDA to allow allocation of arbitrary number of contiguous IDs and add some basic KUnit test coverage.

Cc Matthew Wilcox <[email protected]>

Michal Wajdeczko (3):
ida: Introduce ida_weight()
ida: Introduce ida_alloc_group_range()
ida: Add kunit based tests for new IDA functions

 include/linux/idr.h |   4 +
 lib/Kconfig.debug   |  12 +++
 lib/Makefile        |   1 +
 lib/ida_kunit.c     | 140 ++++++++++++++++++++++++++
 lib/idr.c           | 240 +++++++++++++++++++++++++++++++++++---------
 5 files changed, 351 insertions(+), 46 deletions(-)
 create mode 100644 lib/ida_kunit.c
Signature · 1 line
2.25.1