Skip to content

tasklets: Replace the spin wait loops and make it RT safe

Thomas Gleixner linux-hyperv linux-pci linux-wireless lkml netdev 1 version Applied

Status from this message: The following commit has been merged into the irq/core branch of tip:

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest14 patches 7 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/14tasklets: Replace barrier() with cpu_relax() in tasklet_unlock_wait()include/linux/interrupt.h+2 -10 replies
2/14tasklets: Use static inlines for stub implementationsinclude/linux/interrupt.h+3 -30 replies
3/14tasklets: Provide tasklet_disable_in_atomic()include/linux/interrupt.h+22 -00 replies
4/14tasklets: Use spin wait in tasklet_disable() temporarilyinclude/linux/interrupt.h+2 -10 replies
5/14tasklets: Replace spin wait in tasklet_unlock_wait()include/linux/interrupt.h kernel/softirq.c+20 -110 replies
6/14tasklets: Replace spin wait in tasklet_kill()kernel/softirq.c+15 -80 replies
7/14tasklets: Prevent tasklet_unlock_spin_wait() deadlock on RTinclude/linux/interrupt.h kernel/softirq.c+28 -23 replies
8/14net: jme: Replace link-change tasklet with workdrivers/net/ethernet/jme.c drivers/net/ethernet/jme.h+6 -60 replies
9/14net: sundance: Use tasklet_disable_in_atomic().drivers/net/ethernet/dlink/sundance.c+1 -10 replies
10/14ath9k: Use tasklet_disable_in_atomic()drivers/net/wireless/ath/ath9k/beacon.c+1 -11 reply
11/14atm: eni: Use tasklet_disable_in_atomic() in the send() callbackdrivers/atm/eni.c+1 -10 replies
12/14PCI: hv: Use tasklet_disable_in_atomic()drivers/pci/controller/pci-hyperv.c+1 -12 replies
13/14firewire: ohci: Use tasklet_disable_in_atomic() where requireddrivers/firewire/ohci.c+2 -20 replies
14/14tasklets: Switch tasklet_disable() to the sleep wait variantinclude/linux/interrupt.h+1 -20 replies

Reviews trailers per patch

2 of 14 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchSebastian Andrzej SiewiorKalle ValoPeter Zijlstra (Intel)Bjorn HelgaasWei Liu
SeriesA-b
1/14T-b
2/14T-b
3/14
4/14
5/14
6/14
7/14T-b
8/14
9/14
10/14A-b
11/14
12/14A-b A-b
13/14
14/14

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 5 reviewers.

Read the v1 thread

Cover letter [patch 00/14] tasklets: Replace the spin wait loops and make it RT safe

This is a follow up to the review comments of the series which makes softirq processing PREEMPT_RT safe:

https://lore.kernel.org/r/[email protected]

Peter suggested to replace the spin waiting in tasklet_disable() and tasklet_kill() with wait_event(). This also gets rid of the ill defined sched_yield() in tasklet_kill().

Analyzing all usage sites of tasklet_disable() and tasklet_unlock_wait() we found that most of them are safe to be converted to a sleeping wait.

Only a few instances invoke tasklet_disable() from atomic context. A few bugs which have been found in course of this analysis have been already addressed seperately.

The following series takes the following approach:

1) Provide a variant of tasklet_disable() which can be invoked from atomic contexts

2) Convert the usage sites which cannot be easily changed to a sleepable wait to use this new function

3) Replace the spin waits in tasklet_disable() and tasklet_kill() with sleepable variants.

If this is agreed on then the merging can be either done in bulk or the first 4 patches could be applied on top of rc2 and tagged for consumption in the relevant subsystem trees (networking, pci, firewire). In this case the last patch which changes the implementation of tasklet_disable() has to be post-poned until all other changes have reached mainline.

The series is also available from git:

git://git.kernel.org/pub/scm/linux/kernel/git/tglx/devel.git tasklet-2021-03-09

Thanks,

tglx