2026/12/3 10:19, Alireza Asgari:
> Hi Hui and Zhang Jiao, > > I saw your discussion about combining the memory.high fixes here: > https://lists.openwall.net/linux-kernel/2026/11/18/558 > > I worked on the same delay calculation in my NFQUEUE RFC. One case > that might be useful for your combined fix is a task with one page of > deferred debt when usage is three times memory.high. At HZ=250 the > expected delay after the final clamp is 500 jiffies (two seconds). > > The case is in memcg_high_test_delay() in patch 3 of my RFC. > https://lore.kernel.org/all/2026…@asgari.net/ > > Would it be useful if I adapted that test for your series? > > Thanks, > Alireza >
Hi Alireza, Yes, please -- that would be very useful. Your case (nr_pages=1, usage=3x high, 500 jiffies at HZ=250) is a good baseline for the normal path and the final clamp, and would catch any unintended behaviour change from the rework. Could you also add a case that triggers the u64 overflow, which is what 2/2 fixes? Once usage is far enough over high, max_overage * max_overage * HZ wraps and the penalty can come out small or even zero. The changelog's example is memory.high = 1 page with usage = 2049 pages (max_overage = 2^31); the unpatched code wraps there, while the fix should saturate at MEMCG_MAX_HIGH_DELAY_JIFFIES. Asserting the delay is 2*HZ for that case would cover the overflow directly. I've just sent v2 of the series and Cc'd you on it. Happy to review the adapted test. Best, Hui