• Andres Rodriguez's avatar
    drm/amdgpu: implement lru amdgpu_queue_mgr policy for compute v4 · 795f2813
    Andres Rodriguez authored
    Use an LRU policy to map usermode rings to HW compute queues.
    
    Most compute clients use one queue, and usually the first queue
    available. This results in poor pipe/queue work distribution when
    multiple compute apps are running. In most cases pipe 0 queue 0 is
    the only queue that gets used.
    
    In order to better distribute work across multiple HW queues, we adopt
    a policy to map the usermode ring ids to the LRU HW queue.
    
    This fixes a large majority of multi-app compute workloads sharing the
    same HW queue, even though 7 other queues are available.
    
    v2: use ring->funcs->type instead of ring->hw_ip
    v3: remove amdgpu_queue_mapper_funcs
    v4: change ring_lru_list_lock to spinlock, grab only once in lru_get()
    Signed-off-by: default avatarAndres Rodriguez <andresx7@gmail.com>
    Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
    795f2813
amdgpu_ring.h 7.32 KB