summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZhaoyang Huang <zhaoyang.huang@unisoc.com>2020-12-18 15:47:48 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-12-28 15:06:06 +0100
commit3989f5a5f81c97732f9e3b3ae2d1d7923f6e7653 (patch)
tree187bc0ac0e3a47bd7a62d3c7b234e5bbc214eafa
parent5c8fe583cce542aa0b84adc939ce85293de36e5e (diff)
driver: staging: count ashmem_range into SLAB_RECLAIMBLE
Add SLAB_RECLAIM_ACCOUNT to ashmem_range cache since it has registered shrinker, which make memAvailable more presiced. Acked-by: Todd Kjos <tkjos@google.com> Signed-off-by: Zhaoyang Huang <zhaoyang.huang@unisoc.com> Link: https://lore.kernel.org/r/1608277668-3740-1-git-send-email-huangzhaoyang@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/staging/android/ashmem.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/android/ashmem.c b/drivers/staging/android/ashmem.c
index 4789d36ddfd3..d66a64e42273 100644
--- a/drivers/staging/android/ashmem.c
+++ b/drivers/staging/android/ashmem.c
@@ -933,7 +933,7 @@ static int __init ashmem_init(void)
ashmem_range_cachep = kmem_cache_create("ashmem_range_cache",
sizeof(struct ashmem_range),
- 0, 0, NULL);
+ 0, SLAB_RECLAIM_ACCOUNT, NULL);
if (!ashmem_range_cachep) {
pr_err("failed to create slab cache\n");
goto out_free1;