linux-stable/drivers/gpu/drm/ttm
Tetsuo Handa 22e71691fd drm/ttm: Use mutex_trylock() to avoid deadlock inside shrinker functions.
I can observe that RHEL7 environment stalls with 100% CPU usage when a
certain type of memory pressure is given. While the shrinker functions
are called by shrink_slab() before the OOM killer is triggered, the stall
lasts for many minutes.

One of reasons of this stall is that
ttm_dma_pool_shrink_count()/ttm_dma_pool_shrink_scan() are called and
are blocked at mutex_lock(&_manager->lock). GFP_KERNEL allocation with
_manager->lock held causes someone (including kswapd) to deadlock when
these functions are called due to memory pressure. This patch changes
"mutex_lock();" to "if (!mutex_trylock()) return ...;" in order to
avoid deadlock.

Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Cc: stable <stable@kernel.org> [3.3+]
Signed-off-by: Dave Airlie <airlied@redhat.com>
2014-08-05 10:53:18 +10:00
..
Makefile drm/ttm: Enable the dma page pool also for intel IOMMUs 2013-11-06 03:55:52 -08:00
ttm_agp_backend.c drm/ttm: Fix memory leak in ttm_agp_backend.c 2014-02-18 14:03:32 +01:00
ttm_bo.c ttm: use NULL instead of 0 for ttm_bo_reserve()'s pointer arg. 2014-07-08 11:28:28 +10:00
ttm_bo_manager.c drm/ttm: fix handling of TTM_PL_FLAG_TOPDOWN v2 2014-07-08 11:15:58 +10:00
ttm_bo_util.c drm/ttm: recognize ARM arch in ioprot handler 2014-07-08 00:34:18 +02:00
ttm_bo_vm.c drm/ttm: Work around performance regression with VM_PFNMAP 2014-03-12 14:07:24 +01:00
ttm_execbuf_util.c drm/ttm: Hide the implementation details of reservation 2014-04-04 08:00:59 +02:00
ttm_lock.c drivers: gpu: Remove unused function in ttm_lock.c 2014-01-08 13:24:14 +01:00
ttm_memory.c drm/ttm: remove ttm_mem_global->queue 2012-11-20 16:06:22 +10:00
ttm_module.c drm/ttm: make device_released static 2014-07-22 12:59:32 +10:00
ttm_object.c drm/ttm: Add a ttm_ref_object_exists function 2014-03-28 14:19:03 +01:00
ttm_page_alloc.c drm/ttm: use gfp_t instead of int for flags. 2014-07-22 12:55:39 +10:00
ttm_page_alloc_dma.c drm/ttm: Use mutex_trylock() to avoid deadlock inside shrinker functions. 2014-08-05 10:53:18 +10:00
ttm_tt.c drm/ttm: Don't clear page metadata of imported sg pages 2014-02-05 16:03:29 +01:00