public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Pavel Machek <pavel@ucw.cz>
Cc: mingo@redhat.com, linux-kernel@vger.kernel.org,
	cooloney@gmail.com, rpurdie@rpsys.net, j.anaszewski@samsung.com,
	linux-leds@vger.kernel.org
Subject: Re: CPU LED trigger: add hooks to generic code so that it works on x86
Date: Wed, 27 May 2015 14:17:23 +0200	[thread overview]
Message-ID: <20150527121723.GA3644@twins.programming.kicks-ass.net> (raw)
In-Reply-To: <20150527084718.GA4991@amd>

On Wed, May 27, 2015 at 10:47:18AM +0200, Pavel Machek wrote:
> 
> Distros should not enable this, IMO. But I don't think overhead is
> that big in either case.

Coming back from idle there might not be any cache, and you're adding at
least 1 more cache miss for loading cpu_trig -- those hurt. Looking at
that code, in case of !trig, you do a pointless function call before
bailing.

The thing is, there already is too much code in the wake from idle path,
adding more is not my favourite thing.

One thing you could do is wrap the call to ledtrig_cpu() in a
static_key, that way all we do is add some i$ pollution, but at least we
avoid the data cache miss when there's nothing to do.

      reply	other threads:[~2015-05-27 12:17 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-27  6:57 CPU LED trigger: add hooks to generic code so that it works on x86 Pavel Machek
2015-05-27  7:43 ` Peter Zijlstra
2015-05-27  7:47   ` Pavel Machek
2015-05-27  8:08     ` Peter Zijlstra
2015-05-27  8:47       ` Pavel Machek
2015-05-27 12:17         ` Peter Zijlstra [this message]

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=20150527121723.GA3644@twins.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=cooloney@gmail.com \
    --cc=j.anaszewski@samsung.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-leds@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=pavel@ucw.cz \
    --cc=rpurdie@rpsys.net \
    /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