diff options
author | Wanpeng Li <liwanp@linux.vnet.ibm.com> | 2013-04-03 18:16:22 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-04-03 13:38:37 -0700 |
commit | 834e3a1cead22c40ad55dad9cd683e42396d45c1 (patch) | |
tree | 8fe408554bd84a86099ae5a998ea9b844cf053e1 /drivers/staging/zcache/zcache-main.c | |
parent | 90874fc21ca6ca46058c5039fe78a4155d9a631e (diff) | |
download | linux-834e3a1cead22c40ad55dad9cd683e42396d45c1.tar.bz2 |
staging: zcache: introduce zero-filled page stat count
Introduce zero-filled page statistics to monitor the number of
zero-filled pages.
Acked-by: Dan Magenheimer <dan.magenheimer@oracle.com>
Signed-off-by: Wanpeng Li <liwanp@linux.vnet.ibm.com>
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/zcache/zcache-main.c')
-rw-r--r-- | drivers/staging/zcache/zcache-main.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/staging/zcache/zcache-main.c b/drivers/staging/zcache/zcache-main.c index 1994cab6edf1..f3de76d07073 100644 --- a/drivers/staging/zcache/zcache-main.c +++ b/drivers/staging/zcache/zcache-main.c @@ -374,6 +374,7 @@ static void *zcache_pampd_eph_create(char *data, size_t size, bool raw, if (page_is_zero_filled(page)) { clen = 0; zero_filled = true; + inc_zcache_zero_filled_pages(); goto got_pampd; } @@ -440,6 +441,7 @@ static void *zcache_pampd_pers_create(char *data, size_t size, bool raw, if (page_is_zero_filled(page)) { clen = 0; zero_filled = true; + inc_zcache_zero_filled_pages(); goto got_pampd; } @@ -652,6 +654,7 @@ static int zcache_pampd_get_data_and_free(char *data, size_t *sizep, bool raw, zpages = 1; if (!raw) *sizep = PAGE_SIZE; + dec_zcache_zero_filled_pages(); goto zero_fill; } @@ -702,6 +705,7 @@ static void zcache_pampd_free(void *pampd, struct tmem_pool *pool, zero_filled = true; zsize = 0; zpages = 1; + dec_zcache_zero_filled_pages(); } if (pampd_is_remote(pampd) && !zero_filled) { |