From: Frederic Weisbecker <fweisbec@gmail.com>
To: Kevin Hilman <khilman@linaro.org>
Cc: Viresh Kumar <viresh.kumar@linaro.org>,
Lists linaro-kernel <linaro-kernel@lists.linaro.org>,
Linaro Networking <linaro-networking@linaro.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Tejun Heo <tj@kernel.org>
Subject: Re: [Query] Ticks happen in pair for NO_HZ_FULL cores ?
Date: Tue, 17 Dec 2013 17:57:28 +0100 [thread overview]
Message-ID: <20131217165726.GA18689@localhost.localdomain> (raw)
In-Reply-To: <87wqj34eqs.fsf@linaro.org>
On Tue, Dec 17, 2013 at 08:35:39AM -0800, Kevin Hilman wrote:
> Viresh Kumar <viresh.kumar@linaro.org> writes:
>
> > Sorry for the delay, was on holidays..
> >
> > On 11 December 2013 18:52, Frederic Weisbecker <fweisbec@gmail.com> wrote:
> >> On Tue, Dec 03, 2013 at 01:57:37PM +0530, Viresh Kumar wrote:
> >>> - again got arch_timer interrupt after 5 ms (HZ=200)
> >>
> >> Right, looking at the details, the 2nd interrupt is caused by workqueue delayed
> >> work bdi writeback.
> >
> > I am not that great at reading traces or kernelshark output, but I
> > still feel I haven't
> > seen anything wrong. And I wasn't talking about the delayed workqueue here..
> >
> > I am looking at the trace I attached with kernelshark after filtering
> > out CPU0 events:
> > - Event 41, timestamp: 159.891973
> > - it ends at event 56, timestamp: 159.892043
>
> For future reference, for generating email friendly trace output for
> discussion like this, you can use something like:
>
> trace-cmd report --cpu=1 trace.dat
>
> > And after that the next event comes after 5 Seconds.
> >
> > And so I was talking for the Event 41.
>
> That first event (Event 41) is an interrupt, and comes from the
> scheduler tick. The tick is happening because the writeback workqueue
> just ran and we're not in NO_HZ mode.
>
> However, as soon as that IRQ (and resulting softirqs) are finished, we
> enter NO_HZ mode again. But as you mention, it only lasts for ~5 sec
> when the timer fires again. Once again, it fires because of the
> writeback workqueue, and soon therafter it switches back to NO_HZ mode
> again.
>
> So the solution to avoid this jitter on the NO_HZ CPU is to set the
> affinity of the writeback workqueue to CPU0:
>
> # pin the writeback workqueue to CPU0
> echo 1 > /sys/bus/workqueue/devices/writeback/cpumask
Very interesting trick, I'm going to add it to my dyntick-testing suite.
Thanks!
next prev parent reply other threads:[~2013-12-17 16:57 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CAKohponch=o3nBKTmakA87OiN=HbgnEwJUL23mGkjQiNoJWjWw@mail.gmail.com>
2013-12-11 13:22 ` [Query] Ticks happen in pair for NO_HZ_FULL cores ? Frederic Weisbecker
2013-12-11 21:14 ` Tejun Heo
2013-12-13 0:32 ` Kevin Hilman
2013-12-17 10:35 ` Viresh Kumar
2013-12-17 16:35 ` Kevin Hilman
2013-12-17 16:57 ` Frederic Weisbecker [this message]
2013-12-18 4:38 ` Viresh Kumar
2013-12-18 13:51 ` Kevin Hilman
2013-12-18 14:33 ` [LNG] " Viresh Kumar
2013-12-23 8:18 ` Viresh Kumar
2014-01-07 7:49 ` Viresh Kumar
2014-01-07 8:47 ` Peter Zijlstra
2014-01-07 8:55 ` 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=20131217165726.GA18689@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=tj@kernel.org \
--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