linux/include/drm/ttm
Thomas Hellstrom c58f009e01 drm/ttm: Remove set_need_resched from the ttm fault handler
Addresses
"[BUG] completely bonkers use of set_need_resched + VM_FAULT_NOPAGE".

In the first occurence it was used to try to be nice while releasing the
mmap_sem and retrying the fault to work around a locking inversion.
The second occurence was never used.

There has been some discussion whether we should change the locking order to
mmap_sem -> bo_reserve. This patch doesn't address that issue, and leaves
that locking order undefined. The solution that we release the mmap_sem if
tryreserve fails and wait for the buffer to become unreserved is something
we want in any case, and follows how the core vm system waits for pages
to be come unlocked while releasing the mmap_sem.

The code also outlines what needs to be changed if we want to establish the
locking order as mmap_sem -> bo::reserve.

One slight issue that remains with this code is that the fault handler might
be prone to starvation if another thread countinously reserves the buffer.
IMO that usage pattern is highly unlikely.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
2013-11-20 03:46:54 -08:00
..
ttm_bo_api.h drm/ttm: Remove set_need_resched from the ttm fault handler 2013-11-20 03:46:54 -08:00
ttm_bo_driver.h drm/ttm: convert to unified vma offset manager 2013-07-25 20:47:07 +10:00
ttm_execbuf_util.h drm/ttm: convert to the reservation api 2013-06-28 12:04:01 +10:00
ttm_lock.h UAPI: (Scripted) Convert #include "..." to #include <path/...> in kernel system headers 2012-10-02 18:01:25 +01:00
ttm_memory.h drm/ttm: remove ttm_mem_global->queue 2012-11-20 16:06:22 +10:00
ttm_module.h drm: move ttm global code to core drm 2010-08-04 09:46:06 +10:00
ttm_object.h drm/ttm, drm/vmwgfx: Use RCU locking for object lookups v3 2012-11-20 16:15:05 +10:00
ttm_page_alloc.h drm/ttm: Enable the dma page pool also for intel IOMMUs 2013-11-06 03:55:52 -08:00
ttm_placement.h drm: Add the TTM GPU memory manager subsystem. 2009-06-15 09:37:57 +10:00