]> git.baikalelectronics.ru Git - kernel.git/commit
drm/ttm: Make NO_EVICT bos available to shrinkers pending destruction
authorThomas Hellstrom <thellstrom@vmware.com>
Thu, 10 Oct 2013 18:09:03 +0000 (11:09 -0700)
committerThomas Hellstrom <thellstrom@vmware.com>
Wed, 6 Nov 2013 12:21:50 +0000 (04:21 -0800)
commitd5d6c832ce2fbe5f74704b8cdc6f8e667545bef0
tree8432ebee8dce75c9d6fef84616a7f6c0af537418
parent02f4040a295c76f11b95f95dff4c73ceb54f518f
drm/ttm: Make NO_EVICT bos available to shrinkers pending destruction

NO_EVICT bos that are not idle when all references are dropped are put on
the delayed destroy list. However, since they are not on LRU lists, they
are not available to shrinkers at that point, and buffers on the delayed
destroy list are not checked very often for idle.

So when these buffers are put on the delayed destroy list, clear the
NO_EVICT flag and put them on the right LRU list. This way they are
immediately available for eviction or shrinkers and will not cause false
OOMS.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
drivers/gpu/drm/ttm/ttm_bo.c