search for: 35f3c79

Displaying 4 results from an estimated 4 matches for "35f3c79".

2019 Jun 25
2
Re: [libnbd PATCH 2/1] states: Avoid wasted send() when REPLY interrupts request
On Wed, Jun 19, 2019 at 09:11:52PM -0500, Eric Blake wrote: > When we are blocked waiting for POLLOUT during a request, and happen > to receive notice of POLLIN instead, we know that the work done in > response to POLLIN will be non-blocking (it returns to %.READY as soon > as it would block, which in turn jumps right back into ISSUE_COMMAND > because we have a pending request not
2019 Jun 25
0
Re: [libnbd PATCH 2/1] states: Avoid wasted send() when REPLY interrupts request
...XT_STATE(s) (*blocked = false, *next_state = (s))\n"; + pr "#define SET_NEXT_STATE_AND_BLOCK(s) (*next_state = (s))\n"; pr "\n"; (* The state machine C code fragments. *) diff --git i/generator/states-issue-command.c w/generator/states-issue-command.c index 9fc8c93..35f3c79 100644 --- i/generator/states-issue-command.c +++ w/generator/states-issue-command.c @@ -33,9 +33,9 @@ */ if (h->wlen) { if (h->in_write_payload) - *next_state = %SEND_WRITE_PAYLOAD; + SET_NEXT_STATE_AND_BLOCK (%SEND_WRITE_PAYLOAD); else - *next_state = %SEND_R...
2019 Jun 29
0
[libnbd PATCH 2/6] generator: Allow DEAD state actions to run
...= nbd_internal_socket_create (sv[0]); if (!h->sock) { SET_NEXT_STATE (%.DEAD); close (sv[0]); - return -1; + return 0; } /* The sockets are connected already, we can jump directly to diff --git a/generator/states-issue-command.c b/generator/states-issue-command.c index 35f3c79..8890e1c 100644 --- a/generator/states-issue-command.c +++ b/generator/states-issue-command.c @@ -54,7 +54,7 @@ ISSUE_COMMAND.SEND_REQUEST: switch (send_from_wbuf (h)) { - case -1: SET_NEXT_STATE (%.DEAD); return -1; + case -1: SET_NEXT_STATE (%.DEAD); return 0; case 0: SET_NEXT_STATE (...
2019 Jun 29
19
[libnbd PATCH 0/6] new APIs: aio_in_flight, aio_FOO_notify
I still need to wire in the use of *_notify functions into nbdkit to prove whether it makes the code any faster or easier to maintain, but at least the added example shows one good use case for the new API. Eric Blake (6): api: Add nbd_aio_in_flight generator: Allow DEAD state actions to run generator: Allow Int64 in callbacks states: Prepare for aio notify callback api: Add new