Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [Medium] DMEMCG_LOW event counter is heavily inflated by incrementing per-skipped-object during LRU walks instead of per reclaim fallback. --
commit 36a407edf0ff46972d31f3cdddb8b463ec3f07d8 Author: Hongfu Li <[email protected]> cgroup/dmem: add per-region event counters This patch adds the dmem.events interface to report hierarchical low and max event counts per DMEM region. It introduces counters that increment on dmem.max allocation failures and dmem.low protection events. > diff --git a/kernel/cgroup/dmem.c b/kernel/cgroup/dmem.c > index 4753a67d0f0f2..79d4c5d0a0469 100644 > --- a/kernel/cgroup/dmem.c > +++ b/kernel/cgroup/dmem.c [ ... ] > @@ -345,6 +374,7 @@ bool dmem_cgroup_state_evict_valuable(struct > dmem_cgroup_pool_state *limit_pool, > return true; > > *ret_hit_low = true; > + dmemcg_memory_event(test_pool, DMEMCG_LOW); [Severity: Medium] Does incrementing the event here inflate the DMEMCG_LOW counter by counting every single skipped object during an LRU walk? Because dmem_cgroup_state_evict_valuable() is typically called in a loop for each object during eviction (for example, in ttm_bo_evict_cb), this will hit for every protected object rather than once per reclaim fallback. Could this also introduce a performance overhead, as the atomic increments and hierarchical cgroup_file_notify() calls are now happening inside the tight eviction loop? > return false; > } > return true; -- Sashiko AI review ยท https://sashiko.dev/#/patchset/[email protected]?part=1
