Re: [libvirt] [PATCH 1/2] RPC: Don't accept client if it would overcommit max_clients

2013-07-25 Thread Daniel P. Berrange
On Thu, Jul 25, 2013 at 04:43:52PM +0200, Michal Privoznik wrote: > On 25.07.2013 16:37, Daniel P. Berrange wrote: > > On Thu, Jul 25, 2013 at 04:23:32PM +0200, Michal Privoznik wrote: > >> Currently, even if max_client limit is hit, we accept() incoming > >> connection request, but close it immedi

Re: [libvirt] [PATCH 1/2] RPC: Don't accept client if it would overcommit max_clients

2013-07-25 Thread Michal Privoznik
On 25.07.2013 16:37, Daniel P. Berrange wrote: > On Thu, Jul 25, 2013 at 04:23:32PM +0200, Michal Privoznik wrote: >> Currently, even if max_client limit is hit, we accept() incoming >> connection request, but close it immediately. This has disadvantage of >> not using listen() queue. We should acc

Re: [libvirt] [PATCH 1/2] RPC: Don't accept client if it would overcommit max_clients

2013-07-25 Thread Daniel P. Berrange
On Thu, Jul 25, 2013 at 04:23:32PM +0200, Michal Privoznik wrote: > Currently, even if max_client limit is hit, we accept() incoming > connection request, but close it immediately. This has disadvantage of > not using listen() queue. We should accept() only those clients we > know we can serve and

[libvirt] [PATCH 1/2] RPC: Don't accept client if it would overcommit max_clients

2013-07-25 Thread Michal Privoznik
Currently, even if max_client limit is hit, we accept() incoming connection request, but close it immediately. This has disadvantage of not using listen() queue. We should accept() only those clients we know we can serve and let all other wait in the (limited) queue. --- src/rpc/virnetserver.c