search for: cde934a

Displaying 2 results from an estimated 2 matches for "cde934a".

Did you mean: 4de954a
2019 Jun 09
0
[PATCH libnbd] states: In recv_into_rbuf and send_from_wbuf loop until EAGAIN.
...ilable to receive/send we would return to poll. Instead of this, loop until the socket returns EAGAIN. --- generator/states.c | 91 ++++++++++++++++++++++------------------------ 1 file changed, 43 insertions(+), 48 deletions(-) diff --git a/generator/states.c b/generator/states.c index 145e8c1..cde934a 100644 --- a/generator/states.c +++ b/generator/states.c @@ -46,43 +46,40 @@ recv_into_rbuf (struct nbd_handle *h) void *rbuf; size_t rlen; - if (h->rlen == 0) - return 0; /* move to next state */ + while (h->rlen > 0) { + /* As a special case h->rbuf i...
2019 Jun 09
2
[PATCH libnbd] states: In recv_into_rbuf and send_from_wbuf loop until EAGAIN.
I thought this should produce a fairly dramatic performance gain. In fact I couldn't measure any performance difference at all. I think what's happening is we're actually paying an extra syscall (to discover the socket would block) and then doing the poll anyway. So I don't know if it's worth having this patch. It could be argued that it makes the code shorter (therefore