]> 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)
commit1d51a37b82bebacbc93e5c525cb110f76b5dc1c0
tree8432ebee8dce75c9d6fef84616a7f6c0af537418
parenteb131ee58860f52d05b3843a40235c017a1379a0
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