From: Xishi Qiu <qiuxishi@huawei.com>
To: Ingo Molnar <mingo@redhat.com>,
Peter Zijlstra <peterz@infradead.org>,
Andrew Morton <akpm@linux-foundation.org>,
zhongjiang@huawei.com
Cc: Linux MM <linux-mm@kvack.org>, LKML <linux-kernel@vger.kernel.org>
Subject: [PATCH] numa-balancing: fix confusion in /proc/sys/kernel/numa_balancing
Date: Mon, 14 Sep 2015 14:25:19 +0800 [thread overview]
Message-ID: <55F6684F.4010007@huawei.com> (raw)
We can only echo 0 or 1 > "/proc/sys/kernel/numa_balancing", usually 1 means
enable and 0 means disable. But when echo 1, it shows the value is 65536, this
is confusion.
Signed-off-by: Xishi Qiu <qiuxishi@huawei.com>
---
kernel/sched/core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index 3595403..e97a348 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -2135,7 +2135,7 @@ int sysctl_numa_balancing(struct ctl_table *table, int write,
{
struct ctl_table t;
int err;
- int state = numabalancing_enabled;
+ int state = !!numabalancing_enabled;
if (write && !capable(CAP_SYS_ADMIN))
return -EPERM;
--
2.0.0
--
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: Ingo Molnar <mingo@redhat.com>,
Peter Zijlstra <peterz@infradead.org>,
Andrew Morton <akpm@linux-foundation.org>,
<zhongjiang@huawei.com>
Cc: Linux MM <linux-mm@kvack.org>, LKML <linux-kernel@vger.kernel.org>
Subject: [PATCH] numa-balancing: fix confusion in /proc/sys/kernel/numa_balancing
Date: Mon, 14 Sep 2015 14:25:19 +0800 [thread overview]
Message-ID: <55F6684F.4010007@huawei.com> (raw)
We can only echo 0 or 1 > "/proc/sys/kernel/numa_balancing", usually 1 means
enable and 0 means disable. But when echo 1, it shows the value is 65536, this
is confusion.
Signed-off-by: Xishi Qiu <qiuxishi@huawei.com>
---
kernel/sched/core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index 3595403..e97a348 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -2135,7 +2135,7 @@ int sysctl_numa_balancing(struct ctl_table *table, int write,
{
struct ctl_table t;
int err;
- int state = numabalancing_enabled;
+ int state = !!numabalancing_enabled;
if (write && !capable(CAP_SYS_ADMIN))
return -EPERM;
--
2.0.0
next reply other threads:[~2015-09-14 6:31 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-14 6:25 Xishi Qiu [this message]
2015-09-14 6:25 ` [PATCH] numa-balancing: fix confusion in /proc/sys/kernel/numa_balancing Xishi Qiu
2015-09-14 7:43 ` Ingo Molnar
2015-09-14 7:43 ` Ingo Molnar
2015-09-15 1:34 ` Xishi Qiu
2015-09-15 1:34 ` 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=55F6684F.4010007@huawei.com \
--to=qiuxishi@huawei.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=zhongjiang@huawei.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.