STRUCT DIM(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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 β€” a dim_sample that 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 to dim. 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