STRUCT DIM(9)
π struct dim(9) β the Kernel API Manual glow-up π
okay bestie, so we're talking about struct dim from the kernel API manual, and it's literally the main structure for dynamic interrupt moderation (DIM). it's the place where all the info about one specific DIM instance lives. one struct, one vibe, one whole DIM situation. β¨
π¦ SYNOPSIS
struct dim {
u8 state;
struct dim_stats prev_stats;
struct dim_sample start_sample;
struct dim_sample measuring_sample;
struct work_struct work;
void *priv;
u8 profile_ix;
u8 mode;
u8 tune_state;
u8 steps_right;
u8 steps_left;
u8 tired;
};
π§© Members (the whole cast, no skips) π
stateβ the algorithm state. it's giving "see below" energy, so yeah, check below. π«prev_statsβ the measured rates from the previous iteration, kept around for comparison purposes. iconic little time capsule. π°οΈstart_sampleβ the sampled data from the start of the current iteration. where we began, bestie. πΈmeasuring_sampleβ adim_samplethat gets used to update the current events. π₯workβ the work to perform when action is required. it's literally on duty. πͺprivβ a pointer to the struct that points todim. yes, a pointer to the thing that points back. we stay tangled. π«Άprofile_ixβ the current moderation profile index. πmodeβ the CQ period count mode. βtune_stateβ the algorithm tuning state (see below, again β it's a whole theme). ποΈsteps_rightβ how many steps have been taken towards higher moderation. β¬οΈsteps_leftβ how many steps have been taken towards lower moderation. β¬οΈtiredβ the parking depth counter. nap time counter, honestly. π΄
π SEE ALSO
kernel file ./include/linux/dim.h, plus the whole friend group: struct dim_cq_moder(9), struct dim_irq_moder(9), struct dim_sample(9), struct dim_stats(9), enum dim_cq_period_mode(9), enum dim_state(9), enum dim_tune_state(9), enum dim_stats_state(9), enum dim_step_result(9), net_dim_init_irq_moder(9), net_dim_free_irq_moder(9), net_dim_setting(9), net_dim_work_cancel(9), net_dim_get_rx_irq_moder(9), net_dim_get_tx_irq_moder(9), net_dim_set_rx_mode(9), net_dim_set_tx_mode(9), dim_on_top(9), dim_turn(9), dim_park_on_top(9), dim_park_tired(9), dim_calc_stats(9), dim_update_sample(9), dim_update_sample_with_comps(9), net_dim_get_rx_moderation(9), net_dim_get_def_rx_moderation(9), net_dim_get_tx_moderation(9), net_dim_get_def_tx_moderation(9), net_dim(9), rdma_dim(9) π¦
ngl bestie, that's the whole page. nothing left out, nothing invented, we ate and left no crumbs. π
kay so this one shipped from ./include/linux back in October 2026 β mwah, love that for us πβ¨π
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms