lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150721075120.GB25542@gmail.com>
Date:	Tue, 21 Jul 2015 09:51:21 +0200
From:	Ingo Molnar <mingo@...nel.org>
To:	Srikar Dronamraju <srikar@...ux.vnet.ibm.com>
Cc:	Peter Zijlstra <peterz@...radead.org>,
	linux-kernel@...r.kernel.org, Rik van Riel <riel@...hat.com>,
	Mel Gorman <mgorman@...e.de>
Subject: Re: [PATCH] sched/numa: Disable sched_numa_balancing on uma systems


* Srikar Dronamraju <srikar@...ux.vnet.ibm.com> wrote:

> Commit 2a1ed24 ("sched/numa: Prefer NUMA hotness over cache hotness")
> sets sched feature NUMA to true. However this can enable numa hinting
> faults on a uma system.
> 
> This commit ensures that numa hinting faults occur only on a numa system
> by setting/resetting sched_numa_balancing.
> 
> This commit
> - Renames numabalancing_enabled to sched_numa_balancing
> - Makes sched_numa_balancing common to CONFIG_SCHED_DEBUG and
>   !CONFIG_SCHED_DEBUG. Earlier it was only in !CONFIG_SCHED_DEBUG
> - Checks for sched_numa_balancing instead of sched_feat(NUMA)
> 
> Signed-off-by: Srikar Dronamraju <srikar@...ux.vnet.ibm.com>
> ---
>  kernel/sched/core.c  | 16 ++++++----------
>  kernel/sched/fair.c  |  8 ++++----
>  kernel/sched/sched.h | 10 ++--------
>  3 files changed, 12 insertions(+), 22 deletions(-)
> 
> diff --git a/kernel/sched/core.c b/kernel/sched/core.c
> index 78b4bad10..4722f5c 100644
> --- a/kernel/sched/core.c
> +++ b/kernel/sched/core.c
> @@ -2059,22 +2059,18 @@ static void __sched_fork(unsigned long clone_flags, struct task_struct *p)
>  }
>  
>  #ifdef CONFIG_NUMA_BALANCING
> -#ifdef CONFIG_SCHED_DEBUG
> +__read_mostly bool sched_numa_balancing;
> +
>  void set_numabalancing_state(bool enabled)
>  {
> +	sched_numa_balancing = enabled;
> +#ifdef CONFIG_SCHED_DEBUG
>  	if (enabled)
>  		sched_feat_set("NUMA");
>  	else
>  		sched_feat_set("NO_NUMA");

So why is the 'NUMA' sched_features option still twiddled? Your patch splits out a 
sched_numa_balancing flag - so the NUMA/NO_NUMA feature can go away, right?

Thanks,

	Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ