From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wi0-f169.google.com (mail-wi0-f169.google.com [209.85.212.169]) by kanga.kvack.org (Postfix) with ESMTP id 9E7C56B0253 for ; Mon, 14 Sep 2015 03:43:21 -0400 (EDT) Received: by wicfx3 with SMTP id fx3so127976301wic.1 for ; Mon, 14 Sep 2015 00:43:21 -0700 (PDT) Received: from mail-wi0-x233.google.com (mail-wi0-x233.google.com. [2a00:1450:400c:c05::233]) by mx.google.com with ESMTPS id b4si15509143wiw.10.2015.09.14.00.43.20 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 14 Sep 2015 00:43:20 -0700 (PDT) Received: by wicfx3 with SMTP id fx3so120702315wic.0 for ; Mon, 14 Sep 2015 00:43:20 -0700 (PDT) Date: Mon, 14 Sep 2015 09:43:17 +0200 From: Ingo Molnar Subject: Re: [PATCH] numa-balancing: fix confusion in /proc/sys/kernel/numa_balancing Message-ID: <20150914074317.GA8966@gmail.com> References: <55F6684F.4010007@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <55F6684F.4010007@huawei.com> Sender: owner-linux-mm@kvack.org List-ID: To: Xishi Qiu Cc: Ingo Molnar , Peter Zijlstra , Andrew Morton , zhongjiang@huawei.com, Linux MM , LKML * Xishi Qiu 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 > --- > 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: email@kvack.org From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753779AbbINHnW (ORCPT ); Mon, 14 Sep 2015 03:43:22 -0400 Received: from mail-wi0-f176.google.com ([209.85.212.176]:38473 "EHLO mail-wi0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752740AbbINHnV (ORCPT ); Mon, 14 Sep 2015 03:43:21 -0400 Date: Mon, 14 Sep 2015 09:43:17 +0200 From: Ingo Molnar To: Xishi Qiu Cc: Ingo Molnar , Peter Zijlstra , Andrew Morton , zhongjiang@huawei.com, Linux MM , LKML Subject: Re: [PATCH] numa-balancing: fix confusion in /proc/sys/kernel/numa_balancing Message-ID: <20150914074317.GA8966@gmail.com> References: <55F6684F.4010007@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <55F6684F.4010007@huawei.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Xishi Qiu 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 > --- > 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