]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: cli/server: don't take thread isolation to check for srv-removable
authorWilly Tarreau <w@1wt.eu>
Tue, 18 Mar 2025 10:41:51 +0000 (11:41 +0100)
committerWilly Tarreau <w@1wt.eu>
Tue, 18 Mar 2025 16:36:02 +0000 (17:36 +0100)
Thanks to the previous commits, we now know that "wait srv-removable"
does not require thread isolation, as long as 3372a2ea00 ("BUG/MEDIUM:
queues: Stricly respect maxconn for outgoing connections") and c880c32b16
("MINOR: stream: decrement srv->served after detaching from the list")
are present. Let's just get rid of thread_isolate() here, which can
consume a lot of CPU on highly threaded machines when removing many
servers at once.

src/cli.c

index 7bbfa3a8229cc253dfe903ffdf91c60b43b1097f..41a178ef889abbc0bdcecc49c7eff7ee94e119ab 100644 (file)
--- a/src/cli.c
+++ b/src/cli.c
@@ -2127,9 +2127,7 @@ static int cli_io_handler_wait(struct appctx *appctx)
 
        if (ctx->cond == CLI_WAIT_COND_SRV_UNUSED) {
                /* check if the server in args[0]/args[1] can be released now */
-               thread_isolate();
                ret = srv_check_for_deletion(ctx->args[0], ctx->args[1], NULL, NULL, NULL);
-               thread_release();
 
                if (ret < 0) {
                        /* unrecoverable failure */