lowmem-monitor: Modify PSI's epoll_wait as blocking 04/296704/1
authorSangYoun Kwak <sy.kwak@samsung.com>
Thu, 3 Aug 2023 07:56:49 +0000 (16:56 +0900)
committerSangYoun Kwak <sy.kwak@samsung.com>
Thu, 3 Aug 2023 07:56:49 +0000 (16:56 +0900)
commit75debdb9771765b2903011171b904abf097816cb
treea75a7b43f066c1d8654884acf20e7c0065e4a789
parent6e68e2f3bbd62d1c463232d18116705a57bc2d61
lowmem-monitor: Modify PSI's epoll_wait as blocking

Previously, epoll_wait was non-blocking and the timeout was 0.
It means that epoll_wait will return immediately after checking events.
With this method, the psi monitor thread will consume cpu(it will check
events intensively) so sleep(3) was used to prevent the consuming
situation.
But it makes psi monitor thread to sleep, which might miss events within
the sleeping period.

By making epoll_wait blocking, this problem will be solved.

Change-Id: I4f2b1ff06b53bcca2830d4c2ecb972fc17904f52
Signed-off-by: SangYoun Kwak <sy.kwak@samsung.com>
src/resource-limiter/memory/lowmem-monitor-psi.c