• Ping Gao's avatar
    drm/i915/gvt: Trigger scheduling after context complete · f100daec
    Ping Gao authored
    The time based scheduler poll context busy status at every
    micro-second during vGPU switch, it will make GPU idle for a while
    when the context is very small and completed before the next
    micro-second arrival. Trigger scheduling immediately after context
    complete will eliminate GPU idle and improve performance.
    
    Create two vGPU with same type, run Heaven simultaneously:
    Before this patch:
     +---------+----------+----------+
     |         |  vGPU1   |   vGPU2  |
     +---------+----------+----------+
     |  Heaven |  357     |    354   |
     +-------------------------------+
    
    After this patch:
     +---------+----------+----------+
     |         |  vGPU1   |   vGPU2  |
     +---------+----------+----------+
     |  Heaven |  397     |    398   |
     +-------------------------------+
    
    v2: Let need_reschedule protect by gvt-lock.
    Signed-off-by: default avatarPing Gao <ping.a.gao@intel.com>
    Signed-off-by: default avatarWeinan Li <weinan.z.li@intel.com>
    Signed-off-by: default avatarZhenyu Wang <zhenyuw@linux.intel.com>
    f100daec
scheduler.c 17.6 KB