summaryrefslogtreecommitdiff
path: root/mm/zcache.c
diff options
context:
space:
mode:
authorVinayak Menon <vinmenon@codeaurora.org>2016-01-07 12:52:24 +0530
committerDavid Keitel <dkeitel@codeaurora.org>2016-03-23 21:16:46 -0700
commitdf756d1f8bc7389ab8777cf06bb3e0c8448e2c6c (patch)
treedbf3b1a1be056e2ec72b5ffb6173bd8888961ef6 /mm/zcache.c
parenta360ae6982fbf45bc3a64c6ff748a9101408daa1 (diff)
mm: zcache: reduce prints on store error
zcache store can fail on lowmemory conditions. Do not throw unnecessary prints on such events, causing a stall. Change-Id: I8fba6938f75ef5b6054ee079951b7409279e1c02 Signed-off-by: Vinayak Menon <vinmenon@codeaurora.org>
Diffstat (limited to 'mm/zcache.c')
-rw-r--r--mm/zcache.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/mm/zcache.c b/mm/zcache.c
index 61ef23abc844..0c1c94c7d04c 100644
--- a/mm/zcache.c
+++ b/mm/zcache.c
@@ -72,6 +72,7 @@ static u64 zcache_reclaim_fail;
static u64 zcache_pool_shrink;
static u64 zcache_pool_shrink_fail;
static u64 zcache_pool_shrink_pages;
+static u64 zcache_store_failed;
static atomic_t zcache_stored_pages = ATOMIC_INIT(0);
static atomic_t zcache_stored_zero_pages = ATOMIC_INIT(0);
@@ -683,7 +684,7 @@ zero:
/* store zcache handle */
ret = zcache_store_zaddr(zpool, index, key.u.ino, zaddr);
if (ret) {
- pr_err("%s: store handle error %d\n", __func__, ret);
+ zcache_store_failed++;
if (!zero)
zbud_free(zpool->pool, zaddr);
}
@@ -1070,6 +1071,8 @@ static int __init zcache_debugfs_init(void)
zcache_debugfs_root, &zcache_pool_shrink_fail);
debugfs_create_u64("pool_shrink_pages", S_IRUGO,
zcache_debugfs_root, &zcache_pool_shrink_pages);
+ debugfs_create_u64("store_fail", S_IRUGO,
+ zcache_debugfs_root, &zcache_store_failed);
return 0;
}