Re: [PATCH 1/7] genalloc: track beginning of allocations

2018-03-07 Thread Mike Rapoprt
On March 7, 2018 4:48:25 PM GMT+02:00, Igor Stoppa wrote: > > >On 06/03/18 15:19, Mike Rapoport wrote: >> On Wed, Feb 28, 2018 at 10:06:14PM +0200, Igor Stoppa wrote: > >[...] > >> If I'm not mistaken, several kernel-doc descriptions are duplicated >now. >> Can you

Re: [PATCH 1/7] genalloc: track beginning of allocations

2018-03-07 Thread Mike Rapoprt
On March 7, 2018 4:48:25 PM GMT+02:00, Igor Stoppa wrote: > > >On 06/03/18 15:19, Mike Rapoport wrote: >> On Wed, Feb 28, 2018 at 10:06:14PM +0200, Igor Stoppa wrote: > >[...] > >> If I'm not mistaken, several kernel-doc descriptions are duplicated >now. >> Can you please keep a single copy?

Re: [PATCH 1/7] genalloc: track beginning of allocations

2018-03-07 Thread Igor Stoppa
On 07/03/18 16:48, Igor Stoppa wrote: > > > On 06/03/18 15:19, Mike Rapoport wrote: >> On Wed, Feb 28, 2018 at 10:06:14PM +0200, Igor Stoppa wrote: [...] >>> + * get_boundary() - verifies address, then measure length. >> >> There's some lack of consistency between the name and implementation

Re: [PATCH 1/7] genalloc: track beginning of allocations

2018-03-07 Thread Igor Stoppa
On 07/03/18 16:48, Igor Stoppa wrote: > > > On 06/03/18 15:19, Mike Rapoport wrote: >> On Wed, Feb 28, 2018 at 10:06:14PM +0200, Igor Stoppa wrote: [...] >>> + * get_boundary() - verifies address, then measure length. >> >> There's some lack of consistency between the name and implementation

Re: [PATCH 1/7] genalloc: track beginning of allocations

2018-03-07 Thread Igor Stoppa
On 06/03/18 15:19, Mike Rapoport wrote: > On Wed, Feb 28, 2018 at 10:06:14PM +0200, Igor Stoppa wrote: [...] > If I'm not mistaken, several kernel-doc descriptions are duplicated now. > Can you please keep a single copy? ;-) What's the preferred approach? Document the functions that are API

Re: [PATCH 1/7] genalloc: track beginning of allocations

2018-03-07 Thread Igor Stoppa
On 06/03/18 15:19, Mike Rapoport wrote: > On Wed, Feb 28, 2018 at 10:06:14PM +0200, Igor Stoppa wrote: [...] > If I'm not mistaken, several kernel-doc descriptions are duplicated now. > Can you please keep a single copy? ;-) What's the preferred approach? Document the functions that are API

Re: [PATCH 1/7] genalloc: track beginning of allocations

2018-03-07 Thread Igor Stoppa
On 06/03/18 18:05, Igor Stoppa wrote: > On 06/03/2018 16:10, Matthew Wilcox wrote: [...] >> This seems unnecessarily complicated. > > TBH it seemed to me a natural extension of the existing encoding :-) BTW, to provide some background, this is where it begun:

Re: [PATCH 1/7] genalloc: track beginning of allocations

2018-03-07 Thread Igor Stoppa
On 06/03/18 18:05, Igor Stoppa wrote: > On 06/03/2018 16:10, Matthew Wilcox wrote: [...] >> This seems unnecessarily complicated. > > TBH it seemed to me a natural extension of the existing encoding :-) BTW, to provide some background, this is where it begun:

Re: [PATCH 1/7] genalloc: track beginning of allocations

2018-03-06 Thread Igor Stoppa
On 05/03/2018 21:00, J Freyensee wrote: > . > . > > > On 2/28/18 12:06 PM, Igor Stoppa wrote: >> + >> +/** >> + * gen_pool_dma_alloc() - allocate special memory from the pool for DMA >> usage >> + * @pool: pool to allocate from >> + * @size: number of bytes to allocate from the pool >> + *

Re: [PATCH 1/7] genalloc: track beginning of allocations

2018-03-06 Thread Igor Stoppa
On 05/03/2018 21:00, J Freyensee wrote: > . > . > > > On 2/28/18 12:06 PM, Igor Stoppa wrote: >> + >> +/** >> + * gen_pool_dma_alloc() - allocate special memory from the pool for DMA >> usage >> + * @pool: pool to allocate from >> + * @size: number of bytes to allocate from the pool >> + *

Re: [PATCH 1/7] genalloc: track beginning of allocations

2018-03-06 Thread Igor Stoppa
On 06/03/2018 16:10, Matthew Wilcox wrote: > On Wed, Feb 28, 2018 at 10:06:14PM +0200, Igor Stoppa wrote: >> + * Encoding of the bitmap tracking the allocations >> + * --- >> + * >> + * The bitmap is composed of units of allocations. >> + * >> + * Each

Re: [PATCH 1/7] genalloc: track beginning of allocations

2018-03-06 Thread Igor Stoppa
On 06/03/2018 16:10, Matthew Wilcox wrote: > On Wed, Feb 28, 2018 at 10:06:14PM +0200, Igor Stoppa wrote: >> + * Encoding of the bitmap tracking the allocations >> + * --- >> + * >> + * The bitmap is composed of units of allocations. >> + * >> + * Each

Re: [PATCH 1/7] genalloc: track beginning of allocations

2018-03-06 Thread Matthew Wilcox
On Tue, Mar 06, 2018 at 02:19:03PM +0100, Mike Rapoport wrote: > > +/** > > + * gen_pool_create() - create a new special memory pool > > + * @min_alloc_order: log base 2 of number of bytes each bitmap entry > > + * represents > > + * @nid: node id of the node the pool structure should

Re: [PATCH 1/7] genalloc: track beginning of allocations

2018-03-06 Thread Matthew Wilcox
On Tue, Mar 06, 2018 at 02:19:03PM +0100, Mike Rapoport wrote: > > +/** > > + * gen_pool_create() - create a new special memory pool > > + * @min_alloc_order: log base 2 of number of bytes each bitmap entry > > + * represents > > + * @nid: node id of the node the pool structure should

Re: [PATCH 1/7] genalloc: track beginning of allocations

2018-03-06 Thread Matthew Wilcox
On Wed, Feb 28, 2018 at 10:06:14PM +0200, Igor Stoppa wrote: > + * Encoding of the bitmap tracking the allocations > + * --- > + * > + * The bitmap is composed of units of allocations. > + * > + * Each unit of allocation is represented using 2

Re: [PATCH 1/7] genalloc: track beginning of allocations

2018-03-06 Thread Matthew Wilcox
On Wed, Feb 28, 2018 at 10:06:14PM +0200, Igor Stoppa wrote: > + * Encoding of the bitmap tracking the allocations > + * --- > + * > + * The bitmap is composed of units of allocations. > + * > + * Each unit of allocation is represented using 2

Re: [PATCH 1/7] genalloc: track beginning of allocations

2018-03-06 Thread Mike Rapoport
On Wed, Feb 28, 2018 at 10:06:14PM +0200, Igor Stoppa wrote: > The genalloc library is only capable of tracking if a certain unit of > allocation is in use or not. > > It is not capable of discerning where the memory associated to an > allocation request begins and where it ends. > > The reason

Re: [PATCH 1/7] genalloc: track beginning of allocations

2018-03-06 Thread Mike Rapoport
On Wed, Feb 28, 2018 at 10:06:14PM +0200, Igor Stoppa wrote: > The genalloc library is only capable of tracking if a certain unit of > allocation is in use or not. > > It is not capable of discerning where the memory associated to an > allocation request begins and where it ends. > > The reason

Re: [PATCH 1/7] genalloc: track beginning of allocations

2018-03-05 Thread J Freyensee
. . On 2/28/18 12:06 PM, Igor Stoppa wrote: + +/** + * gen_pool_dma_alloc() - allocate special memory from the pool for DMA usage + * @pool: pool to allocate from + * @size: number of bytes to allocate from the pool + * @dma: dma-view physical address return value. Use NULL if unneeded. + * +

Re: [PATCH 1/7] genalloc: track beginning of allocations

2018-03-05 Thread J Freyensee
. . On 2/28/18 12:06 PM, Igor Stoppa wrote: + +/** + * gen_pool_dma_alloc() - allocate special memory from the pool for DMA usage + * @pool: pool to allocate from + * @size: number of bytes to allocate from the pool + * @dma: dma-view physical address return value. Use NULL if unneeded. + * +

Re: [PATCH 1/7] genalloc: track beginning of allocations

2018-03-02 Thread kbuild test robot
Hi Igor, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on next-20180223] [also build test WARNING on v4.16-rc3] [cannot apply to linus/master mmotm/master char-misc/char-misc-testing v4.16-rc3 v4.16-rc2 v4.16-rc1] [if your patch is applied to the wrong git

Re: [PATCH 1/7] genalloc: track beginning of allocations

2018-03-02 Thread kbuild test robot
Hi Igor, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on next-20180223] [also build test WARNING on v4.16-rc3] [cannot apply to linus/master mmotm/master char-misc/char-misc-testing v4.16-rc3 v4.16-rc2 v4.16-rc1] [if your patch is applied to the wrong git

Re: [PATCH 1/7] genalloc: track beginning of allocations

2018-03-02 Thread kbuild test robot
Hi Igor, Thank you for the patch! Yet something to improve: [auto build test ERROR on next-20180223] [also build test ERROR on v4.16-rc3] [cannot apply to linus/master mmotm/master char-misc/char-misc-testing v4.16-rc3 v4.16-rc2 v4.16-rc1] [if your patch is applied to the wrong git tree, please

Re: [PATCH 1/7] genalloc: track beginning of allocations

2018-03-02 Thread kbuild test robot
Hi Igor, Thank you for the patch! Yet something to improve: [auto build test ERROR on next-20180223] [also build test ERROR on v4.16-rc3] [cannot apply to linus/master mmotm/master char-misc/char-misc-testing v4.16-rc3 v4.16-rc2 v4.16-rc1] [if your patch is applied to the wrong git tree, please

[PATCH 1/7] genalloc: track beginning of allocations

2018-02-28 Thread Igor Stoppa
The genalloc library is only capable of tracking if a certain unit of allocation is in use or not. It is not capable of discerning where the memory associated to an allocation request begins and where it ends. The reason is that units of allocations are tracked by using a bitmap, where each bit

[PATCH 1/7] genalloc: track beginning of allocations

2018-02-28 Thread Igor Stoppa
The genalloc library is only capable of tracking if a certain unit of allocation is in use or not. It is not capable of discerning where the memory associated to an allocation request begins and where it ends. The reason is that units of allocations are tracked by using a bitmap, where each bit

Re: [PATCH 1/7] genalloc: track beginning of allocations

2018-02-26 Thread Igor Stoppa
On 26/02/18 19:32, J Freyensee wrote: > My replies also inlined. > > On 2/26/18 4:09 AM, Igor Stoppa wrote: [...] > But some of the code looks API'like to me, partly because of > all the function header documentation, which thank you for that, but I > wasn't sure where you drew your "API

Re: [PATCH 1/7] genalloc: track beginning of allocations

2018-02-26 Thread Igor Stoppa
On 26/02/18 19:32, J Freyensee wrote: > My replies also inlined. > > On 2/26/18 4:09 AM, Igor Stoppa wrote: [...] > But some of the code looks API'like to me, partly because of > all the function header documentation, which thank you for that, but I > wasn't sure where you drew your "API

Re: [PATCH 1/7] genalloc: track beginning of allocations

2018-02-26 Thread J Freyensee
My replies also inlined. On 2/26/18 4:09 AM, Igor Stoppa wrote: Hello, and thanks for the reviews, my replies inlined below. On 24/02/18 00:28, J Freyensee wrote: some code snipping . . . +/** + * get_bitmap_entry() - extracts the specified entry from the bitmap + * @map: pointer to a bitmap

Re: [PATCH 1/7] genalloc: track beginning of allocations

2018-02-26 Thread J Freyensee
My replies also inlined. On 2/26/18 4:09 AM, Igor Stoppa wrote: Hello, and thanks for the reviews, my replies inlined below. On 24/02/18 00:28, J Freyensee wrote: some code snipping . . . +/** + * get_bitmap_entry() - extracts the specified entry from the bitmap + * @map: pointer to a bitmap

Re: [PATCH 1/7] genalloc: track beginning of allocations

2018-02-26 Thread Igor Stoppa
Hello, and thanks for the reviews, my replies inlined below. On 24/02/18 00:28, J Freyensee wrote: > some code snipping > . > . > . >> +/** >> + * get_bitmap_entry() - extracts the specified entry from the bitmap >> + * @map: pointer to a bitmap >> + * @entry_index: the index of the desired entry

Re: [PATCH 1/7] genalloc: track beginning of allocations

2018-02-26 Thread Igor Stoppa
Hello, and thanks for the reviews, my replies inlined below. On 24/02/18 00:28, J Freyensee wrote: > some code snipping > . > . > . >> +/** >> + * get_bitmap_entry() - extracts the specified entry from the bitmap >> + * @map: pointer to a bitmap >> + * @entry_index: the index of the desired entry

Re: [PATCH 1/7] genalloc: track beginning of allocations

2018-02-24 Thread kbuild test robot
Hi Igor, Thank you for the patch! Yet something to improve: [auto build test ERROR on linus/master] [also build test ERROR on v4.16-rc2 next-20180223] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url:

Re: [PATCH 1/7] genalloc: track beginning of allocations

2018-02-24 Thread kbuild test robot
Hi Igor, Thank you for the patch! Yet something to improve: [auto build test ERROR on linus/master] [also build test ERROR on v4.16-rc2 next-20180223] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url:

Re: [PATCH 1/7] genalloc: track beginning of allocations

2018-02-23 Thread J Freyensee
some code snipping . . . +/** + * get_bitmap_entry() - extracts the specified entry from the bitmap + * @map: pointer to a bitmap + * @entry_index: the index of the desired entry in the bitmap + * + * Return: The requested bitmap. + */ +static inline unsigned long get_bitmap_entry(unsigned long

Re: [PATCH 1/7] genalloc: track beginning of allocations

2018-02-23 Thread J Freyensee
some code snipping . . . +/** + * get_bitmap_entry() - extracts the specified entry from the bitmap + * @map: pointer to a bitmap + * @entry_index: the index of the desired entry in the bitmap + * + * Return: The requested bitmap. + */ +static inline unsigned long get_bitmap_entry(unsigned long

[PATCH 1/7] genalloc: track beginning of allocations

2018-02-23 Thread Igor Stoppa
The genalloc library is only capable of tracking if a certain unit of allocation is in use or not. It is not capable of discerning where the memory associated to an allocation request begins and where it ends. The reason is that units of allocations are tracked by using a bitmap, where each bit

[PATCH 1/7] genalloc: track beginning of allocations

2018-02-23 Thread Igor Stoppa
The genalloc library is only capable of tracking if a certain unit of allocation is in use or not. It is not capable of discerning where the memory associated to an allocation request begins and where it ends. The reason is that units of allocations are tracked by using a bitmap, where each bit