[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <C3130484-33F2-4B05-99C7-35B4E6923E39@akamai.com>
Date: Wed, 28 Nov 2018 17:56:54 +0000
From: "Zhivich, Michael" <mzhivich@...mai.com>
To: Thomas Gleixner <tglx@...utronix.de>
CC: Ingo Molnar <mingo@...nel.org>, Arnd Bergmann <arnd@...db.de>,
"Ondrej Mosnacek" <omosnace@...hat.com>,
"tiny.windzz@...il.com" <tiny.windzz@...il.com>,
"frederic@...nel.org" <frederic@...nel.org>,
lkml <linux-kernel@...r.kernel.org>,
Steven Rostedt <rostedt@...dmis.org>,
"alexander.levin@...izon.com" <alexander.levin@...izon.com>,
John Stultz <john.stultz@...aro.org>,
"kreview@...mai.com" <kreview@...mai.com>,
"Jason Wessel" <jason.wessel@...driver.com>,
Joel Fernandes <joel@...lfernandes.org>,
"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>,
Sebastian Andrzej Siewior <bigeasy@...utronix.de>
Subject: Re: [kreview] [PATCH] softirq: don't push timer softirq handling to
ksoftirqd
On 11/28/18, 10:22 AM, "Thomas Gleixner" <tglx@...utronix.de> wrote:
Michael,
On Fri, 16 Nov 2018, Zhivich, Michael wrote:
> On 11/15/18, 12:17 PM, "John Stultz" <john.stultz@...aro.org> wrote:
> Would a more focused fix be to move the clocksource watchdog from a
> normal timer to a hrtimer?
>
> That's an interesting idea - it would get clocksource watchdog out of
> ksoftirqd. However, clocksource watchdog iterates over available CPUs to
> check the TSC on each core (see add_timer_on() call in
> clocksource_watchdog()). I'm not seeing an API to start an hrtimer on a
> specific CPU - is this possible and I'm missing it? Or would something
> like this have to be added to hrtimer?
It's surely an interesting idea, but it's not trivial.
There is no way to reliably queue hrtimers remote when high resolution mode
is enabled. It only works when the to be queued timer is not the first to
expire one. If it ends up being the first to expire timer, then there is
currently no way to rearm the remote per cpu clockevent device because it's
not remotely accesible.
It would need an SMP function call, but that needs to be asynchronous due
to locking/interrupt disabled constraints. Maybe ...
Thanks,
tglx
Thomas,
Thanks for the feedback - it does sound tricky to get right. I'll spend some more time thinking about it.
My original patch tries to ensure that timer softirqs are serviced immediately, not punted to ksoftirqd. It is perhaps too heavy-handed (all softirqs will get serviced if a timer softirq fired), but I imagine the clocksource watchdog is not the only timer that doesn't want to be arbitrarily delayed when the machine is busy.
Would it make sense to modify the patch such that only timer softirqs are serviced immediately if fired? Or are most timers that require precision wakeups using hrtimer framework?
Thanks,
~ Michael
Powered by blists - more mailing lists