Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1180509

Re: [PATCH] sched/numa: Restore sched feature NUMA to its earlier avatar.

From Ingo Molnar <mingo@kernel.org>
Newsgroups linux.kernel
Subject Re: [PATCH] sched/numa: Restore sched feature NUMA to its earlier avatar.
Date 2015-07-09 10:10 +0200
Message-ID <pKf45-69s-7@gated-at.bofh.it> (permalink)
References <pJXAd-3fG-17@gated-at.bofh.it> <pJY3g-3ql-5@gated-at.bofh.it> <pJZsm-4ox-3@gated-at.bofh.it> <pKdvk-57Q-13@gated-at.bofh.it> <pKdYm-5hh-11@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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

> > So I find the patch, the description and the comments in the code conflicting and 
> > confusing.
> > 
> > The patch does this:
> > 
> > @@ -5676,10 +5676,10 @@ static int migrate_degrades_locality(struct task_struct *p, struct lb_env *env)
> >         unsigned long src_faults, dst_faults;
> >         int src_nid, dst_nid;
> > 
> > -       if (!p->numa_faults || !(env->sd->flags & SD_NUMA))
> > +       if (!sched_feat(NUMA) || !sched_feat(NUMA_FAVOUR_HIGHER))
> >                 return -1;
> > 
> > -       if (!sched_feat(NUMA))
> > +       if (!p->numa_faults || !(env->sd->flags & SD_NUMA))
> >                 return -1;
> > 
> >         src_nid = cpu_to_node(env->src_cpu);
> > 
> > 
> > while the default for 'NUMA' is 0, 'NUMA_FAVOUR_HIGHER' is 1.
> > 
> > Which in itself is confusing: WTH do we have a generic switch called 'NUMA' and 
> > then have it disabled?
> 
> NUMA feature gets enabled on multi-node boxes because of
> 
> start_kernel() -> numa_policy_init() -> check_numabalancing_enable() ->
>  set_numabalancing_state() -> sched_feat_set("NUMA");

Ugh, that is nonsensical!

If CONFIG_SCHED_DEBUG is disabled then sched_features is a constant value:

  # define const_debug const

  ...

  extern const_debug unsigned int sysctl_sched_features;

sched_features are _only_ meant for debugging. They turn into an unchangeable set 
of features when SCHED_DEBUG is disabled - and that is very much by design.

The whole set_numabalancing_state() muck needs to be fixed.

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/

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

Re: [PATCH] sched/numa: Restore sched feature NUMA to its earlier  avatar. Ingo Molnar <mingo@kernel.org> - 2015-07-09 10:10 +0200
  Re: [PATCH] sched/numa: Restore sched feature NUMA to its earlier  avatar. Srikar Dronamraju <srikar@linux.vnet.ibm.com> - 2015-07-10 19:30 +0200
    Re: [PATCH] sched/numa: Restore sched feature NUMA to its earlier  avatar. Ingo Molnar <mingo@kernel.org> - 2015-07-11 11:00 +0200

csiph-web