From: Xishi Qiu <qiuxishi@huawei.com>
To: Andrew Morton <akpm@linux-foundation.org>,
Wanpeng Li <liwanp@linux.vnet.ibm.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
aquini@redhat.com, Peter Zijlstra <peterz@infradead.org>,
Rik van Riel <riel@redhat.com>,
Johannes Weiner <hannes@cmpxchg.org>,
Michal Hocko <mhocko@suse.cz>
Cc: Linux MM <linux-mm@kvack.org>,
LKML <linux-kernel@vger.kernel.org>,
Xishi Qiu <qiuxishi@huawei.com>, Li Zefan <lizefan@huawei.com>
Subject: [PATCH 6/8] mm: introduce cache_reclaim_weight
Date: Mon, 16 Jun 2014 17:25:09 +0800 [thread overview]
Message-ID: <539EB7F5.9090201@huawei.com> (raw)
This patch introduces a parameters cache_reclaim_weight. It is used to
speed up page cache reclaim.
Signed-off-by: Xishi Qiu <qiuxishi@huawei.com>
---
include/linux/swap.h | 3 +++
kernel/sysctl.c | 9 +++++++++
mm/vmscan.c | 6 ++++++
3 files changed, 18 insertions(+), 0 deletions(-)
diff --git a/include/linux/swap.h b/include/linux/swap.h
index bd85493..db912b2 100644
--- a/include/linux/swap.h
+++ b/include/linux/swap.h
@@ -361,6 +361,9 @@ extern unsigned long vm_cache_limit_mbytes_min;
extern unsigned long vm_cache_limit_mbytes_max;
extern unsigned long vm_cache_reclaim_s;
extern unsigned long vm_cache_reclaim_s_min;
+extern unsigned long vm_cache_reclaim_weight;
+extern unsigned long vm_cache_reclaim_weight_min;
+extern unsigned long vm_cache_reclaim_weight_max;
extern int cache_limit_ratio_sysctl_handler(struct ctl_table *table, int write,
void __user *buffer, size_t *length, loff_t *ppos);
extern int cache_limit_mbytes_sysctl_handler(struct ctl_table *table, int write,
diff --git a/kernel/sysctl.c b/kernel/sysctl.c
index a8a09c4..452e0d3 100644
--- a/kernel/sysctl.c
+++ b/kernel/sysctl.c
@@ -1298,6 +1298,15 @@ static struct ctl_table vm_table[] = {
.proc_handler = proc_doulongvec_minmax,
.extra1 = &vm_cache_reclaim_s_min,
},
+ {
+ .procname = "cache_reclaim_weight",
+ .data = &vm_cache_reclaim_weight,
+ .maxlen = sizeof(vm_cache_reclaim_weight),
+ .mode = 0644,
+ .proc_handler = proc_doulongvec_minmax,
+ .extra1 = &vm_cache_reclaim_weight_min,
+ .extra2 = &vm_cache_reclaim_weight_max,
+ },
#ifdef CONFIG_COMPACTION
{
.procname = "compact_memory",
diff --git a/mm/vmscan.c b/mm/vmscan.c
index d7f866e..d179be6 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -139,6 +139,9 @@ unsigned long vm_cache_limit_mbytes_min;
unsigned long vm_cache_limit_mbytes_max;
unsigned long vm_cache_reclaim_s __read_mostly;
unsigned long vm_cache_reclaim_s_min;
+unsigned long vm_cache_reclaim_weight __read_mostly;
+unsigned long vm_cache_reclaim_weight_min;
+unsigned long vm_cache_reclaim_weight_max;
static DEFINE_PER_CPU(struct delayed_work, vmscan_work);
static LIST_HEAD(shrinker_list);
@@ -3410,6 +3413,9 @@ static void shrink_page_cache_init(void)
vm_cache_limit_mbytes_max = totalram_pages;
vm_cache_reclaim_s = 0;
vm_cache_reclaim_s_min = 0;
+ vm_cache_reclaim_weight = 1;
+ vm_cache_reclaim_weight_min = 1;
+ vm_cache_reclaim_weight_max = 100;
for_each_online_cpu(cpu) {
struct delayed_work *work = &per_cpu(vmscan_work, cpu);
--
1.6.0.2
--
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>
WARNING: multiple messages have this Message-ID (diff)
From: Xishi Qiu <qiuxishi@huawei.com>
To: Andrew Morton <akpm@linux-foundation.org>,
Wanpeng Li <liwanp@linux.vnet.ibm.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
<aquini@redhat.com>, Peter Zijlstra <peterz@infradead.org>,
Rik van Riel <riel@redhat.com>,
Johannes Weiner <hannes@cmpxchg.org>,
Michal Hocko <mhocko@suse.cz>
Cc: Linux MM <linux-mm@kvack.org>,
LKML <linux-kernel@vger.kernel.org>,
Xishi Qiu <qiuxishi@huawei.com>, Li Zefan <lizefan@huawei.com>
Subject: [PATCH 6/8] mm: introduce cache_reclaim_weight
Date: Mon, 16 Jun 2014 17:25:09 +0800 [thread overview]
Message-ID: <539EB7F5.9090201@huawei.com> (raw)
This patch introduces a parameters cache_reclaim_weight. It is used to
speed up page cache reclaim.
Signed-off-by: Xishi Qiu <qiuxishi@huawei.com>
---
include/linux/swap.h | 3 +++
kernel/sysctl.c | 9 +++++++++
mm/vmscan.c | 6 ++++++
3 files changed, 18 insertions(+), 0 deletions(-)
diff --git a/include/linux/swap.h b/include/linux/swap.h
index bd85493..db912b2 100644
--- a/include/linux/swap.h
+++ b/include/linux/swap.h
@@ -361,6 +361,9 @@ extern unsigned long vm_cache_limit_mbytes_min;
extern unsigned long vm_cache_limit_mbytes_max;
extern unsigned long vm_cache_reclaim_s;
extern unsigned long vm_cache_reclaim_s_min;
+extern unsigned long vm_cache_reclaim_weight;
+extern unsigned long vm_cache_reclaim_weight_min;
+extern unsigned long vm_cache_reclaim_weight_max;
extern int cache_limit_ratio_sysctl_handler(struct ctl_table *table, int write,
void __user *buffer, size_t *length, loff_t *ppos);
extern int cache_limit_mbytes_sysctl_handler(struct ctl_table *table, int write,
diff --git a/kernel/sysctl.c b/kernel/sysctl.c
index a8a09c4..452e0d3 100644
--- a/kernel/sysctl.c
+++ b/kernel/sysctl.c
@@ -1298,6 +1298,15 @@ static struct ctl_table vm_table[] = {
.proc_handler = proc_doulongvec_minmax,
.extra1 = &vm_cache_reclaim_s_min,
},
+ {
+ .procname = "cache_reclaim_weight",
+ .data = &vm_cache_reclaim_weight,
+ .maxlen = sizeof(vm_cache_reclaim_weight),
+ .mode = 0644,
+ .proc_handler = proc_doulongvec_minmax,
+ .extra1 = &vm_cache_reclaim_weight_min,
+ .extra2 = &vm_cache_reclaim_weight_max,
+ },
#ifdef CONFIG_COMPACTION
{
.procname = "compact_memory",
diff --git a/mm/vmscan.c b/mm/vmscan.c
index d7f866e..d179be6 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -139,6 +139,9 @@ unsigned long vm_cache_limit_mbytes_min;
unsigned long vm_cache_limit_mbytes_max;
unsigned long vm_cache_reclaim_s __read_mostly;
unsigned long vm_cache_reclaim_s_min;
+unsigned long vm_cache_reclaim_weight __read_mostly;
+unsigned long vm_cache_reclaim_weight_min;
+unsigned long vm_cache_reclaim_weight_max;
static DEFINE_PER_CPU(struct delayed_work, vmscan_work);
static LIST_HEAD(shrinker_list);
@@ -3410,6 +3413,9 @@ static void shrink_page_cache_init(void)
vm_cache_limit_mbytes_max = totalram_pages;
vm_cache_reclaim_s = 0;
vm_cache_reclaim_s_min = 0;
+ vm_cache_reclaim_weight = 1;
+ vm_cache_reclaim_weight_min = 1;
+ vm_cache_reclaim_weight_max = 100;
for_each_online_cpu(cpu) {
struct delayed_work *work = &per_cpu(vmscan_work, cpu);
--
1.6.0.2
next reply other threads:[~2014-06-16 9:27 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-16 9:25 Xishi Qiu [this message]
2014-06-16 9:25 ` [PATCH 6/8] mm: introduce cache_reclaim_weight Xishi Qiu
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=539EB7F5.9090201@huawei.com \
--to=qiuxishi@huawei.com \
--cc=akpm@linux-foundation.org \
--cc=aquini@redhat.com \
--cc=gregkh@linuxfoundation.org \
--cc=hannes@cmpxchg.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=liwanp@linux.vnet.ibm.com \
--cc=lizefan@huawei.com \
--cc=mhocko@suse.cz \
--cc=peterz@infradead.org \
--cc=riel@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.