From: Frederic Weisbecker <fweisbec@gmail.com>
To: Viresh Kumar <viresh.kumar@linaro.org>
Cc: Thomas Gleixner <tglx@linutronix.de>,
Peter Zijlstra <peterz@infradead.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Lists linaro-kernel <linaro-kernel@lists.linaro.org>,
Steven Rostedt <rostedt@goodmis.org>,
Linaro Networking <linaro-networking@linaro.org>,
Kevin Hilman <khilman@linaro.org>
Subject: Re: [QUERY]: Is using CPU hotplug right for isolating CPUs?
Date: Tue, 28 Jan 2014 14:23:08 +0100 [thread overview]
Message-ID: <20140128132306.GB9172@localhost.localdomain> (raw)
In-Reply-To: <CAKohpok5AObcFbOmLYGT-KkjhVHUiLRZ=AYqofYk59_sVneSjA@mail.gmail.com>
On Fri, Jan 24, 2014 at 10:51:14AM +0530, Viresh Kumar wrote:
> On 23 January 2014 20:28, Frederic Weisbecker <fweisbec@gmail.com> wrote:
> > On Tue, Jan 21, 2014 at 04:03:53PM +0530, Viresh Kumar wrote:
>
> >> So, the main problem in my case was caused by this:
> >>
> >> <...>-2147 [001] d..2 302.573881: hrtimer_start:
> >> hrtimer=c172aa50 function=tick_sched_timer expires=602075000000
> >> softexpires=602075000000
> >>
> >> I have mentioned this earlier when I sent you attachments. I think
> >> this is somehow
> >> tied with the NO_HZ_FULL stuff? As the timer is queued for 300 seconds after
> >> current time.
> >>
> >> How to get this out?
> >
> > So it's scheduled away 300 seconds later. It might be a pending timer_list. Enabling the
> > timer tracepoints may give you some clues.
>
> Trace was done with that enabled. /proc/timer_list confirms that a hrtimer
> is queued for 300 seconds later for tick_sched_timer. And so I assumed
> this is part of the current NO_HZ_FULL implementation.
>
> Just to confirm, when we decide that a CPU is running a single task and so
> can enter tickless mode, do we queue this tick_sched_timer for 300 seconds
> ahead of time? If not, then who is doing this :)
No, when a single task is running on a full dynticks CPU, the tick is supposed to run
every seconds. I'm actually suprised it doesn't happen in your traces, did you tweak
something specific?
The 300 seconds timer is probably due to a timer_list, just enable the
timer_start and timer_expire_entry events to get the name of the culprit.
>
> >> Which CPUs are housekeeping CPUs? How do we declare them?
> >
> > It's not yet implemented, but it's an idea (partly from Thomas) of something we can do to
> > define some general policy on various periodic/async work affinity to enforce isolation.
> >
> > The basic idea is to define the CPU handling the timekeeping duty to be the housekeeping
> > CPU. Given that CPU must keep a periodic tick, lets move all the unbound timers and
> > workqueues there. And also try to move some CPU affine work as well. For example
> > we could handle the scheduler tick of the full dynticks CPUs into that housekeeping
> > CPU, at a low freqency. This way we could remove that 1 second scheduler tick max deferment
> > per CPU. It may be an overkill though to run all the scheduler ticks on a single CPU so there
> > may be other ways to cope with that.
> >
> > And I would like to keep that housekeeping notion flexible enough to be extendable on more
> > than one CPU, as I heard that some people plan to reserve one CPU per node on big
> > NUMA machines for such a purpose. So that could be a cpumask, augmented with an infrastructure.
> >
> > Of course, if some people help contributing in this area, some things may eventually move foward
> > on the support of CPU isolation. I can't do that all alone, at least not quickly, given all the
> > things already pending in my queue (fix buggy nohz iowait accounting, support RCU full sysidle detection,
> > apply AMD range breakpoints patches, further cleanup posix cpu timers, etc...).
>
> I see. As I am currently working on the isolation stuff which is very
> much required
> for my usecase, I will try to do that as the second step of my work.
> The first one
> stays something like a cpuset.quiesce option that PeterZ suggested.
Cool!
>
> Any pointers of earlier discussion on this topic would be helpful to
> start working on
> this..
I think that being able to control the UNBOUND workqueue affinity may be a nice
first step.
Thanks.
next prev parent reply other threads:[~2014-01-28 13:23 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-15 9:27 Viresh Kumar
2014-01-15 10:38 ` Peter Zijlstra
2014-01-15 10:47 ` Viresh Kumar
2014-01-15 11:34 ` Peter Zijlstra
2014-02-28 9:04 ` Viresh Kumar
2014-01-15 17:17 ` Frederic Weisbecker
[not found] ` <CAKohponEZydR1OmP2xziA9bc3OJPgP3bFmuWFQmrmeQFZccMVQ@mail.gmail.com>
2014-01-16 9:46 ` Thomas Gleixner
2014-01-20 11:30 ` Viresh Kumar
2014-01-20 15:51 ` Frederic Weisbecker
2014-01-21 10:33 ` Viresh Kumar
2014-01-23 14:58 ` Frederic Weisbecker
2014-01-24 5:21 ` Viresh Kumar
2014-01-24 8:29 ` Mike Galbraith
2014-01-28 13:23 ` Frederic Weisbecker [this message]
2014-01-28 16:11 ` Kevin Hilman
2014-02-03 8:26 ` Viresh Kumar
2014-02-11 8:52 ` Viresh Kumar
2014-02-13 14:20 ` Frederic Weisbecker
2014-01-20 13:59 ` Lei Wen
2014-01-20 15:00 ` Viresh Kumar
2014-01-20 15:41 ` Frederic Weisbecker
2014-01-21 2:07 ` Lei Wen
2014-01-21 9:50 ` Viresh Kumar
2014-01-23 13:54 ` Frederic Weisbecker
2014-01-23 14:27 ` Viresh Kumar
2014-01-21 9:49 ` Viresh Kumar
2014-01-23 14:01 ` Frederic Weisbecker
2014-01-24 8:53 ` Viresh Kumar
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=20140128132306.GB9172@localhost.localdomain \
--to=fweisbec@gmail.com \
--cc=khilman@linaro.org \
--cc=linaro-kernel@lists.linaro.org \
--cc=linaro-networking@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=tglx@linutronix.de \
--cc=viresh.kumar@linaro.org \
/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