[LTP] min_free_kbytes: Handle transient memory drops in check_monitor
linuxtestproject.agent@gmail.com
linuxtestproject.agent@gmail.com
Tue May 26 17:29:13 CEST 2026
Hi Wei,
On Tue May 26 08:36:47 2026 +0000, Wei Gao wrote:
> min_free_kbytes: Handle transient memory drops in check_monitor
> struct sigaction sa;
>
> + end = 0;
> +
Good catch for multi-iteration support.
> - sleep(2);
> + usleep(100000);
Changing from 2s to 100ms makes the monitor much more responsive.
> + for (i = 1; i < 1024; i *= 2) {
> + usleep(i * 1000);
> + memfree = SAFE_READ_MEMINFO("MemFree:");
> + if (memfree >= tune)
> + break;
> + }
The exponential backoff is a good approach. Total wait time is ~1023ms
(1+2+4+8+16+32+64+128+256+512), matching the commit message.
All good. Approved.
---
Note:
The agent can sometimes produce false positives although often its
findings are genuine. If you find issues with the review, please
comment this email or ignore the suggestions.
Regards,
LTP AI Reviewer
More information about the ltp
mailing list