Re: [Xen-devel] [PATCH v5 04/28] vmap: Add vmalloc_cb and vfree_cb

2016-03-31 Thread Konrad Rzeszutek Wilk
On Thu, Mar 31, 2016 at 12:46:24AM -0600, Jan Beulich wrote: > >>> On 30.03.16 at 18:44, wrote: > > On Wed, Mar 30, 2016 at 10:24:41AM -0600, Jan Beulich wrote: > >> >>> On 24.03.16 at 21:00, wrote: > >> > @@ -266,16 +275,15 @@ void *vzalloc(size_t size) > >> > return p; > >> > } > >> > >

Re: [Xen-devel] [PATCH v5 04/28] vmap: Add vmalloc_cb and vfree_cb

2016-03-30 Thread Jan Beulich
>>> On 30.03.16 at 18:44, wrote: > On Wed, Mar 30, 2016 at 10:24:41AM -0600, Jan Beulich wrote: >> >>> On 24.03.16 at 21:00, wrote: >> > @@ -266,16 +275,15 @@ void *vzalloc(size_t size) >> > return p; >> > } >> > >> > -void vfree(void *va) >> > +void vfree_cb(void *va, unsigned int pages,

Re: [Xen-devel] [PATCH v5 04/28] vmap: Add vmalloc_cb and vfree_cb

2016-03-30 Thread Konrad Rzeszutek Wilk
On Wed, Mar 30, 2016 at 10:24:41AM -0600, Jan Beulich wrote: > >>> On 24.03.16 at 21:00, wrote: > > @@ -266,16 +275,15 @@ void *vzalloc(size_t size) > > return p; > > } > > > > -void vfree(void *va) > > +void vfree_cb(void *va, unsigned int pages, vfree_cb_t *vfree_cb_fnc) > > Just to rep

Re: [Xen-devel] [PATCH v5 04/28] vmap: Add vmalloc_cb and vfree_cb

2016-03-30 Thread Jan Beulich
>>> On 24.03.16 at 21:00, wrote: > @@ -266,16 +275,15 @@ void *vzalloc(size_t size) > return p; > } > > -void vfree(void *va) > +void vfree_cb(void *va, unsigned int pages, vfree_cb_t *vfree_cb_fnc) Just to repeat: This "caller provides size" worries me, the more that this doesn't mirror

[Xen-devel] [PATCH v5 04/28] vmap: Add vmalloc_cb and vfree_cb

2016-03-24 Thread Konrad Rzeszutek Wilk
For those users who want to supply their own vmap callback. To be called _after_ the pages have been allocated and the vmap API is ready to hand out virtual addresses. Instead of using the vmap ones it can call the callback which will be responsible for generating the virtual address. This allows