Re: [PATCH] xarray: Document erasing entries during iteration

2019-02-16 Thread Wei Yang
On Thu, Feb 14, 2019 at 02:33:00PM -0800, Matthew Wilcox wrote: >On Thu, Feb 14, 2019 at 10:16:52PM +, Wei Yang wrote: >> On Wed, Feb 13, 2019 at 08:12:58AM -0800, Matthew Wilcox wrote: >> >The only remaining user of the radix tree in that tree is the IDR. So >> >now I'm converting the IDR use

Re: [PATCH] xarray: Document erasing entries during iteration

2019-02-14 Thread Matthew Wilcox
On Thu, Feb 14, 2019 at 10:16:52PM +, Wei Yang wrote: > On Wed, Feb 13, 2019 at 08:12:58AM -0800, Matthew Wilcox wrote: > >The only remaining user of the radix tree in that tree is the IDR. So > >now I'm converting the IDR users over to the XArray as well. > > Wow, really a HUGE work. Yes ..

Re: [PATCH] xarray: Document erasing entries during iteration

2019-02-14 Thread Wei Yang
On Wed, Feb 13, 2019 at 08:12:58AM -0800, Matthew Wilcox wrote: >On Wed, Feb 13, 2019 at 02:47:44PM +, Wei Yang wrote: >> On Tue, Feb 12, 2019 at 05:51:29AM -0800, Matthew Wilcox wrote: >> >That is _fine_. As you know I hope to get rid of the radix tree soon ;-) >> >> You mean replace radix t

Re: [PATCH] xarray: Document erasing entries during iteration

2019-02-13 Thread Matthew Wilcox
On Wed, Feb 13, 2019 at 02:47:44PM +, Wei Yang wrote: > On Tue, Feb 12, 2019 at 05:51:29AM -0800, Matthew Wilcox wrote: > >That is _fine_. As you know I hope to get rid of the radix tree soon ;-) > > You mean replace radix tree in whole kernel? That would be a big effort. Already mostly done

Re: [PATCH] xarray: Document erasing entries during iteration

2019-02-13 Thread Wei Yang
On Tue, Feb 12, 2019 at 05:51:29AM -0800, Matthew Wilcox wrote: >On Tue, Feb 12, 2019 at 06:29:58PM +1100, Tobin C. Harding wrote: >> I had my first go using the XArray today and during that I wondered if >> it was safe to remove items during iteration. Conceptually it seems >> fine and it seemed

Re: [PATCH] xarray: Document erasing entries during iteration

2019-02-12 Thread Tobin C. Harding
On Tue, Feb 12, 2019 at 06:29:58PM +1100, Tobin C. Harding wrote: > The XArray is, in a way, a replacement data structure for linked lists, > as such, on first use developers may wonder if it is safe to remove > items while iterating over the array. > > For example, this is fine: > > DEFINE

Re: [PATCH] xarray: Document erasing entries during iteration

2019-02-12 Thread Matthew Wilcox
On Tue, Feb 12, 2019 at 06:29:58PM +1100, Tobin C. Harding wrote: > I had my first go using the XArray today and during that I wondered if > it was safe to remove items during iteration. Conceptually it seems > fine and it seemed to work just fine in code - is this something people > should not be