]> git.baikalelectronics.ru Git - kernel.git/commit
xen/pvcalls: implement sendmsg
authorStefano Stabellini <sstabellini@kernel.org>
Mon, 30 Oct 2017 22:40:59 +0000 (15:40 -0700)
committerBoris Ostrovsky <boris.ostrovsky@oracle.com>
Tue, 31 Oct 2017 13:05:53 +0000 (09:05 -0400)
commit685563e51d055e86d192e9128ba17b5f8259cf56
tree0052d1e964d166a212d461ffba2e020d8398a2e5
parentcd04cc0679a05621581b6a6b8bd63f2549cbb290
xen/pvcalls: implement sendmsg

Send data to an active socket by copying data to the "out" ring. Take
the active socket out_mutex so that only one function can access the
ring at any given time.

If not enough room is available on the ring, rather than returning
immediately or sleep-waiting, spin for up to 5000 cycles. This small
optimization turns out to improve performance significantly.

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