unsigned int loops; // complete loops in run_poll_loop()
unsigned int wake_tasks; // active tasks prevented poll() from sleeping
unsigned int wake_signal; // pending signal prevented poll() from sleeping
+ unsigned int poll_io; // number of times poll() reported I/O events
unsigned int poll_exp; // number of times poll() sees an expired timeout (includes wake_*)
unsigned int poll_drop; // poller dropped a dead FD from the update list
unsigned int poll_dead; // poller woke up with a dead FD
unsigned int empty_rq; // calls to process_runnable_tasks() with nothing for the thread
unsigned int long_rq; // process_runnable_tasks() left with tasks in the run queue
unsigned int cpust_total; // sum of half-ms stolen per thread
- /* two unused entries left before end of first cache line */
+ /* one unused entry left before end of first cache line */
ALWAYS_ALIGN(64);
struct freq_ctr cpust_1s; // avg amount of half-ms stolen over last second
chunk_appendf(&trash, "loops:"); SHOW_TOT(thr, activity[thr].loops);
chunk_appendf(&trash, "wake_tasks:"); SHOW_TOT(thr, activity[thr].wake_tasks);
chunk_appendf(&trash, "wake_signal:"); SHOW_TOT(thr, activity[thr].wake_signal);
+ chunk_appendf(&trash, "poll_io:"); SHOW_TOT(thr, activity[thr].poll_io);
chunk_appendf(&trash, "poll_exp:"); SHOW_TOT(thr, activity[thr].poll_exp);
chunk_appendf(&trash, "poll_drop:"); SHOW_TOT(thr, activity[thr].poll_drop);
chunk_appendf(&trash, "poll_dead:"); SHOW_TOT(thr, activity[thr].poll_dead);
status = epoll_wait(epoll_fd[tid], epoll_events, global.tune.maxpollevents, timeout);
tv_update_date(timeout, status);
- if (status)
+ if (status) {
+ activity[tid].poll_io++;
break;
+ }
if (timeout || !wait_time)
break;
if (signal_queue_len || wake)
thread_harmless_end();
+ if (nevlist > 0)
+ activity[tid].poll_io++;
+
for (i = 0; i < nevlist; i++) {
unsigned int n = 0;
int events, rebind_events;
&timeout_ts); // const struct timespec *timeout
tv_update_date(timeout, status);
- if (status)
+ if (status) {
+ activity[tid].poll_io++;
break;
+ }
if (timeout || !wait_time)
break;
if (signal_queue_len || wake)
thread_harmless_end();
+ if (status > 0)
+ activity[tid].poll_io++;
+
for (count = 0; status > 0 && count < nbfd; count++) {
unsigned int n;
int e = poll_events[count].revents;
if (status <= 0)
return;
+ activity[tid].poll_io++;
+
for (fds = 0; (fds * BITS_PER_INT) < maxfd; fds++) {
if ((((int *)(tmp_evts[DIR_RD]))[fds] | ((int *)(tmp_evts[DIR_WR]))[fds]) == 0)
continue;