linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] ida: Allow allocations of contiguous IDs
@ 2023-11-02 15:34 Michal Wajdeczko
  2023-11-02 15:34 ` [PATCH 1/3] ida: Introduce ida_weight() Michal Wajdeczko
                   ` (2 more replies)
  0 siblings, 3 replies; 14+ messages in thread
From: Michal Wajdeczko @ 2023-11-02 15:34 UTC (permalink / raw)
  To: linux-fsdevel; +Cc: Michal Wajdeczko, Matthew Wilcox

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 <willy@infradead.org>

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

-- 
2.25.1


^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2024-01-09 20:58 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-02 15:34 [PATCH 0/3] ida: Allow allocations of contiguous IDs Michal Wajdeczko
2023-11-02 15:34 ` [PATCH 1/3] ida: Introduce ida_weight() Michal Wajdeczko
2023-11-02 17:46   ` Matthew Wilcox
2023-11-02 19:05     ` Michal Wajdeczko
2024-01-09 20:52     ` Michal Wajdeczko
2023-11-02 15:34 ` [PATCH 2/3] ida: Introduce ida_alloc_group_range() Michal Wajdeczko
2024-01-09 20:58   ` Michal Wajdeczko
2023-11-02 15:34 ` [PATCH 3/3] ida: Add kunit based tests for new IDA functions Michal Wajdeczko
2023-11-02 17:43   ` Matthew Wilcox
2023-11-02 18:58     ` Michal Wajdeczko
2023-11-02 19:12       ` Matthew Wilcox
2023-11-02 20:58         ` Michal Wajdeczko
2023-11-02 21:01           ` Matthew Wilcox
2023-11-02 21:33             ` Michal Wajdeczko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).