Re: [PATCH 1/2] mm/vmap: Add a notifier for when we run out of vmap address space

2016-03-20 Thread Roman Peniaev
Hi, Chris. Comment is below. On Thu, Mar 17, 2016 at 12:59 PM, Chris Wilson wrote: > vmaps are temporary kernel mappings that may be of long duration. > Reusing a vmap on an object is preferrable for a driver as the cost of > setting up the vmap can otherwise dominate

Re: [PATCH 1/2] mm/vmap: Add a notifier for when we run out of vmap address space

2016-03-20 Thread Roman Peniaev
Hi, Chris. Comment is below. On Thu, Mar 17, 2016 at 12:59 PM, Chris Wilson wrote: > vmaps are temporary kernel mappings that may be of long duration. > Reusing a vmap on an object is preferrable for a driver as the cost of > setting up the vmap can otherwise dominate the operation on the

Re: [PATCH 1/2] mm/vmap: Add a notifier for when we run out of vmap address space

2016-03-20 Thread Chris Wilson
On Thu, Mar 17, 2016 at 02:21:40PM +0100, Roman Peniaev wrote: > On Thu, Mar 17, 2016 at 1:57 PM, Chris Wilson > wrote: > > On Thu, Mar 17, 2016 at 01:37:06PM +0100, Roman Peniaev wrote: > >> > + freed = 0; > >> > + blocking_notifier_call_chain(_notify_list,

Re: [PATCH 1/2] mm/vmap: Add a notifier for when we run out of vmap address space

2016-03-20 Thread Chris Wilson
On Thu, Mar 17, 2016 at 02:21:40PM +0100, Roman Peniaev wrote: > On Thu, Mar 17, 2016 at 1:57 PM, Chris Wilson > wrote: > > On Thu, Mar 17, 2016 at 01:37:06PM +0100, Roman Peniaev wrote: > >> > + freed = 0; > >> > + blocking_notifier_call_chain(_notify_list, 0, ); > >> > >> It seems

Re: [PATCH 1/2] mm/vmap: Add a notifier for when we run out of vmap address space

2016-03-19 Thread Roman Peniaev
On Thu, Mar 17, 2016 at 1:57 PM, Chris Wilson wrote: > On Thu, Mar 17, 2016 at 01:37:06PM +0100, Roman Peniaev wrote: >> > + freed = 0; >> > + blocking_notifier_call_chain(_notify_list, 0, ); >> >> It seems to me that alloc_vmap_area() was designed not to

Re: [PATCH 1/2] mm/vmap: Add a notifier for when we run out of vmap address space

2016-03-19 Thread Roman Peniaev
On Thu, Mar 17, 2016 at 1:57 PM, Chris Wilson wrote: > On Thu, Mar 17, 2016 at 01:37:06PM +0100, Roman Peniaev wrote: >> > + freed = 0; >> > + blocking_notifier_call_chain(_notify_list, 0, ); >> >> It seems to me that alloc_vmap_area() was designed not to sleep, >> at least on

[PATCH 1/2] mm/vmap: Add a notifier for when we run out of vmap address space

2016-03-19 Thread Chris Wilson
vmaps are temporary kernel mappings that may be of long duration. Reusing a vmap on an object is preferrable for a driver as the cost of setting up the vmap can otherwise dominate the operation on the object. However, the vmap address space is rather limited on 32bit systems and so we add a

[PATCH 1/2] mm/vmap: Add a notifier for when we run out of vmap address space

2016-03-19 Thread Chris Wilson
vmaps are temporary kernel mappings that may be of long duration. Reusing a vmap on an object is preferrable for a driver as the cost of setting up the vmap can otherwise dominate the operation on the object. However, the vmap address space is rather limited on 32bit systems and so we add a

Re: [PATCH 1/2] mm/vmap: Add a notifier for when we run out of vmap address space

2016-03-19 Thread Chris Wilson
On Thu, Mar 17, 2016 at 01:37:06PM +0100, Roman Peniaev wrote: > > + freed = 0; > > + blocking_notifier_call_chain(_notify_list, 0, ); > > It seems to me that alloc_vmap_area() was designed not to sleep, > at least on GFP_NOWAIT path (__GFP_DIRECT_RECLAIM is not set). > > But

Re: [PATCH 1/2] mm/vmap: Add a notifier for when we run out of vmap address space

2016-03-19 Thread Chris Wilson
On Thu, Mar 17, 2016 at 01:37:06PM +0100, Roman Peniaev wrote: > > + freed = 0; > > + blocking_notifier_call_chain(_notify_list, 0, ); > > It seems to me that alloc_vmap_area() was designed not to sleep, > at least on GFP_NOWAIT path (__GFP_DIRECT_RECLAIM is not set). > > But