From: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
To: Ingo Molnar <mingo@kernel.org>
Cc: Rik van Riel <riel@redhat.com>,
Peter Zijlstra <peterz@infradead.org>,
linux-kernel@vger.kernel.org, Mel Gorman <mgorman@suse.de>
Subject: Re: [PATCH] sched/numa: Restore sched feature NUMA to its earlier avatar.
Date: Thu, 9 Jul 2015 12:27:46 +0530 [thread overview]
Message-ID: <20150709065746.GE26095@linux.vnet.ibm.com> (raw)
In-Reply-To: <20150709062926.GA31232@gmail.com>
> 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");
>
> Secondly, and more importantly, this patch is equivalent to adding this (for the
> default case):
>
> return -1;
This is true on only UMA box. On a numa box, the NUMA feature would be
enabled, so it wouldnt return -1 by default.
>
> i.e. it's in essence a revert of 8a9e62a!
>
While 8a9e62a did miss the part where we would enable NUMA on numa
boxes, this commit doesnt completely revert 8a9e62a.
> And it provides no explanation whatsoever. Why did we do the original change
> (8a9e62a) which was well argued but apparently broken in some fashion, and why do
> we want to change it back now?
The original change "8a9e62a" gives preference to numa hotness compared
to cache hotness. The rational being, for numa workloads tasks are
better of looking at numa convergence than be spread based on cache
hotness. migrate_swap/migrate_task_to already move tasks without
bothering about cache hotness so that convergence is achieved.
>
> I.e. this patch sucks on multiple grounds, and 8a9e62a probably sucks as well. And
> you added a Reviewed-by while you should have noticed at least 2-3 flaws in the
> patch and its approach. Not good.
>
--
Thanks and Regards
Srikar Dronamraju
next prev parent reply other threads:[~2015-07-09 6:58 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-08 13:20 [PATCH] sched/numa: Restore sched feature NUMA to its earlier avatar Srikar Dronamraju
2015-07-08 13:50 ` Rik van Riel
2015-07-08 13:56 ` Ingo Molnar
2015-07-08 15:26 ` Rik van Riel
2015-07-09 6:29 ` Ingo Molnar
2015-07-09 6:57 ` Srikar Dronamraju [this message]
2015-07-09 8:01 ` Ingo Molnar
2015-07-10 17:28 ` Srikar Dronamraju
2015-07-11 8:53 ` Ingo Molnar
2015-07-08 16:06 ` Srikar Dronamraju
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150709065746.GE26095@linux.vnet.ibm.com \
--to=srikar@linux.vnet.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mgorman@suse.de \
--cc=mingo@kernel.org \
--cc=peterz@infradead.org \
--cc=riel@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).