From: Wanpeng Li <liwanp@linux.vnet.ibm.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Dan Magenheimer <dan.magenheimer@oracle.com>,
Seth Jennings <sjenning@linux.vnet.ibm.com>,
Konrad Rzeszutek Wilk <konrad@darnok.org>,
Minchan Kim <minchan@kernel.org>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org,
Andrew Morton <akpm@linux-foundation.org>,
Bob Liu <bob.liu@oracle.com>,
Wanpeng Li <liwanp@linux.vnet.ibm.com>
Subject: [PATCH 01/10] staging: zcache: fix account foregin counters against zero-filled pages
Date: Wed, 10 Apr 2013 08:25:51 +0800 [thread overview]
Message-ID: <1365553560-32258-2-git-send-email-liwanp@linux.vnet.ibm.com> (raw)
In-Reply-To: <1365553560-32258-1-git-send-email-liwanp@linux.vnet.ibm.com>
zero-filled pages won't be compressed and sent to remote system. Monitor
the number ephemeral and persistent pages that Ramster has sent make no
sense. This patch skip account foregin counters against zero-filled pages.
Signed-off-by: Wanpeng Li <liwanp@linux.vnet.ibm.com>
---
drivers/staging/zcache/zcache-main.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/staging/zcache/zcache-main.c b/drivers/staging/zcache/zcache-main.c
index f3de76d..e23d814 100644
--- a/drivers/staging/zcache/zcache-main.c
+++ b/drivers/staging/zcache/zcache-main.c
@@ -415,7 +415,7 @@ create_in_new_page:
got_pampd:
inc_zcache_eph_zbytes(clen);
inc_zcache_eph_zpages();
- if (ramster_enabled && raw)
+ if (ramster_enabled && raw && !zero_filled)
ramster_count_foreign_pages(true, 1);
if (zero_filled)
pampd = (void *)ZERO_FILLED;
@@ -500,7 +500,7 @@ create_in_new_page:
got_pampd:
inc_zcache_pers_zpages();
inc_zcache_pers_zbytes(clen);
- if (ramster_enabled && raw)
+ if (ramster_enabled && raw && !zero_filled)
ramster_count_foreign_pages(false, 1);
if (zero_filled)
pampd = (void *)ZERO_FILLED;
@@ -681,7 +681,7 @@ zero_fill:
dec_zcache_pers_zpages(zpages);
dec_zcache_pers_zbytes(zsize);
}
- if (!is_local_client(pool->client))
+ if (!is_local_client(pool->client) && !zero_filled)
ramster_count_foreign_pages(eph, -1);
if (page && !zero_filled)
zcache_free_page(page);
@@ -732,7 +732,7 @@ static void zcache_pampd_free(void *pampd, struct tmem_pool *pool,
dec_zcache_pers_zpages(zpages);
dec_zcache_pers_zbytes(zsize);
}
- if (!is_local_client(pool->client))
+ if (!is_local_client(pool->client) && !zero_filled)
ramster_count_foreign_pages(is_ephemeral(pool), -1);
if (page && !zero_filled)
zcache_free_page(page);
--
1.7.10.4
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2013-04-10 0:26 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-10 0:25 [PATCH 00/10] staging: zcache/ramster: fix and ramster/debugfs improvement Wanpeng Li
2013-04-10 0:25 ` Wanpeng Li [this message]
2013-04-10 0:25 ` [PATCH 02/10] staging: zcache: remove zcache_freeze Wanpeng Li
2013-04-10 0:25 ` [PATCH 03/10] staging: ramster: Provide accessory functions for counter increase Wanpeng Li
2013-04-10 0:25 ` [PATCH 04/10] staging: ramster: Provide accessory functions for counter decrease Wanpeng Li
2013-04-10 0:25 ` [PATCH 05/10] staging: ramster: Move debugfs code out of ramster.c file Wanpeng Li
2013-04-11 20:04 ` Greg Kroah-Hartman
2013-04-11 23:27 ` Wanpeng Li
2013-04-11 23:27 ` Wanpeng Li
2013-04-10 0:25 ` [PATCH 06/10] staging: ramster/debug: Use an array to initialize/use debugfs attributes Wanpeng Li
2013-04-10 0:25 ` [PATCH 07/10] staging: ramster/debug: Add RAMSTER_DEBUG Kconfig entry Wanpeng Li
2013-04-10 0:25 ` [PATCH 08/10] staging: ramster: Add incremental accessory counters Wanpeng Li
2013-04-10 0:25 ` [PATCH 09/10] staging: zcache/debug: fix coding style Wanpeng Li
2013-04-10 0:26 ` [PATCH 10/10] staging: ramster: add how-to for ramster Wanpeng Li
[not found] <<1365553560-32258-1-git-send-email-liwanp@linux.vnet.ibm.com>
[not found] ` <<1365553560-32258-3-git-send-email-liwanp@linux.vnet.ibm.com>
2013-04-11 17:13 ` [PATCH 02/10] staging: zcache: remove zcache_freeze Dan Magenheimer
2013-04-11 20:05 ` Greg Kroah-Hartman
2013-04-11 23:22 ` Wanpeng Li
2013-04-11 23:22 ` Wanpeng Li
2013-04-11 17:17 ` [PATCH 00/10] staging: zcache/ramster: fix and ramster/debugfs improvement Dan Magenheimer
2013-04-11 23:20 ` Wanpeng Li
2013-04-11 23:20 ` Wanpeng Li
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1365553560-32258-2-git-send-email-liwanp@linux.vnet.ibm.com \
--to=liwanp@linux.vnet.ibm.com \
--cc=akpm@linux-foundation.org \
--cc=bob.liu@oracle.com \
--cc=dan.magenheimer@oracle.com \
--cc=gregkh@linuxfoundation.org \
--cc=konrad@darnok.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=minchan@kernel.org \
--cc=sjenning@linux.vnet.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).