Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1248066
| From | Peter Zijlstra <peterz@infradead.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v3 1/3] sched: introduce a new migration flag to task_struct |
| Date | 2015-10-15 20:40 +0200 |
| Message-ID | <qjVBv-6l0-5@gated-at.bofh.it> (permalink) |
| References | <qjMHU-1Qp-5@gated-at.bofh.it> <qjMHU-1Qp-15@gated-at.bofh.it> <qjOJI-4LQ-25@gated-at.bofh.it> <qjPPr-6jU-5@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Thu, Oct 15, 2015 at 09:26:44PM +0900, Byungchul Park wrote:
> On Thu, Oct 15, 2015 at 01:18:13PM +0200, Peter Zijlstra wrote:
> > On Thu, Oct 15, 2015 at 06:01:14PM +0900, byungchul.park@lge.com wrote:
> > > From: Byungchul Park <byungchul.park@lge.com>
> > >
> > > This patch removes a weird coupling between se->avg.last_update_time and
> > > the condition checking for migration, and introduce a new migration flag.
> > > Now, scheduler can use the flag instead of se->avg.last_update_time to
> > > check if migration already happened or not.
> >
> > Was there a problem with that coupling? This does not explain.
>
> The reason why i introduce the new flag is that 3/3 patch makes
> se->avg.last_update_time non-zero consistently, so we cannot use the
> condition "se->avg.last_update_time == 0" to check if migration has
> happened.
It would have been ever so good to have had that in the Changelog.
> > > diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h
> > > index af6f252..66d0552 100644
> > > --- a/kernel/sched/sched.h
> > > +++ b/kernel/sched/sched.h
> > > @@ -1158,6 +1158,7 @@ static const u32 prio_to_wmult[40] = {
> > > #define ENQUEUE_WAKING 0
> > > #endif
> > > #define ENQUEUE_REPLENISH 8
> > > +#define ENQUEUE_MIGRATED 16
> >
> > Won't actually apply that..
>
> Okay, I got your concern, let me think more..
Ah, so what I means was that that hunk will not apply. I see that what I
typed did not express that as clearly as I might have wanted.
Current code looks like:
#define ENQUEUE_REPLENISH 0x08
#define ENQUEUE_RESTORE 0x10
> By the way, what do you think about the approach of 3/3 patch?
Again a wee bit of worry. I like it for 64bits as there its nearly free
and does the right thing, but on 32bit we add 2 smp_rmb() invocations
(which are not free on ARM etc..). [Note that one could rewrite that
function to require but a single rmb].
--
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 | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v3 0/3] sched: account fair load avg consistently <byungchul.park@lge.com> - 2015-10-15 11:10 +0200
[PATCH v3 1/3] sched: introduce a new migration flag to task_struct <byungchul.park@lge.com> - 2015-10-15 11:10 +0200
Re: [PATCH v3 1/3] sched: introduce a new migration flag to task_struct Peter Zijlstra <peterz@infradead.org> - 2015-10-15 13:20 +0200
Re: [PATCH v3 1/3] sched: introduce a new migration flag to task_struct Byungchul Park <byungchul.park@lge.com> - 2015-10-15 14:30 +0200
Re: [PATCH v3 1/3] sched: introduce a new migration flag to task_struct Peter Zijlstra <peterz@infradead.org> - 2015-10-15 20:40 +0200
[PATCH v3 3/3] sched: make it possible to account fair class load avg consistently <byungchul.park@lge.com> - 2015-10-15 11:10 +0200
csiph-web