diff options
author | Matthew Wilcox <willy@infradead.org> | 2018-10-26 14:43:22 -0400 |
---|---|---|
committer | Matthew Wilcox <willy@infradead.org> | 2019-02-06 13:13:24 -0500 |
commit | 3ccaf57a6a63ad171a951dcaddffc453b2414c7b (patch) | |
tree | fc2202432a5b50ee5507a2e240b439b2993c2c3f /LICENSES/preferred | |
parent | fd9dc93e36231fb6d520e0edd467058fad4fd12d (diff) |
XArray: Add support for 1s-based allocation
A lot of places want to allocate IDs starting at 1 instead of 0.
While the xa_alloc() API supports this, it's not very efficient if lots
of IDs are allocated, due to having to walk down to the bottom of the
tree to see if ID 1 is available, then all the way over to the next
non-allocated ID. This method marks ID 0 as being occupied which wastes
one slot in the XArray, but preserves xa_empty() as working.
Signed-off-by: Matthew Wilcox <willy@infradead.org>
Diffstat (limited to 'LICENSES/preferred')
0 files changed, 0 insertions, 0 deletions