mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: 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:00:16 +0200	[thread overview]
Message-ID: <20151014090016.GR17308@twins.programming.kicks-ass.net> (raw)
In-Reply-To: <1444812130-17880-2-git-send-email-byungchul.park@lge.com>

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.

This means we'll do 5 cacheline loads and 2 indirect calls, on _every_
cpu migration.

  reply	other threads:[~2015-10-14  9:00 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 [this message]
2015-10-14  9:26     ` Byungchul Park
2015-10-14  9:30       ` Peter Zijlstra
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=20151014090016.GR17308@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®