diff options
| author | Orgad Shaneh <orgads@gmail.com> | 2026-08-20 14:32:39 +0300 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2026-09-01 11:54:56 +0200 |
| commit | db57f6517bf65523968ae29cd34a790bfa7d32af (patch) | |
| tree | 8f2638dad91bd1356a8b72e944774a13d60c5be5 | |
| parent | 4d66d2229ab806ef5782299dfe45af28e78cab25 (diff) | |
| download | linux-next-db57f6517bf65523968ae29cd34a790bfa7d32af.tar.gz linux-next-db57f6517bf65523968ae29cd34a790bfa7d32af.zip | |
staging: octeon: schedule the TX cleanup tasklet every 1024th packet
cvm_oct_xmit() means to schedule the cleanup tasklet once every 1024
packets, as its comment says, to cover the pathological case of heavy
traffic on one port delaying the cleanup of another port blocked
waiting for it.
The test is inverted: total_to_clean & 0x3ff is true for 1023 of every
1024 values, and false only on the multiples of 1024. So the tasklet is
scheduled on nearly every packet, and skipped on exactly the packet the
comment wants. That costs one TASKLET softirq per transmitted packet,
each walking every port and doing an FAU fetch-and-add per non-empty
queue, and it buys nothing for this port, which already frees its
completed skbs inline from the skb_to_free value it reads out of the
FAU.
Test the mask against zero. On a CN50XX board (2 cores at 300MHz)
carrying ~6.9k transmitted packets/s, TASKLET softirqs drop from 7133/s
to 597/s with no throughput change; the freeing work is conserved, so
this removes softirq entries, not work.
Fixes: 4898c560103f ("Staging: Octeon: Free transmit SKBs in a timely manner")
Signed-off-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Dan Carpenter <error27@gmail.com>
Link: https://patch.msgid.link/20260820113239.8169-1-orgads@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| -rw-r--r-- | drivers/staging/octeon/ethernet-tx.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/octeon/ethernet-tx.c b/drivers/staging/octeon/ethernet-tx.c index cc20c1e6791f..5e536827f87a 100644 --- a/drivers/staging/octeon/ethernet-tx.c +++ b/drivers/staging/octeon/ethernet-tx.c @@ -481,7 +481,7 @@ skip_xmit: cvmx_fau_fetch_and_add32(FAU_TOTAL_TX_TO_CLEAN, 1); } - if (total_to_clean & 0x3ff) { + if ((total_to_clean & 0x3ff) == 0) { /* * Schedule the cleanup tasklet every 1024 packets for * the pathological case of high traffic on one port |
