From: Willy Tarreau Date: Tue, 18 Mar 2025 10:41:51 +0000 (+0100) Subject: MINOR: cli/server: don't take thread isolation to check for srv-removable X-Git-Tag: v3.2-dev8~27 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=6336b636f7ba108880b82093ee54de41ca561165;p=thirdparty%2Fhaproxy.git MINOR: cli/server: don't take thread isolation to check for srv-removable 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. --- diff --git a/src/cli.c b/src/cli.c index 7bbfa3a82..41a178ef8 100644 --- 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 */