]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
CLEANUP: activity: remove unused counter fd_lock
authorWilly Tarreau <w@1wt.eu>
Wed, 17 Jun 2020 17:12:43 +0000 (19:12 +0200)
committerWilly Tarreau <w@1wt.eu>
Wed, 17 Jun 2020 17:15:51 +0000 (19:15 +0200)
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
src/cli.c

index 3bc81b348f0c1a53d928b2cf305b1a711da4391b..3020806ed01e916410bfbb0b463d255b1d6e4e96 100644 (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
index a8d393403d04a82e69c0d7dc3871da49fb960838..22fc7716bf2f5e3a0b8ea6047d30985b12db0768 100644 (file)
--- 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);