Re: [PATCH] drm/ttm: do not check if list is empty in ttm_bo_force_list_clean, v2

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 11/30/2012 11:16 AM, Maarten Lankhorst wrote:
Op 30-11-12 10:04, Thomas Hellstrom schreef:
On 11/30/2012 09:05 AM, Maarten Lankhorst wrote:
Just use the return error from ttm_mem_evict_first instead.

Changes since v1:
- Add warning if list is not empty, nothing else we can do here.
Marten, when this function is called, all cross-device reservers have been shut out with the TTM lock or whatever similar
mechanism is in place. It's a critical function that must succeed, unless there is a hardware failure to evict.

As mentioned in the comments on the previous patch, ttm_bo_evict_first() may return 0 (OK) if it failed to reclaim the
trylock in cleanup_refs_and_unlock(), with the assumption that another process will destroy the bo anyway
(possibly at a later time which we know nothing about). The lru list needs to be empty when this function returns.

This means we must either keep the while(list_empty) or perhaps better, retry instead of WARN if list_empty() is detected at the end of list.
As long as evict_first returns 0, that function is called over and over again

Ah, ok. You're right.

Reviewed-by: Thomas Hellstrom<thellstrom@xxxxxxxxxx>
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/dri-devel


[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux