* Srikar Dronamraju <[email protected]> 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 <[email protected]>
> ---
>  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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to