CLEANUP: activity: remove unused counter fd_lock

Since 2.1-dev2, with commit 305d5ab46 ("MAJOR: fd: Get rid of the fd cache.")
we don't have the fd_lock anymore and as such its acitvity counter is always
zero. Let's remove it from the struct and from "show activity" output, as
there are already plenty of indicators to look at.

The cache line comment in the struct activity was updated to reflect
reality as it looks like another one already got removed in the past.
This commit is contained in:
Willy Tarreau 2020-06-17 19:12:43 +02:00
parent 4cabfc18a3
commit 4f72ec851c
2 changed files with 3 additions and 3 deletions

View File

@ -44,7 +44,6 @@ struct activity {
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 poll_skip; // poller skipped another thread's FD
unsigned int fd_lock; // fd cache skipped a locked FD
unsigned int conn_dead; // conn_fd_handler woke up on an FD indicating a dead connection
unsigned int stream; // calls to process_stream()
unsigned int ctxsw; // total number of context switches
@ -52,7 +51,9 @@ struct activity {
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
/* one cache line */
/* two unused entries left before end of first cache line */
ALWAYS_ALIGN(64);
struct freq_ctr cpust_1s; // avg amount of half-ms stolen over last second
struct freq_ctr_period cpust_15s; // avg amount of half-ms stolen over last 15s
unsigned int avg_loop_us; // average run time per loop over last 1024 runs

View File

@ -1133,7 +1133,6 @@ static int cli_io_handler_show_activity(struct appctx *appctx)
chunk_appendf(&trash, "poll_drop:"); SHOW_TOT(thr, activity[thr].poll_drop);
chunk_appendf(&trash, "poll_dead:"); SHOW_TOT(thr, activity[thr].poll_dead);
chunk_appendf(&trash, "poll_skip:"); SHOW_TOT(thr, activity[thr].poll_skip);
chunk_appendf(&trash, "fd_lock:"); SHOW_TOT(thr, activity[thr].fd_lock);
chunk_appendf(&trash, "conn_dead:"); SHOW_TOT(thr, activity[thr].conn_dead);
chunk_appendf(&trash, "stream:"); SHOW_TOT(thr, activity[thr].stream);
chunk_appendf(&trash, "pool_fail:"); SHOW_TOT(thr, activity[thr].pool_fail);