mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Byungchul Park <byungchul.park@lge.com>
Cc: mingo@kernel.org, linux-kernel@vger.kernel.org,
	yuyang.du@intel.com, pjt@google.com, efault@gmx.de,
	tglx@linutronix.de
Subject: Re: [PATCH v3 1/3] sched: introduce a new migration flag to task_struct
Date: Thu, 15 Oct 2015 20:34:14 +0200	[thread overview]
Message-ID: <20151015183414.GN3816@twins.programming.kicks-ass.net> (raw)
In-Reply-To: <20151015122644.GA28741@byungchulpark-X58A-UD3R>

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].

  reply	other threads:[~2015-10-15 18:34 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-15  9:01 [PATCH v3 0/3] sched: account fair load avg consistently byungchul.park
2015-10-15  9:01 ` [PATCH v3 1/3] sched: introduce a new migration flag to task_struct byungchul.park
2015-10-15 11:18   ` Peter Zijlstra
2015-10-15 12:26     ` Byungchul Park
2015-10-15 18:34       ` Peter Zijlstra [this message]
2015-10-15  9:01 ` [PATCH v3 2/3] sched: factor out the code getting cfs_rq's last_update_time byungchul.park
2015-10-15  9:01 ` [PATCH v3 3/3] sched: make it possible to account fair class load avg consistently byungchul.park

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=20151015183414.GN3816@twins.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=byungchul.park@lge.com \
    --cc=efault@gmx.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=pjt@google.com \
    --cc=tglx@linutronix.de \
    --cc=yuyang.du@intel.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