From a8971426fe8e3f49f5670e4f5d6d9b7192bd455f Mon Sep 17 00:00:00 2001 From: Raghavendra G Date: Fri, 5 May 2017 15:21:30 +0530 Subject: event/epoll: Add back socket for polling of events immediately after reading the entire rpc message from the wire Currently socket is added back for future events after higher layers (rpc, xlators etc) have processed the message. If message processing involves signficant delay (as in writev replies processed by Erasure Coding), performance takes hit. Hence this patch modifies transport/socket to add back the socket for polling of events immediately after reading the entire rpc message, but before notification to higher layers. credits: Thanks to "Kotresh Hiremath Ravishankar" for assitance in fixing a regression in bitrot caused by this patch. >Reviewed-on: https://review.gluster.org/15036 >CentOS-regression: Gluster Build System >NetBSD-regression: NetBSD Build System >Smoke: Gluster Build System >Reviewed-by: Amar Tumballi Change-Id: I04b6b9d0b51a1cfb86ecac3c3d87a5f388cf5800 BUG: 1456259 Signed-off-by: Raghavendra G Reviewed-on: https://review.gluster.org/17391 NetBSD-regression: NetBSD Build System CentOS-regression: Gluster Build System Smoke: Gluster Build System Reviewed-by: Shyamsundar Ranganathan --- cli/src/cli-rl.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'cli/src') diff --git a/cli/src/cli-rl.c b/cli/src/cli-rl.c index bca37d9c509..4745cf49369 100644 --- a/cli/src/cli-rl.c +++ b/cli/src/cli-rl.c @@ -108,11 +108,17 @@ cli_rl_process_line (char *line) int -cli_rl_stdin (int fd, int idx, void *data, +cli_rl_stdin (int fd, int idx, int gen, void *data, int poll_out, int poll_in, int poll_err) { + struct cli_state *state = NULL; + + state = data; + rl_callback_read_char (); + event_handled (state->ctx->event_pool, fd, idx, gen); + return 0; } -- cgit