From 4f72ec851ccc24506cad03a09776422a057d61a7 Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Wed, 17 Jun 2020 19:12:43 +0200 Subject: [PATCH] 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. --- include/haproxy/activity-t.h | 5 +++-- src/cli.c | 1 - 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/haproxy/activity-t.h b/include/haproxy/activity-t.h index 3bc81b348..3020806ed 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 a8d393403..22fc7716b 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);