• Rob Clark's avatar
    drm/msm/shrinker: Only iterate dontneed objs · 3edfa30f
    Rob Clark authored
    In situations where the GPU is mostly idle, all or nearly all buffer
    objects will be in the inactive list.  But if the system is under memory
    pressure (from something other than GPU), we could still get a lot of
    shrinker calls.  Which results in traversing a list of thousands of objs
    and in the end finding nothing to shrink.  Which isn't so efficient.
    
    Instead split the inactive_list into two lists, one inactive objs which
    are shrinkable, and a second one for those that are not.  This way we
    can avoid traversing objs which we know are not shrinker candidates.
    
    v2: Fix inverted logic think-o
    Signed-off-by: default avatarRob Clark <robdclark@chromium.org>
    3edfa30f
msm_debugfs.c 5.2 KB