lkml.org 
[lkml]   [2015]   [Sep]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] numa-balancing: fix confusion in /proc/sys/kernel/numa_balancing
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



\
 
 \ /
  Last update: 2015-09-14 08:41    [W:0.035 / U:0.532 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site