Re: [Intel-gfx] [PATCH 03/17] drm/i915: Pin pages whilst mapping the dma-buf

2013-09-01 Thread Daniel Vetter
On Fri, Aug 30, 2013 at 03:27:47PM +0100, Damien Lespiau wrote: > On Mon, Aug 26, 2013 at 07:50:55PM -0300, Rodrigo Vivi wrote: > > From: Chris Wilson > > > > As we attempt to kmalloc after calling get_pages, there is a possibility > > that the shrinker may reap the pages we just acquired. To pre

Re: [Intel-gfx] [PATCH 03/17] drm/i915: Pin pages whilst mapping the dma-buf

2013-08-30 Thread Damien Lespiau
On Mon, Aug 26, 2013 at 07:50:55PM -0300, Rodrigo Vivi wrote: > From: Chris Wilson > > As we attempt to kmalloc after calling get_pages, there is a possibility > that the shrinker may reap the pages we just acquired. To prevent this > we need to increment the pages_pin_count early, so rearrange t

[Intel-gfx] [PATCH 03/17] drm/i915: Pin pages whilst mapping the dma-buf

2013-08-26 Thread Rodrigo Vivi
From: Chris Wilson As we attempt to kmalloc after calling get_pages, there is a possibility that the shrinker may reap the pages we just acquired. To prevent this we need to increment the pages_pin_count early, so rearrange the code and error paths to make it so. Signed-off-by: Chris Wilson ---