Increase log source scanning frequency from 1s to 10ms 94/221994/1 accepted/tizen/5.5/unified/20200109.114931 submit/tizen_5.5/20200109.021019
authorKarol Lewandowski <k.lewandowsk@samsung.com>
Wed, 8 Jan 2020 15:13:34 +0000 (16:13 +0100)
committerHyotaek Shim <hyotaek.shim@samsung.com>
Thu, 9 Jan 2020 02:03:11 +0000 (02:03 +0000)
This is workaround.  This commit ensures logs source is checked every 10ms.

In current design logs from source devices (/dev/log_) are checked
only periodically on fixed intervals (unlike other sources, which
are driven by epoll()).  The "special" android source handling seems
to be microoptimisation, done due to not entirely correct architecture
decisions.

Proper solution require adding android source devices to epoll.

Change-Id: I91e01f988566c1766385d0c94c6d9dc82bd8e08b
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
(cherry picked from commit b98095cc7007b14b22f2e91e0e18066efbf63ec3)

src/logger/logger.c

index ad4071a..6c5c00e 100644 (file)
@@ -1868,7 +1868,7 @@ static int do_logger(struct logger* server)
 
                ensure_epoll_size(&events, &events_size, server->epollcnt);
 
-               int nfds = epoll_wait(server->epollfd, events, events_size, 1000);
+               int nfds = epoll_wait(server->epollfd, events, events_size, 10);
                if (nfds < 0 && errno == EINTR)
                        continue;