diff options
| author | Stephen Hemminger <stephen@networkplumber.org> | 2026-05-09 10:03:22 -0700 |
|---|---|---|
| committer | Paolo Abeni <pabeni@redhat.com> | 2026-05-14 11:41:30 +0200 |
| commit | 9371b229a1ced41ab6372f8a2fc33fe6af21efe9 (patch) | |
| tree | 758dc2dd6a6acd2c95d76af87e4738d48df9b0d1 /include/uapi/linux | |
| parent | 18dc8e6d15d7a30888beec46a1e01ca0f98508fa (diff) | |
net/sched: netem: reorder struct netem_sched_data
The current layout of struct netem_sched_data can be improved
by optimizing cache locality, compacting data types (use u8
for enum) and eliminating unused elements.
Reorganize the struct as follows:
- Cacheline 0 holds the tfifo state (t_root/t_head/t_tail/t_len),
counter, and the unconditional enqueue scalars
latency/jitter/rate/gap/loss.
- Cacheline 1 holds the remaining zero-check scalars
(duplicate/reorder/corrupt/ecn), all five crndstate correlation
structures, and loss_model.
- Cacheline 2 holds prng, delay_dist, the slot dequeue state,
slot_dist, and the inner classful qdisc pointer.
- Rate-shaping fields, q->limit (config-only; the fast path reads
sch->limit), and the CLG Markov state move to the warm tail.
- tc_netem_slot slot_config and qdisc_watchdog (only consulted on
slot reschedule and watchdog wake) move to the cold tail.
Also reorder struct clgstate to place the u8 state member after the
u32 transition probabilities. This removes the 3-byte interior hole
without changing the struct's size.
Should have no functional change.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Link: https://patch.msgid.link/20260509171123.307549-2-stephen@networkplumber.org
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'include/uapi/linux')
0 files changed, 0 insertions, 0 deletions
