From: Willy Tarreau Date: Wed, 17 Jun 2020 17:12:43 +0000 (+0200) Subject: CLEANUP: activity: remove unused counter fd_lock X-Git-Tag: v2.2-dev10~31 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4f72ec851ccc24506cad03a09776422a057d61a7;p=thirdparty%2Fhaproxy.git 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. --- diff --git a/include/haproxy/activity-t.h b/include/haproxy/activity-t.h index 3bc81b348f..3020806ed0 100644 --- a/include/haproxy/activity-t.h +++ b/include/haproxy/activity-t.h @@ -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 diff --git a/src/cli.c b/src/cli.c index a8d393403d..22fc7716bf 100644 --- a/src/cli.c +++ b/src/cli.c @@ -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);