mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Henrik Austad <henrik@austad.us>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: LKML <linux-kernel@vger.kernel.org>,
	Henrik Austad <haustad@cisco.com>,
	Peter Zijlstra <peterz@infradead.org>,
	Frederic Weisbecker <fweisbec@gmail.com>,
	John Stultz <john.stultz@linaro.org>
Subject: Re: [PATCH Resend] Expose do_timer CPU via sysctl to userspace as R/W
Date: Wed, 19 Feb 2014 20:43:55 +0100	[thread overview]
Message-ID: <20140219194355.GA23228@austad.us> (raw)
In-Reply-To: <alpine.DEB.2.02.1402191730590.4468@ionos.tec.linutronix.de>

On Wed, Feb 19, 2014 at 05:42:07PM +0100, Thomas Gleixner wrote:
> On Wed, 19 Feb 2014, henrik@austad.us wrote:
> > From: Henrik Austad <haustad@cisco.com>
> > 
> > Looks like this got dropped by vger a few days ago, resending.
> > 
> > This allows everybody in a system to read which core is currently
> > running do_timer() as well as letting root change this.
> > 
> > A few things to keep in mind
> > 
> > - This is intended as a debug-feature, except for testing whether or not
> >   the target CPU is present or not, the logic will not care -one- bit if
> >   moving the do_timer to that particular CPU is a good idea.
> 
> Well at least it must check that the cpu is online and neither in
> nohz idle nor nohz full mode.

The online-part should be taken care of by the cpu_present(), no?

But the nohz idle/nohz full should be checked, I agree.

> And we probably want to have that in sysfs with two files:
> 
>     timekeeping/current_cpu
>     timekeeping/forced_cpu

Fair enough, I can add that

> The latter contains -1 when the system boots and if you write to it,
> the duty gets hard assigned to that core, which in turn makes it
> blocked from NOHZ idle and NOHZ full modes. If the core goes offline,
> then the value must got back to -1. Writing -1 to it undoes the hard
> assignment.

Yeah, sounds like a good approach.

> > - It introduces more ifdeffery in the kernel.
> 
> There is no reason to do that.

probably not, as you can see, I wrapped everything in 
CONFIG_EXPOSE_TICK_CPU and added an option in Kconfig. Just drop all of 
that?

Thanks for the feedback! :)

-- 
Henrik Austad

  reply	other threads:[~2014-02-19 19:46 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-19 12:32 henrik
2014-02-19 16:42 ` Thomas Gleixner
2014-02-19 19:43   ` Henrik Austad [this message]
2014-02-19 19:50     ` Peter Zijlstra

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=20140219194355.GA23228@austad.us \
    --to=henrik@austad.us \
    --cc=fweisbec@gmail.com \
    --cc=haustad@cisco.com \
    --cc=john.stultz@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.de \
    /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®