]> www.infradead.org Git - users/willy/xarray.git/log
users/willy/xarray.git
5 years agorpmsg: Convert rcids to XArray
Matthew Wilcox [Tue, 8 Jan 2019 17:20:22 +0000 (12:20 -0500)]
rpmsg: Convert rcids to XArray

Signed-off-by: Matthew Wilcox <willy@infradead.org>
5 years agorpmsg: Convert lcids to XArray
Matthew Wilcox [Tue, 8 Jan 2019 17:07:21 +0000 (12:07 -0500)]
rpmsg: Convert lcids to XArray

Signed-off-by: Matthew Wilcox <willy@infradead.org>
5 years agorapidio: Convert ch_idr to XArray
Matthew Wilcox [Tue, 8 Jan 2019 15:05:31 +0000 (10:05 -0500)]
rapidio: Convert ch_idr to XArray

Signed-off-by: Matthew Wilcox <willy@infradead.org>
5 years agox86,hyperv: Convert conn_to_evt to XArray
Matthew Wilcox [Sun, 6 Jan 2019 20:23:54 +0000 (15:23 -0500)]
x86,hyperv: Convert conn_to_evt to XArray

This IDR wasn't being used to allocate IDs, just as somewhere to store
pointers.  It moves out from under the protection of the mutex to its
own spinlock.

Signed-off-by: Matthew Wilcox <willy@infradead.org>
5 years agoscsi: Convert same_target_siblings to XArray
Matthew Wilcox [Thu, 15 Nov 2018 07:02:19 +0000 (02:02 -0500)]
scsi: Convert same_target_siblings to XArray

Generally each target has only one LUN, so the target will have a direct
pointer to the sdev.

Signed-off-by: Matthew Wilcox <willy@infradead.org>
5 years agofirewire: Convert resource_idr to XArray
Matthew Wilcox [Sat, 3 Nov 2018 12:57:46 +0000 (08:57 -0400)]
firewire: Convert resource_idr to XArray

Signed-off-by: Matthew Wilcox <willy@infradead.org>
5 years agodca: Convert dca_idr to IDA
Matthew Wilcox [Sat, 3 Nov 2018 03:17:29 +0000 (23:17 -0400)]
dca: Convert dca_idr to IDA

The DCA code never looks up the pointer it stores in the IDR, so it
can use the IDA which is more efficient and easier to use.

Signed-off-by: Matthew Wilcox <willy@infradead.org>
5 years agodm: Convert _minor_idr to XArray
Matthew Wilcox [Fri, 2 Nov 2018 03:26:21 +0000 (23:26 -0400)]
dm: Convert _minor_idr to XArray

Drop the use of the custom MINOR_ALLOCATED define in favour of using the
ability to allocate an index for a NULL pointer.  Rename the structure
to dm_minors.

It's probably possible to replace the _minor_lock with the xa_lock, but
it might be better to separate out the multiple things which are being
protected.

Signed-off-by: Matthew Wilcox <willy@infradead.org>
5 years agocgroup: Convert cgroup_hierarchy to XArray
Matthew Wilcox [Wed, 9 Jan 2019 18:31:15 +0000 (13:31 -0500)]
cgroup: Convert cgroup_hierarchy to XArray

Signed-off-by: Matthew Wilcox <willy@infradead.org>
5 years agocgroup: Convert css_idr to XArray
Matthew Wilcox [Sat, 3 Nov 2018 12:23:42 +0000 (08:23 -0400)]
cgroup: Convert css_idr to XArray

Remove the internal wrappers as the XArray behaves exactly how the
cgroup code wishes the IDR did.

Signed-off-by: Matthew Wilcox <willy@infradead.org>
5 years agocgroup: Convert cgroup_idr to XArray
Matthew Wilcox [Sat, 27 Oct 2018 03:24:58 +0000 (23:24 -0400)]
cgroup: Convert cgroup_idr to XArray

Signed-off-by: Matthew Wilcox <willy@infradead.org>
5 years agoipc: Convert ipcs_idr to XArray
Matthew Wilcox (Oracle) [Sun, 4 Aug 2019 11:20:30 +0000 (07:20 -0400)]
ipc: Convert ipcs_idr to XArray

The XArray has better loops than the IDR has, removing the need to
open-code them.  We also don't need to call idr_destroy() any more.
Allocating the ID is a little tricky due to needing to get 'seq'
correct.  Open-code a variant of __xa_alloc() which lets us set the
ID and the seq before depositing the pointer in the array.

Signed-off-by: Matthew Wilcox <willy@infradead.org>
5 years agoradix tree: Remove more unused functions
Matthew Wilcox [Mon, 29 Oct 2018 16:44:30 +0000 (12:44 -0400)]
radix tree: Remove more unused functions

radix_tree_insert, radix_tree_delete, radix_tree_tag_set and
radix_tree_tag_clear are all now unused.

Signed-off-by: Matthew Wilcox <willy@infradead.org>
5 years agoradix tree: Remove unused iteration code
Matthew Wilcox [Mon, 29 Oct 2018 16:26:24 +0000 (12:26 -0400)]
radix tree: Remove unused iteration code

The ability to iterate over tags or iterate contiguously,
radix_tree_iter_delete(), radix_tree_iter_resume(),
radix_tree_iter_retry() and radix_tree_iter_lookup() are all now unused.

Signed-off-by: Matthew Wilcox <willy@infradead.org>
5 years agoradix tree: Remove radix_tree_{insert,replace}_slot
Matthew Wilcox [Mon, 29 Oct 2018 16:10:21 +0000 (12:10 -0400)]
radix tree: Remove radix_tree_{insert,replace}_slot

Now unused.  Also radix_tree_deref_slot, radix_tree_deref_slot_protected,
radix_tree_deref_retry and radix_tree_exception.

Signed-off-by: Matthew Wilcox <willy@infradead.org>
5 years agoradix tree: Remove radix_tree_gang_lookup*
Matthew Wilcox [Mon, 29 Oct 2018 16:04:06 +0000 (12:04 -0400)]
radix tree: Remove radix_tree_gang_lookup*

Users of these functions have all been converted to use xa_extract().

Signed-off-by: Matthew Wilcox <willy@infradead.org>
5 years agoXArray: Remove radix tree compatibility
Matthew Wilcox [Mon, 17 Dec 2018 23:05:18 +0000 (18:05 -0500)]
XArray: Remove radix tree compatibility

The xa_flags field in the XArray was compatible with the radix tree
in order to make conversion easier.  With the page cache converted,
all future conversions will be done one data structure at a time, so
there is no more need for this compatibility.  This reduces the header
dependencies of the XArray to not require gfp.h, which would otherwise
introduce a header loop in a later patch.

Signed-off-by: Matthew Wilcox <willy@infradead.org>
5 years agoradix tree test suite: Convert to XArray
Matthew Wilcox [Mon, 29 Oct 2018 15:20:35 +0000 (11:20 -0400)]
radix tree test suite: Convert to XArray

With only the IDR remaining as a user of the radix tree API, convert
the non-IDR pieces of the radix tree test suite to the XArray API.

5 years agoradix tree test suite: Convert regression4 to XArray
Matthew Wilcox [Fri, 14 Dec 2018 19:36:47 +0000 (14:36 -0500)]
radix tree test suite: Convert regression4 to XArray

Signed-off-by: Matthew Wilcox <willy@infradead.org>
5 years agoradix tree test suite: Convert regression3 to XArray
Matthew Wilcox [Fri, 26 Oct 2018 03:22:20 +0000 (23:22 -0400)]
radix tree test suite: Convert regression3 to XArray

Move the test to the in-kernel test suite

Signed-off-by: Matthew Wilcox <willy@infradead.org>
5 years agopinctrl: Convert pin_desc_tree to XArray
Matthew Wilcox [Thu, 25 Oct 2018 20:50:34 +0000 (16:50 -0400)]
pinctrl: Convert pin_desc_tree to XArray

Straightforward conversion; no locking changes.

Signed-off-by: Matthew Wilcox <willy@infradead.org>
5 years agopinctrl: Convert pin_function_tree to XArray
Matthew Wilcox [Thu, 25 Oct 2018 20:42:48 +0000 (16:42 -0400)]
pinctrl: Convert pin_function_tree to XArray

Straightforward conversion; no locking changes.

Signed-off-by: Matthew Wilcox <willy@infradead.org>
5 years agopinctrl: Convert pin_group_tree to XArray
Matthew Wilcox [Thu, 25 Oct 2018 20:36:55 +0000 (16:36 -0400)]
pinctrl: Convert pin_group_tree to XArray

Straightforward conversion; no locking changes.

Signed-off-by: Matthew Wilcox <willy@infradead.org>
5 years agopowerpc: Remove obsolete radix-tree includes
Matthew Wilcox [Thu, 25 Oct 2018 19:38:24 +0000 (15:38 -0400)]
powerpc: Remove obsolete radix-tree includes

This code hasn't used the radix tree API since 2012.

Signed-off-by: Matthew Wilcox <willy@infradead.org>
5 years agoc6x: Remove unused radix-tree includes
Matthew Wilcox [Thu, 25 Oct 2018 19:36:42 +0000 (15:36 -0400)]
c6x: Remove unused radix-tree includes

These files do not use the radix tree API.

Signed-off-by: Matthew Wilcox <willy@infradead.org>
5 years agonvme target: Convert p2p_ns_map to XArray
Matthew Wilcox [Thu, 25 Oct 2018 18:05:37 +0000 (14:05 -0400)]
nvme target: Convert p2p_ns_map to XArray

Straightforward conversion, no locking changes.

Signed-off-by: Matthew Wilcox <willy@infradead.org>
5 years agodm-zoned-target: Convert to XArray
Matthew Wilcox [Thu, 25 Oct 2018 16:42:36 +0000 (12:42 -0400)]
dm-zoned-target: Convert to XArray

Switch the locking from a mutex to the xa spinlock.

Signed-off-by: Matthew Wilcox <willy@infradead.org>
5 years agopwm: Convert to XArray
Matthew Wilcox [Thu, 25 Oct 2018 16:22:46 +0000 (12:22 -0400)]
pwm: Convert to XArray

Straightforward conversion.

Signed-off-by: Matthew Wilcox <willy@infradead.org>
5 years agoscsi: tcmu: Convert to XArray
Matthew Wilcox [Wed, 24 Oct 2018 15:03:37 +0000 (11:03 -0400)]
scsi: tcmu: Convert to XArray

I used xa_for_each() instead of a counting loop which will speed up
deleting sparsely-populated devices.

Signed-off-by: Matthew Wilcox <willy@infradead.org>
5 years agoirqdesc: Convert to XArray
Matthew Wilcox [Wed, 24 Oct 2018 13:26:22 +0000 (09:26 -0400)]
irqdesc: Convert to XArray

There was no locking here to convert; possibly this is a bugfix, or
maybe simultaneous modification was excluded in some other way.

Signed-off-by: Matthew Wilcox <willy@infradead.org>
5 years agoocxl: Convert minors_idr to XArray
Matthew Wilcox [Mon, 18 Feb 2019 20:20:22 +0000 (15:20 -0500)]
ocxl: Convert minors_idr to XArray

Signed-off-by: Matthew Wilcox <willy@infradead.org>
5 years agoocxl: Convert contexts_idr to XArray
Matthew Wilcox [Mon, 18 Feb 2019 20:15:43 +0000 (15:15 -0500)]
ocxl: Convert contexts_idr to XArray

Signed-off-by: Matthew Wilcox <willy@infradead.org>
5 years agoocxl: Convert irq_idr to XArray
Matthew Wilcox [Mon, 18 Feb 2019 20:05:53 +0000 (15:05 -0500)]
ocxl: Convert irq_idr to XArray

Signed-off-by: Matthew Wilcox <willy@infradead.org>
5 years agoocxl: Convert pe_tree to XArray
Matthew Wilcox [Wed, 24 Oct 2018 12:00:04 +0000 (08:00 -0400)]
ocxl: Convert pe_tree to XArray

Straightforward conversion.

Signed-off-by: Matthew Wilcox <willy@infradead.org>
5 years agodma-debug: Convert to XArray
Matthew Wilcox [Thu, 18 Oct 2018 20:15:35 +0000 (16:15 -0400)]
dma-debug: Convert to XArray

The dma-debug code was using the radix tree tags in a tremendously
inefficient way.  Instead, chain dma entries which hit the same
cacheline just like the s390 and btrfs code do.

Signed-off-by: Matthew Wilcox <willy@infradead.org>
5 years agoradix tree: Remove preload API
Matthew Wilcox [Thu, 18 Oct 2018 19:39:00 +0000 (15:39 -0400)]
radix tree: Remove preload API

With all callers gone, we can remove the radix_tree_preload API.
The mechanism remains in order to support the IDR preload API.

Signed-off-by: Matthew Wilcox <willy@infradead.org>
5 years agoerofs: Convert workstn_tree to XArray
Matthew Wilcox [Thu, 18 Oct 2018 19:36:42 +0000 (15:36 -0400)]
erofs: Convert workstn_tree to XArray

Rename it to compression_work as a better reflection of what it's for.

Signed-off-by: Matthew Wilcox <willy@infradead.org>
5 years agohwspinlock: Convert to XArray
Matthew Wilcox [Wed, 17 Oct 2018 18:45:31 +0000 (14:45 -0400)]
hwspinlock: Convert to XArray

I had to mess with the locking a bit as I converted the code from a
mutex to the xa_lock.

Signed-off-by: Matthew Wilcox <willy@infradead.org>
5 years agoradix tree: Remove radix_tree_maybe_preload
Matthew Wilcox [Wed, 17 Oct 2018 18:43:43 +0000 (14:43 -0400)]
radix tree: Remove radix_tree_maybe_preload

This function is now unused; delete it.

Signed-off-by: Matthew Wilcox <willy@infradead.org>
5 years agomd: Convert raid5-cache to XArray
Matthew Wilcox [Wed, 17 Oct 2018 18:19:14 +0000 (14:19 -0400)]
md: Convert raid5-cache to XArray

This is the first user of the radix tree I've converted which was
storing numbers rather than pointers.  I'm fairly pleased with how
well it came out.  There's less boiler-plate involved than there was
with the radix tree, so that's a win.  It does use the advanced API,
and I think that's a signal that there needs to be a separate API for
using the XArray for only integers.

Signed-off-by: Matthew Wilcox <willy@infradead.org>
5 years agos390: Convert vsie to XArray
Matthew Wilcox [Wed, 24 Oct 2018 13:32:01 +0000 (09:32 -0400)]
s390: Convert vsie to XArray

No locking conversion, just using the new API.

Signed-off-by: Matthew Wilcox <willy@infradead.org>
5 years agos390: Convert gmap to XArray
Matthew Wilcox [Tue, 16 Oct 2018 21:01:23 +0000 (17:01 -0400)]
s390: Convert gmap to XArray

The three radix trees in gmap are all converted to the XArray.
This is another case where the multiple locks held mandates the use
of the xa_reserve() API.  The gmap_insert_rmap() function is
considerably simplified by using the advanced API;
gmap_radix_tree_free() turns out to just be xa_destroy(), and
gmap_rmap_radix_tree_free() is a nice little iteration followed
by xa_destroy().

Signed-off-by: Matthew Wilcox <willy@infradead.org>
5 years agoradix tree tests: Convert regression2 to XArray
Matthew Wilcox [Sat, 13 Oct 2018 11:47:30 +0000 (07:47 -0400)]
radix tree tests: Convert regression2 to XArray

The regression2 test was the last user of
radix_tree_gang_lookup_tag_slot() and was testing functionality that
was only used by the page cache, so it makes sense to convert it to
the XArray.  The actual bug that it attempts to catch was really in
radix_tree_range_tag_if_tagged() which was deleted months ago.

Signed-off-by: Matthew Wilcox <willy@infradead.org>
5 years agoxen: Convert pvcalls-back to XArray
Matthew Wilcox [Sun, 30 Sep 2018 04:12:02 +0000 (00:12 -0400)]
xen: Convert pvcalls-back to XArray

Pull the XArray out from under the semaphore as it is serialised by its
own spinlock.  In pvcalls_back_release(), it's more efficient to erase
the element than to load it then erase it if it was present.

Signed-off-by: Matthew Wilcox <willy@infradead.org>
5 years agosh: intc: Convert to XArray
Matthew Wilcox [Wed, 26 Sep 2018 15:02:10 +0000 (11:02 -0400)]
sh: intc: Convert to XArray

The radix tree was being protected by a raw spinlock.  I believe that
was not necessary, and the new internal regular spinlock will be
adequate for this array.

Signed-off-by: Matthew Wilcox <willy@infradead.org>
5 years agoirqdomain: Convert to XArray
Matthew Wilcox [Wed, 26 Sep 2018 12:26:00 +0000 (08:26 -0400)]
irqdomain: Convert to XArray

This is a pretty straightforward conversion; mostly just removing
now-redundant locking.  The only thing of note is just how much simpler
irq_domain_fix_revmap() becomes.

Signed-off-by: Matthew Wilcox <willy@infradead.org>
Acked-by: Marc Zyngier <marc.zyngier@arm.com>
5 years agovmalloc: Convert to XArray
Matthew Wilcox [Tue, 25 Sep 2018 22:05:32 +0000 (18:05 -0400)]
vmalloc: Convert to XArray

The radix tree of vmap blocks is simpler to express as an XArray.
Saves a couple of hundred bytes of text and eliminates a user of the
radix tree preload API.

Signed-off-by: Matthew Wilcox <willy@infradead.org>
5 years agomm: Convert cgroup writeback to XArray
Matthew Wilcox [Tue, 25 Sep 2018 22:06:27 +0000 (18:06 -0400)]
mm: Convert cgroup writeback to XArray

We're still under the protection of the cgwb_lock as well as the xa_lock.
It could probably be removed or reduced in scope in a few places, but
I'll leave that to someone who understands this code better than I do.

Signed-off-by: Matthew Wilcox <willy@infradead.org>
5 years agopid: Convert to XArray
Matthew Wilcox [Wed, 14 Nov 2018 13:52:14 +0000 (08:52 -0500)]
pid: Convert to XArray

The new semantics for xa_alloc_cyclic match the PID allocator much
better than the way the IDR cyclic allocation had evolved.

5 years agoaio: Convert ioctx_table to XArray
Matthew Wilcox [Wed, 14 Nov 2018 17:12:50 +0000 (12:12 -0500)]
aio: Convert ioctx_table to XArray

This custom resizing table can use an XArray and save a lot of lines of
code.

Signed-off-by: Matthew Wilcox <willy@infradead.org>
5 years agoMerge branches 'xa-block', 'xa-drm', 'xa-fs', 'xa-infiniband', 'xa-net', 'xa-scsi...
Matthew Wilcox (Oracle) [Thu, 8 Aug 2019 18:00:23 +0000 (14:00 -0400)]
Merge branches 'xa-block', 'xa-drm', 'xa-fs', 'xa-infiniband', 'xa-net', 'xa-scsi' and 'xa-usb' into xa-merge

5 years agoocfs2: Convert nn_status_idr to XArray
Matthew Wilcox [Mon, 18 Feb 2019 13:38:17 +0000 (08:38 -0500)]
ocfs2: Convert nn_status_idr to XArray

Signed-off-by: Matthew Wilcox <willy@infradead.org>
5 years agodlm: Convert recovery_idr to XArray
Matthew Wilcox [Tue, 12 Feb 2019 18:46:11 +0000 (13:46 -0500)]
dlm: Convert recovery_idr to XArray

Signed-off-by: Matthew Wilcox <willy@infradead.org>
5 years agodlm: Convert ls_lkbidr to XArray
Matthew Wilcox [Tue, 12 Feb 2019 16:28:15 +0000 (11:28 -0500)]
dlm: Convert ls_lkbidr to XArray

Signed-off-by: Matthew Wilcox <willy@infradead.org>
5 years agoinotify: Convert IDR of marks to XArray
Matthew Wilcox [Fri, 11 Jan 2019 20:05:50 +0000 (15:05 -0500)]
inotify: Convert IDR of marks to XArray

The IDR was being used in a somewhat complicated way where we'd look up
a mark to be deleted in the IDR, then pass it into the fsnotify machinery
which would pass the mark back to us, then we'd look it up again in order
to delete it.  Just deleting it from the XArray in the first place lets
us simplify the reference counting tremendously.

Signed-off-by: Matthew Wilcox <willy@infradead.org>
5 years agonfsd: Convert s2s_cp_stateids to XArray
Matthew Wilcox [Wed, 9 Jan 2019 20:34:09 +0000 (15:34 -0500)]
nfsd: Convert s2s_cp_stateids to XArray

Signed-off-by: Matthew Wilcox <willy@infradead.org>
5 years agonfsd: Convert cl_stateids to XArray
Matthew Wilcox [Wed, 9 Jan 2019 18:47:19 +0000 (13:47 -0500)]
nfsd: Convert cl_stateids to XArray

Signed-off-by: Matthew Wilcox <willy@infradead.org>
5 years agonfs: Convert cb_ident_idr to XArray
Matthew Wilcox [Sat, 3 Nov 2018 16:14:05 +0000 (12:14 -0400)]
nfs: Convert cb_ident_idr to XArray

Rename it to cb_ids.  The XArray does not need a 'destroy' function to
be called, so remove all trace of nfs_cleanup_cb_ident_idr().  Pass the
nfs_net parameter to nfs_cb_id_remove_locked() so it doesn't have to
look that up again.

Signed-off-by: Matthew Wilcox <willy@infradead.org>
5 years agokernfs: Convert to XArray
Matthew Wilcox [Wed, 9 Jan 2019 18:00:22 +0000 (13:00 -0500)]
kernfs: Convert to XArray

Signed-off-by: Matthew Wilcox <willy@infradead.org>
5 years agofscache: Convert to XArray
Matthew Wilcox [Wed, 26 Sep 2018 14:21:30 +0000 (10:21 -0400)]
fscache: Convert to XArray

Use the advanced API for this conversion for efficiency.
Removes another user of radix_tree_preload().

Signed-off-by: Matthew Wilcox <willy@infradead.org>
5 years agof2fs: Convert nat_root to XArray
Matthew Wilcox [Thu, 18 Oct 2018 19:06:36 +0000 (15:06 -0400)]
f2fs: Convert nat_root to XArray

Leave the locking unchanged, although I suspect nat_tree_lock
could probably now be removed or at least narrowed in scope.

Signed-off-by: Matthew Wilcox <willy@infradead.org>
5 years agof2fs: Convert nat_set_root to XArray
Matthew Wilcox [Thu, 18 Oct 2018 18:18:11 +0000 (14:18 -0400)]
f2fs: Convert nat_set_root to XArray

Rename it to nat_set_cache.  The locking is unadjusted here; this
xa_lock nests under the nat_tree_lock mutex.

Signed-off-by: Matthew Wilcox <willy@infradead.org>
5 years agof2fs: Rewrite the free NID cache
Matthew Wilcox [Wed, 17 Oct 2018 19:52:06 +0000 (15:52 -0400)]
f2fs: Rewrite the free NID cache

There's no need to allocate a free_nid data structure; we only need to
store three states per ID, which we can do much more efficiently with
the XArray.

Signed-off-by: Matthew Wilcox <willy@infradead.org>
5 years agof2fs: Convert gclist.iroot to XArray
Matthew Wilcox [Wed, 17 Oct 2018 19:36:23 +0000 (15:36 -0400)]
f2fs: Convert gclist.iroot to XArray

Straightforward conversion.

Signed-off-by: Matthew Wilcox <willy@infradead.org>
5 years agousb/serial: Convert serial_minors to XArray
Matthew Wilcox [Mon, 18 Feb 2019 23:52:49 +0000 (18:52 -0500)]
usb/serial: Convert serial_minors to XArray

Signed-off-by: Matthew Wilcox <willy@infradead.org>
5 years agousb: Convert usb_bus_idr to XArray
Matthew Wilcox [Mon, 18 Feb 2019 23:44:50 +0000 (18:44 -0500)]
usb: Convert usb_bus_idr to XArray

Remove the usb_bus_idr_lock as it doesn't appear to be protecting
anything more than the built-in XArray lock does.

Signed-off-by: Matthew Wilcox <willy@infradead.org>
5 years agocdc-acm: Convert acm_minors to XArray
Matthew Wilcox [Mon, 18 Feb 2019 23:08:09 +0000 (18:08 -0500)]
cdc-acm: Convert acm_minors to XArray

Signed-off-by: Matthew Wilcox <willy@infradead.org>
5 years agousb: Convert xhci-mem to XArray
Matthew Wilcox [Wed, 26 Sep 2018 12:23:14 +0000 (08:23 -0400)]
usb: Convert xhci-mem to XArray

The XArray API is a better fit for xhci than the radix tree API was,
to the point where we can remove the wrappers around the radix tree
and just call the XArray APIs directly.

Signed-off-by: Matthew Wilcox <willy@infradead.org>
5 years agocxlflash: Convert context idr to an IDA
Matthew Wilcox [Sun, 10 Feb 2019 17:12:38 +0000 (12:12 -0500)]
cxlflash: Convert context idr to an IDA

This driver does not look up the pointers it stores, so it can use the
IDA instead of the IDR or XArray, consuming less memory.  Also actually
store the max instead of one greater than the max in the variable
called pasid_max.

Signed-off-by: Matthew Wilcox <willy@infradead.org>
5 years agobfad: Convert bfad_im_port_index to IDA
Matthew Wilcox [Sun, 10 Feb 2019 12:01:59 +0000 (07:01 -0500)]
bfad: Convert bfad_im_port_index to IDA

Also remove the unused bfad_list.

Signed-off-by: Matthew Wilcox <willy@infradead.org>
5 years agolpfc: Convert hba_index to IDA
Matthew Wilcox [Sun, 10 Feb 2019 11:21:25 +0000 (06:21 -0500)]
lpfc: Convert hba_index to IDA

Signed-off-by: Matthew Wilcox <willy@infradead.org>
5 years agoch: Convert ch_index_idr to XArray
Matthew Wilcox [Sun, 10 Feb 2019 11:33:09 +0000 (06:33 -0500)]
ch: Convert ch_index_idr to XArray

Signed-off-by: Matthew Wilcox <willy@infradead.org>
5 years agosg: Convert sg_index_idr to XArray
Matthew Wilcox [Sun, 10 Feb 2019 16:36:49 +0000 (11:36 -0500)]
sg: Convert sg_index_idr to XArray

Signed-off-by: Matthew Wilcox <willy@infradead.org>
5 years agost: Convert to XArray
Matthew Wilcox [Fri, 26 Oct 2018 13:18:32 +0000 (09:18 -0400)]
st: Convert to XArray

Replace the st_index_idr with an XArray.

Signed-off-by: Matthew Wilcox <willy@infradead.org>
5 years agodrm: idr_init_base todo item is done
Matthew Wilcox [Tue, 19 Feb 2019 01:30:51 +0000 (20:30 -0500)]
drm: idr_init_base todo item is done

Signed-off-by: Matthew Wilcox <willy@infradead.org>
5 years agodrm/vmwgfx: Convert res_idr to XArray
Matthew Wilcox [Fri, 15 Feb 2019 04:11:53 +0000 (23:11 -0500)]
drm/vmwgfx: Convert res_idr to XArray

Signed-off-by: Matthew Wilcox <willy@infradead.org>
5 years agodrm/vmwgfx: Convert base IDR to XArray
Matthew Wilcox [Thu, 14 Feb 2019 21:59:32 +0000 (16:59 -0500)]
drm/vmwgfx: Convert base IDR to XArray

Signed-off-by: Matthew Wilcox <willy@infradead.org>
5 years agodrm/via: Convert object_idr to XArray
Matthew Wilcox [Mon, 18 Feb 2019 18:31:38 +0000 (13:31 -0500)]
drm/via: Convert object_idr to XArray

Signed-off-by: Matthew Wilcox <willy@infradead.org>
5 years agodrm/vgem: Convert fence_idr to XArray
Matthew Wilcox [Thu, 14 Feb 2019 17:59:43 +0000 (12:59 -0500)]
drm/vgem: Convert fence_idr to XArray

Signed-off-by: Matthew Wilcox <willy@infradead.org>
5 years agodrm/sis: Convert object_idr to XArray
Matthew Wilcox [Mon, 18 Feb 2019 18:26:30 +0000 (13:26 -0500)]
drm/sis: Convert object_idr to XArray

Signed-off-by: Matthew Wilcox <willy@infradead.org>
5 years agodrm/vc4: Convert perfmon IDR to XArray
Matthew Wilcox [Fri, 15 Feb 2019 19:13:49 +0000 (14:13 -0500)]
drm/vc4: Convert perfmon IDR to XArray

Signed-off-by: Matthew Wilcox <willy@infradead.org>
5 years agodrm/tegra: Convert contexts IDR to XArray
Matthew Wilcox [Fri, 15 Feb 2019 19:08:31 +0000 (14:08 -0500)]
drm/tegra: Convert contexts IDR to XArray

Signed-off-by: Matthew Wilcox <willy@infradead.org>
5 years agodrm/qxl: Convert surf_id_idr to XArray
Matthew Wilcox [Thu, 14 Feb 2019 17:52:19 +0000 (12:52 -0500)]
drm/qxl: Convert surf_id_idr to XArray

Signed-off-by: Matthew Wilcox <willy@infradead.org>
5 years agodrm/qxl: Convert release_idr to XArray
Matthew Wilcox [Thu, 14 Feb 2019 21:55:20 +0000 (16:55 -0500)]
drm/qxl: Convert release_idr to XArray

Signed-off-by: Matthew Wilcox <willy@infradead.org>
5 years agodrm/i915: Convert cachelines radix tree to XArray
Matthew Wilcox [Thu, 14 Mar 2019 02:55:56 +0000 (22:55 -0400)]
drm/i915: Convert cachelines radix tree to XArray

Signed-off-by: Matthew Wilcox <willy@infradead.org>
5 years agodrm/i915: Convert vgpus_idr to XArray
Matthew Wilcox [Mon, 18 Feb 2019 18:22:36 +0000 (13:22 -0500)]
drm/i915: Convert vgpus_idr to XArray

Signed-off-by: Matthew Wilcox <willy@infradead.org>
5 years agodrm/i915: Convert metrics_idr to XArray
Matthew Wilcox [Fri, 15 Feb 2019 19:03:55 +0000 (14:03 -0500)]
drm/i915: Convert metrics_idr to XArray

Signed-off-by: Matthew Wilcox <willy@infradead.org>
5 years agodrm/i915: Convert vm_idr to XArray
Matthew Wilcox (Oracle) [Wed, 15 May 2019 17:35:38 +0000 (13:35 -0400)]
drm/i915: Convert vm_idr to XArray

Rename vm_idr to vms and remove the mutex protecting it.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
5 years agodrm/i915: Convert context_idr to XArray
Matthew Wilcox [Fri, 15 Feb 2019 19:03:41 +0000 (14:03 -0500)]
drm/i915: Convert context_idr to XArray

Signed-off-by: Matthew Wilcox <willy@infradead.org>
5 years agodrm/i915: Convert object_idr to IDA
Matthew Wilcox [Mon, 18 Feb 2019 16:04:18 +0000 (11:04 -0500)]
drm/i915: Convert object_idr to IDA

I suspect dmabuf_obj_list_head and object_ids should be combined into
a single xarray, but that's a job for later.

Signed-off-by: Matthew Wilcox <willy@infradead.org>
5 years agodrm/i915: Convert get_page to XArray
Matthew Wilcox [Wed, 24 Oct 2018 19:33:54 +0000 (15:33 -0400)]
drm/i915: Convert get_page to XArray

This initially seemed like an ideal use-case for the store_range
functionality, but there's no easy way to determine where we were
relative to the base of the entry.  So this is a straightforward
conversion which doesn't even touch the locking.

Signed-off-by: Matthew Wilcox <willy@infradead.org>
5 years agodrm/i915: Convert page_track_tree to XArray
Matthew Wilcox [Wed, 24 Oct 2018 17:51:16 +0000 (13:51 -0400)]
drm/i915: Convert page_track_tree to XArray

No locking changes.

Signed-off-by: Matthew Wilcox <willy@infradead.org>
5 years agodrm/i915: Convert spt_tree to XArray
Matthew Wilcox [Tue, 23 Oct 2018 18:36:36 +0000 (14:36 -0400)]
drm/i915: Convert spt_tree to XArray

A straightforward conversion.  Notice the XArray does not suffer from
exposing the RCU problem to its users like the radix tree did.

Signed-off-by: Matthew Wilcox <willy@infradead.org>
5 years agodrm/i915: Convert handles_vma to XArray
Matthew Wilcox [Wed, 26 Sep 2018 15:11:14 +0000 (11:11 -0400)]
drm/i915: Convert handles_vma to XArray

Straightforward conversion.

Signed-off-by: Matthew Wilcox <willy@infradead.org>
5 years agodrm/etnaviv: Convert fence_idr to XArray
Matthew Wilcox [Tue, 8 Jan 2019 14:28:28 +0000 (09:28 -0500)]
drm/etnaviv: Convert fence_idr to XArray

Signed-off-by: Matthew Wilcox <willy@infradead.org>
5 years agodrm/amdkfd: Convert alloc_idr to XArray
Matthew Wilcox [Mon, 18 Feb 2019 13:25:32 +0000 (08:25 -0500)]
drm/amdkfd: Convert alloc_idr to XArray

Signed-off-by: Matthew Wilcox <willy@infradead.org>
5 years agodrm/amdkfd: Convert event_idr to XArray
Matthew Wilcox [Mon, 18 Feb 2019 13:14:28 +0000 (08:14 -0500)]
drm/amdkfd: Convert event_idr to XArray

Signed-off-by: Matthew Wilcox <willy@infradead.org>
5 years agodrm/amdgpu: Convert pasid_idr to XArray
Matthew Wilcox [Mon, 18 Feb 2019 12:37:03 +0000 (07:37 -0500)]
drm/amdgpu: Convert pasid_idr to XArray

Signed-off-by: Matthew Wilcox <willy@infradead.org>
5 years agodrm/amdgpu: Convert ctx_handles to XArray
Matthew Wilcox [Sat, 16 Feb 2019 04:49:56 +0000 (23:49 -0500)]
drm/amdgpu: Convert ctx_handles to XArray

Signed-off-by: Matthew Wilcox <willy@infradead.org>
5 years agodrm/amdgpu: Convert bo_list_handles to XArray
Matthew Wilcox [Thu, 14 Feb 2019 17:36:10 +0000 (12:36 -0500)]
drm/amdgpu: Convert bo_list_handles to XArray

Signed-off-by: Matthew Wilcox <willy@infradead.org>