Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1223841 > unrolled thread
| Started by | Xishi Qiu <qiuxishi@huawei.com> |
|---|---|
| First post | 2015-09-14 08:30 +0200 |
| Last post | 2015-09-15 03:40 +0200 |
| Articles | 3 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH] numa-balancing: fix confusion in /proc/sys/kernel/numa_balancing Xishi Qiu <qiuxishi@huawei.com> - 2015-09-14 08:30 +0200
Re: [PATCH] numa-balancing: fix confusion in /proc/sys/kernel/numa_balancing Ingo Molnar <mingo@kernel.org> - 2015-09-14 09:50 +0200
Re: [PATCH] numa-balancing: fix confusion in /proc/sys/kernel/numa_balancing Xishi Qiu <qiuxishi@huawei.com> - 2015-09-15 03:40 +0200
| From | Xishi Qiu <qiuxishi@huawei.com> |
|---|---|
| Date | 2015-09-14 08:30 +0200 |
| Subject | [PATCH] numa-balancing: fix confusion in /proc/sys/kernel/numa_balancing |
| Message-ID | <q8vr4-6t7-13@gated-at.bofh.it> |
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 from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [next] | [standalone]
| From | Ingo Molnar <mingo@kernel.org> |
|---|---|
| Date | 2015-09-14 09:50 +0200 |
| Subject | Re: [PATCH] numa-balancing: fix confusion in /proc/sys/kernel/numa_balancing |
| Message-ID | <q8wGv-8aY-19@gated-at.bofh.it> |
| In reply to | #1223841 |
* 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 from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Xishi Qiu <qiuxishi@huawei.com> |
|---|---|
| Date | 2015-09-15 03:40 +0200 |
| Message-ID | <q8NnX-6UN-1@gated-at.bofh.it> |
| In reply to | #1223887 |
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 from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web