* [PATCH] numa-balancing: fix confusion in /proc/sys/kernel/numa_balancing
@ 2015-09-14 6:25 Xishi Qiu
2015-09-14 7:43 ` Ingo Molnar
0 siblings, 1 reply; 3+ messages in thread
From: Xishi Qiu @ 2015-09-14 6:25 UTC (permalink / raw)
To: Ingo Molnar, Peter Zijlstra, Andrew Morton, zhongjiang; +Cc: Linux MM, LKML
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>
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] numa-balancing: fix confusion in /proc/sys/kernel/numa_balancing
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-15 1:34 ` Xishi Qiu
0 siblings, 1 reply; 3+ messages in thread
From: Ingo Molnar @ 2015-09-14 7:43 UTC (permalink / raw)
To: Xishi Qiu
Cc: Ingo Molnar, Peter Zijlstra, Andrew Morton, zhongjiang, Linux MM,
LKML
* Xishi Qiu <qiuxishi@huawei.com> wrote:
> 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;
So in the latest scheduler tree this variable got renamed, please adjust your
patch:
git git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git sched/core
Thanks,
Ingo
--
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>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] numa-balancing: fix confusion in /proc/sys/kernel/numa_balancing
2015-09-14 7:43 ` Ingo Molnar
@ 2015-09-15 1:34 ` Xishi Qiu
0 siblings, 0 replies; 3+ messages in thread
From: Xishi Qiu @ 2015-09-15 1:34 UTC (permalink / raw)
To: Ingo Molnar
Cc: Ingo Molnar, Peter Zijlstra, Andrew Morton, zhongjiang, Linux MM,
LKML
On 2015/9/14 15:43, Ingo Molnar wrote:
>
> * Xishi Qiu <qiuxishi@huawei.com> wrote:
>
>> 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;
>
> So in the latest scheduler tree this variable got renamed, please adjust your
> patch:
>
> git git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git sched/core
>
Hi Ingo,
I tested the latest kernel in the above tree, it seems that the problem has
been fixed. So please drop this patch.
Thanks,
Xishi Qiu
>
> Thanks,
>
> Ingo
>
>
--
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>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-09-15 1:44 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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-15 1:34 ` Xishi Qiu
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).