Add pause to empty spin loops
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 Latest3 patches 3 repliesIn review
- v1 RFC3 patches 1 replySuperseded
Patches in v2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | net/cnxk: add pause to spinloopsdrivers/ drivers/ | +4 | 0 replies | |
| 2/3 | event/cnxk: add pause to spinloopsdrivers/ drivers/ drivers/ | +4 | 3 replies | |
| 3/3 | devtools/cocci: add script to find empty spinloopsdevtools/ | +165 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.
Cover letter [PATCH v2 0/3] Add pause to empty spin loops
On SMT systems, empty spinloops can cause excessive latency due to the spinning core consuming resources that could be used by other hardware threads. This series addresses this by adding rte_pause() calls to busy-wait loops in the cnxk drivers.
The first two patches fix existing empty spinloops in the net/cnxk and event/cnxk drivers. These were identified using a new coccinelle script that finds variations of the pattern:
while (!atomic(&flag));
The third patch adds this coccinelle script to devtools/ so that similar issues can be detected and fixed automatically.
v2 - rebase for 26.07
Stephen Hemminger (3):
net/cnxk: add pause to spinloops event/cnxk: add pause to spinloops devtools/cocci: add script to find empty spinloops
devtools/cocci/fix_empty_spinloops.cocci | 165 +++++++++++++++++++++++ drivers/event/cnxk/cn10k_worker.c | 2 +- drivers/event/cnxk/cn20k_worker.c | 2 +- drivers/event/cnxk/cnxk_tim_worker.h | 4 +- drivers/net/cnxk/cn10k_tx.h | 4 +- drivers/net/cnxk/cn20k_tx.h | 4 +- 6 files changed, 173 insertions(+), 8 deletions(-) create mode 100644 devtools/cocci/fix_empty_spinloops.cocci
Signature · 1 line
2.53.0