linux-rt-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch 0/3] do not raise timer softirq unconditionally (spinlockless version)
@ 2019-04-15 20:12 Marcelo Tosatti
  2019-04-15 20:12 ` [patch 1/3] timers: raise timer softirq on __mod_timer/add_timer_on Marcelo Tosatti
                   ` (5 more replies)
  0 siblings, 6 replies; 18+ messages in thread
From: Marcelo Tosatti @ 2019-04-15 20:12 UTC (permalink / raw)
  To: linux-kernel, linux-rt-users
  Cc: Thomas Gleixner, Anna-Maria Gleixner, Daniel Bristot de Oliveira,
	Luiz Capitulino, Haris Okanovic

For isolated CPUs, we'd like to skip awakening ktimersoftd
(the switch to and then back from ktimersoftd takes 10us in
virtualized environments, in addition to other OS overhead,
which exceeds telco requirements for packet forwarding for
5G) from the sched tick.

The patch "timers: do not raise softirq unconditionally" from Thomas
attempts to address that by checking, in the sched tick, whether its
necessary to raise the timer softirq. Unfortunately, it attempts to grab
the tvec base spinlock which generates the issue described in the patch
"Revert "timers: do not raise softirq unconditionally"".

tvec_base->lock protects addition of timers to the wheel versus
timer interrupt execution.

This patch does not grab the tvec base spinlock from irq context,
but rather performs a lockless access to base->pending_map.

It handles the the race between timer addition and timer interrupt
execution by unconditionally (in case of isolated CPUs) raising the
timer softirq after making sure the updated bitmap is visible
on remote CPUs.

This patchset reduces cyclictest latency from 25us to 14us
on my testbox. 




^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2019-06-11 11:45 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-15 20:12 [patch 0/3] do not raise timer softirq unconditionally (spinlockless version) Marcelo Tosatti
2019-04-15 20:12 ` [patch 1/3] timers: raise timer softirq on __mod_timer/add_timer_on Marcelo Tosatti
2019-05-29 14:53   ` Anna-Maria Gleixner
2019-05-30 19:23     ` Marcelo Tosatti
2019-04-15 20:12 ` [patch 2/3] timers: do not raise softirq unconditionally (spinlockless version) Marcelo Tosatti
2019-05-29 14:53   ` Anna-Maria Gleixner
2019-05-30 20:14     ` Marcelo Tosatti
2019-05-31 11:55       ` Anna-Maria Gleixner
2019-06-11 11:45         ` Anna-Maria Gleixner
2019-06-04  6:29   ` Peter Xu
2019-06-06 15:14     ` Marcelo Tosatti
2019-04-15 20:12 ` [patch 3/3] timers: condense pending bitmap information Marcelo Tosatti
2019-04-15 20:17 ` [patch 0/3] do not raise timer softirq unconditionally (spinlockless version) Marcelo Tosatti
2019-05-06  3:22 ` Marcelo Tosatti
2019-05-06  7:17   ` Daniel Bristot de Oliveira
2019-05-06  9:22   ` Thomas Gleixner
2019-05-29 14:52 ` Anna-Maria Gleixner
2019-05-30 19:38   ` Marcelo Tosatti

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).