Re: XArray documentation

2017-11-24 Thread Matthew Wilcox
On Fri, Nov 24, 2017 at 11:02:41PM +0100, Martin Steigerwald wrote: > I like this. > > I bet I may not be able help much further with it other than to possibly > proofread it tomorrow. > > Thank you for considering my suggestion. Not at all; your feedback has significantly improved this documen

Re: XArray documentation

2017-11-24 Thread Martin Steigerwald
Matthew Wilcox - 24.11.17, 22:18: > On Fri, Nov 24, 2017 at 07:01:31PM +0100, Martin Steigerwald wrote: > > > The XArray is an abstract data type which behaves like an infinitely > > > large array of pointers. The index into the array is an unsigned long. > > > A freshly-initialised XArray contain

Re: XArray documentation

2017-11-24 Thread Matthew Wilcox
On Fri, Nov 24, 2017 at 07:01:31PM +0100, Martin Steigerwald wrote: > > The XArray is an abstract data type which behaves like an infinitely > > large array of pointers. The index into the array is an unsigned long. > > A freshly-initialised XArray contains a NULL pointer at every index. > > Yes,

Re: XArray documentation

2017-11-24 Thread Matthew Wilcox
On Fri, Nov 24, 2017 at 11:48:49AM -0800, Shakeel Butt wrote: > Adding on to Martin's questions. Basically what is the motivation > behind it? It seems like a replacement for radix tree, so, it would be > good to write why radix tree was not good enough or which use cases > radix tree could not sol

Re: XArray documentation

2017-11-24 Thread Shakeel Butt
On Fri, Nov 24, 2017 at 10:01 AM, Martin Steigerwald wrote: > Hi Matthew. > > Matthew Wilcox - 24.11.17, 18:03: >> On Fri, Nov 24, 2017 at 05:50:41PM +0100, Martin Steigerwald wrote: >> > Matthew Wilcox - 24.11.17, 02:16: >> > > == >> > > XArray >> > > == >> > > >> > > Overview >> > >

Re: XArray documentation

2017-11-24 Thread Martin Steigerwald
Hi Matthew. Matthew Wilcox - 24.11.17, 18:03: > On Fri, Nov 24, 2017 at 05:50:41PM +0100, Martin Steigerwald wrote: > > Matthew Wilcox - 24.11.17, 02:16: > > > == > > > XArray > > > == > > > > > > Overview > > > > > > > > > The XArray is an array of ULONG_MAX entries. Each entr

Re: XArray documentation

2017-11-24 Thread Matthew Wilcox
On Thu, Nov 23, 2017 at 09:30:21PM -0700, Andreas Dilger wrote: > > Pointers to be stored in the XArray must have the bottom two bits clear > > (ie must point to something which is 4-byte aligned). This includes all > > objects allocated by calling :c:func:`kmalloc` and :c:func:`alloc_page`, > > b

Re: XArray documentation

2017-11-24 Thread Matthew Wilcox
On Fri, Nov 24, 2017 at 05:50:41PM +0100, Martin Steigerwald wrote: > Matthew Wilcox - 24.11.17, 02:16: > > == > > XArray > > == > > > > Overview > > > > > > The XArray is an array of ULONG_MAX entries. Each entry can be either > > a pointer, or an encoded value between 0 and LO

Re: XArray documentation

2017-11-24 Thread Martin Steigerwald
Hello Matthew. Matthew Wilcox - 24.11.17, 02:16: > == > XArray > == > > Overview > > > The XArray is an array of ULONG_MAX entries. Each entry can be either > a pointer, or an encoded value between 0 and LONG_MAX. It is efficient > when the indices used are densely clustered;

Re: XArray documentation

2017-11-23 Thread Andreas Dilger
On Nov 23, 2017, at 6:16 PM, Matthew Wilcox wrote: > > Here's the current state of the documentation for the XArray. Suggestions > for improvement gratefully received. > > == > XArray > == > > Overview > > > The XArray is an array of ULONG_MAX entries. Each entry can be eith

XArray documentation

2017-11-23 Thread Matthew Wilcox
Here's the current state of the documentation for the XArray. Suggestions for improvement gratefully received. == XArray == Overview The XArray is an array of ULONG_MAX entries. Each entry can be either a pointer, or an encoded value between 0 and LONG_MAX. It is efficient wh