Skip to content

Commit

Permalink
Revert "msm: kgsl: Stop slab shrinker when no more pages can be recla…
Browse files Browse the repository at this point in the history
…imed"

This reverts commit 448c77f.
  • Loading branch information
acuicultor committed Feb 12, 2021
1 parent 59f88bb commit 8f91793
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions drivers/gpu/msm/kgsl_pool.c
Expand Up @@ -431,16 +431,12 @@ kgsl_pool_shrink_scan_objects(struct shrinker *shrinker,
/* nr represents number of pages to be removed*/
int nr = sc->nr_to_scan;
int total_pages = kgsl_pool_size_total();
unsigned long ret;

/* Target pages represents new pool size */
int target_pages = (nr > total_pages) ? 0 : (total_pages - nr);

/* Reduce pool size to target_pages */
ret = kgsl_pool_reduce(target_pages, false);

/* If we are unable to shrink more, stop trying */
return (ret == 0) ? SHRINK_STOP : ret;
return kgsl_pool_reduce(target_pages, false);
}

static unsigned long
Expand Down

0 comments on commit 8f91793

Please sign in to comment.