From: Joonsoo Kim <iamjoonsoo.kim@lge.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: Ingo Molnar <mingo@redhat.com>,
Srivatsa Vaddagiri <vatsa@linux.vnet.ibm.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 4/8] sched: clean up move_task() and move_one_task()
Date: Wed, 20 Mar 2013 16:33:55 +0900 [thread overview]
Message-ID: <20130320073355.GC11672@lge.com> (raw)
In-Reply-To: <1363703415.22553.54.camel@laptop>
On Tue, Mar 19, 2013 at 03:30:15PM +0100, Peter Zijlstra wrote:
> On Thu, 2013-02-14 at 14:48 +0900, Joonsoo Kim wrote:
> > Some validation for task moving is performed in move_tasks() and
> > move_one_task(). We can move these code to can_migrate_task()
> > which is already exist for this purpose.
>
> > @@ -4011,18 +4027,7 @@ static int move_tasks(struct lb_env *env)
> > break;
> > }
> >
> > - if (throttled_lb_pair(task_group(p), env->src_cpu, env->dst_cpu))
> > - goto next;
> > -
> > - load = task_h_load(p);
> > -
> > - if (sched_feat(LB_MIN) && load < 16 && !env->sd->nr_balance_failed)
> > - goto next;
> > -
> > - if ((load / 2) > env->imbalance)
> > - goto next;
> > -
> > - if (!can_migrate_task(p, env))
> > + if (!can_migrate_task(p, env, false, &load))
> > goto next;
> >
> > move_task(p, env);
>
> Right, so I'm not so taken with this one. The whole load stuff really
> is a balance heuristic that's part of move_tasks(), move_one_task()
> really doesn't care about that.
>
> So why did you include it? Purely so you didn't have to re-order the
> tests? I don't see any reason not to flip a tests around.
I think that I'm not fully understand what you are concerning, because of
my poor English. If possible, please elaborate on a problem in more detail.
First of all, I do my best to answer your question.
Patch 4/8, 5/8 are for mitigating useless redoing overhead caused
by LBF_ALL_PINNED. For this purpose, we should check 'cpu affinity'
before evaluating a load. Just moving up can_migrate_task() above
load evaluation code may raise side effect, because can_migrate_task() have
other checking which is 'cache hottness'. I don't want a side effect. So
embedding load evaluation to can_migrate_task() and re-order checking and
makes load evaluation disabled for move_one_task().
If your recommandation is to move up can_mirate_task() above
load evaluation code, yes, I can, and will do that. :)
Please let me know what I am misunderstand.
Thanks.
> --
> 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/
next prev parent reply other threads:[~2013-03-20 7:33 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-14 5:48 [PATCH 0/8] correct load_balance() Joonsoo Kim
2013-02-14 5:48 ` [PATCH 1/8] sched: change position of resched_cpu() in load_balance() Joonsoo Kim
2013-03-19 12:59 ` Peter Zijlstra
2013-02-14 5:48 ` [PATCH 2/8] sched: explicitly cpu_idle_type checking in rebalance_domains() Joonsoo Kim
2013-03-19 14:02 ` Peter Zijlstra
2013-03-20 6:48 ` Joonsoo Kim
2013-02-14 5:48 ` [PATCH 3/8] sched: don't consider other cpus in our group in case of NEWLY_IDLE Joonsoo Kim
2013-03-19 14:20 ` Peter Zijlstra
2013-03-20 6:52 ` Joonsoo Kim
2013-02-14 5:48 ` [PATCH 4/8] sched: clean up move_task() and move_one_task() Joonsoo Kim
2013-03-19 14:30 ` Peter Zijlstra
2013-03-20 7:33 ` Joonsoo Kim [this message]
2013-03-20 11:11 ` Peter Zijlstra
2013-03-20 13:42 ` JoonSoo Kim
2013-03-20 11:16 ` Peter Zijlstra
2013-03-20 12:07 ` Peter Zijlstra
2013-02-14 5:48 ` [PATCH 5/8] sched: move up affinity check to mitigate useless redoing overhead Joonsoo Kim
2013-02-14 5:48 ` [PATCH 6/8] sched: rename load_balance_tmpmask to load_balance_cpu_active Joonsoo Kim
2013-03-19 15:01 ` Peter Zijlstra
2013-03-20 7:35 ` Joonsoo Kim
2013-02-14 5:48 ` [PATCH 7/8] sched: prevent to re-select dst-cpu in load_balance() Joonsoo Kim
2013-03-19 15:05 ` Peter Zijlstra
2013-03-20 7:43 ` Joonsoo Kim
2013-03-20 12:38 ` Peter Zijlstra
2013-03-20 13:48 ` JoonSoo Kim
2013-02-14 5:48 ` [PATCH 8/8] sched: reset lb_env when redo " Joonsoo Kim
2013-03-19 15:21 ` Peter Zijlstra
2013-03-20 8:13 ` Joonsoo Kim
2013-02-25 4:56 ` [PATCH 0/8] correct load_balance() Joonsoo Kim
2013-03-19 5:11 ` Joonsoo Kim
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=20130320073355.GC11672@lge.com \
--to=iamjoonsoo.kim@lge.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=vatsa@linux.vnet.ibm.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
Powered by JetHome