xen/pvcalls: implement the ioworker functions
authorStefano Stabellini <sstabellini@kernel.org>
Thu, 6 Jul 2017 18:01:07 +0000 (11:01 -0700)
committerBoris Ostrovsky <boris.ostrovsky@oracle.com>
Thu, 31 Aug 2017 13:45:55 +0000 (09:45 -0400)
commit5d520d8580b31d75a115ac58ab0a804b92581fd5
treeb611ceb5e6b6955202275fe27c2dc956cd220085
parent0a85d23b8164c951a50512b84601decb9a5e4dd6
xen/pvcalls: implement the ioworker functions

We have one ioworker per socket. Each ioworker goes through the list of
outstanding read/write requests. Once all requests have been dealt with,
it returns.

We use one atomic counter per socket for "read" operations and one
for "write" operations to keep track of the reads/writes to do.

We also use one atomic counter ("io") per ioworker to keep track of how
many outstanding requests we have in total assigned to the ioworker. The
ioworker finishes when there are none.

Signed-off-by: Stefano Stabellini <stefano@aporeto.com>
Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Reviewed-by: Juergen Gross <jgross@suse.com>
CC: boris.ostrovsky@oracle.com
CC: jgross@suse.com
Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
drivers/xen/pvcalls-back.c