lkml.org 
[lkml]   [2018]   [Nov]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [kreview] [PATCH] softirq: don't push timer softirq handling to ksoftirqd
Date
On 11/28/18, 10:22 AM, "Thomas Gleixner" <tglx@linutronix.de> wrote:

Michael,

On Fri, 16 Nov 2018, Zhivich, Michael wrote:
> On 11/15/18, 12:17 PM, "John Stultz" <john.stultz@linaro.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


\
 
 \ /
  Last update: 2018-11-28 18:57    [W:0.757 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site