mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-02-21 21:26:58 +00:00
MINOR: queue: update proxy->served once out of the loop
It's not needed during all these operations and doesn't even affect queueing in the LB algo, so we can safely update it out of the loop and the lock.
This commit is contained in:
parent
5304669e1b
commit
3e92a31783
@ -351,10 +351,9 @@ void process_srv_queue(struct server *s, int server_locked)
|
||||
if (!pc)
|
||||
break;
|
||||
|
||||
done = 1;
|
||||
done++;
|
||||
|
||||
_HA_ATOMIC_INC(&s->served);
|
||||
_HA_ATOMIC_INC(&p->served);
|
||||
|
||||
stream_add_srv_conn(pc->strm, s);
|
||||
task_wakeup(pc->strm->task, TASK_WOKEN_RES);
|
||||
@ -363,6 +362,8 @@ void process_srv_queue(struct server *s, int server_locked)
|
||||
if (!server_locked)
|
||||
HA_SPIN_UNLOCK(SERVER_LOCK, &s->lock);
|
||||
|
||||
_HA_ATOMIC_ADD(&p->served, done);
|
||||
|
||||
if (done && p->lbprm.server_take_conn)
|
||||
p->lbprm.server_take_conn(s, server_locked);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user