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 v2 1/2] sched: make each sched class handle its rq assignment in their own class
Date: Wed, 14 Oct 2015 11:30:24 +0200 [thread overview]
Message-ID: <20151014093024.GB3816@twins.programming.kicks-ass.net> (raw)
In-Reply-To: <20151014092630.GX6455@byungchulpark-X58A-UD3R>
On Wed, Oct 14, 2015 at 06:26:30PM +0900, Byungchul Park wrote:
> On Wed, Oct 14, 2015 at 11:00:16AM +0200, Peter Zijlstra wrote:
> > On Wed, Oct 14, 2015 at 05:42:09PM +0900, byungchul.park@lge.com wrote:
> > > +static inline void set_task_rq(struct task_struct *p, unsigned int cpu)
> > > +{
> > > + const struct sched_class *class;
> > > +
> > > + for_each_class(class) {
> > > + if (class->set_task_rq)
> > > + class->set_task_rq(p, cpu);
> > > + }
> > > +}
> >
> > So I worry about this, because the class structures are not all in the
> > same translation unit, GCC cannot (without -fwhole-program) optimize
> > that all away.
>
> i wondered if it was so, and it was.
--combine might be enough, and might make sense for all the
kernel/sched/ file, but that too is not something we currently do.
> > This means we'll do 5 cacheline loads and 2 indirect calls, on _every_
> > cpu migration.
>
> i agree with your this concern. to avoid this concern, it can be done by
> hard coding as current code.. but we will lose code flexability. i thought
> migration overhead was not so important since it hardly happens.
It happens quite a lot, just not _as_ often as regular context
switching.
next prev parent reply other threads:[~2015-10-14 9:30 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-14 8:42 [PATCH v2 0/2] sched: account fair load avg consistently byungchul.park
2015-10-14 8:42 ` [PATCH v2 1/2] sched: make each sched class handle its rq assignment in their own class byungchul.park
2015-10-14 9:00 ` Peter Zijlstra
2015-10-14 9:26 ` Byungchul Park
2015-10-14 9:30 ` Peter Zijlstra [this message]
2015-10-14 10:16 ` Byungchul Park
2015-10-14 8:42 ` [PATCH v2 2/2] 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=20151014093024.GB3816@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
all inboxes | Powered by JetHome®