]> git.proxmox.com Git - ovs.git/commit
unixctl: Avoid 100% CPU for slowly processed requests with another queued.
authorBen Pfaff <blp@ovn.org>
Thu, 29 Nov 2018 18:37:02 +0000 (10:37 -0800)
committerBen Pfaff <blp@ovn.org>
Mon, 3 Dec 2018 20:31:33 +0000 (12:31 -0800)
commit21b522169a670f68826923d228aa1382dd93f940
treeeb17ec96c1a295205f44c740359c50b2857dcfdc
parenta32bab26e5d83e97624f265dad7ef3d07c8e0741
unixctl: Avoid 100% CPU for slowly processed requests with another queued.

If another request came in on a particular connection while the previous
request was still being processed, unixctl_server_wait() would wake up the
main loop but unixctl_server_run() wouldn't read the request, resulting in
100% CPU use.

I doubt whether this is a real problem because it's unusual for a client
to attempt to make requests in parallel.  I found it while pursuing a 100%
CPU issue but it turned out not to be a bug (the 100% CPU was caused by
a client making requests as fast as possible).

Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Justin Pettit <jpettit@ovn.org>
lib/unixctl.c