drm/ttm: Add a bo list reserve fastpath (v2)
Makes it possible to reserve a list of buffer objects with a single spin lock / unlock if there is no contention. Should improve cpu usage on SMP kernels. v2: Initialize private list members on reserve and don't call ttm_bo_list_ref_sub() with zero put_count. Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
@@ -864,6 +864,20 @@ extern int ttm_bo_reserve(struct ttm_buffer_object *bo,
|
||||
bool interruptible,
|
||||
bool no_wait, bool use_sequence, uint32_t sequence);
|
||||
|
||||
|
||||
/**
|
||||
* ttm_bo_reserve_locked:
|
||||
*
|
||||
* Similar to ttm_bo_reserve, but must be called with the glob::lru_lock
|
||||
* spinlock held, and will not remove reserved buffers from the lru lists.
|
||||
* The function may release the LRU spinlock if it needs to sleep.
|
||||
*/
|
||||
|
||||
extern int ttm_bo_reserve_locked(struct ttm_buffer_object *bo,
|
||||
bool interruptible,
|
||||
bool no_wait, bool use_sequence,
|
||||
uint32_t sequence);
|
||||
|
||||
/**
|
||||
* ttm_bo_unreserve
|
||||
*
|
||||
|
Reference in New Issue
Block a user