]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MEDIUM: tasks: automatically requeue into the bulk queue an already running tasklet
authorWilly Tarreau <w@1wt.eu>
Thu, 30 Jan 2020 17:59:43 +0000 (18:59 +0100)
committerWilly Tarreau <w@1wt.eu>
Thu, 30 Jan 2020 18:03:31 +0000 (19:03 +0100)
commita17664d829e4cd08f36224a41061677b855ef5fc
tree1d0dd768996f8aff825baefb94f6085e25ab0271
parenta62917b8908f41c4733f5c61412ec7619144cc94
MEDIUM: tasks: automatically requeue into the bulk queue an already running tasklet

When a tasklet re-runs itself such as in this chain:

   si_cs_io_cb -> si_cs_process -> si_notify -> si_chk_rcv

then we know it can easily clobber the run queue and harm latency. Now
what the scheduler does when it detects this is that such a tasklet is
automatically placed into the bulk list so that it's processed with the
remaining CPU bandwidth only. Thanks to this the CLI becomes instantly
responsive again even under heavy stress at 50 Gbps over 40kcon and
100% CPU on 16 threads.
include/proto/task.h