From 2e72b24707f1886833db0b09e48b3f48b8d68d37 Mon Sep 17 00:00:00 2001 From: Raghavendra G Date: Tue, 25 Apr 2017 10:43:07 +0530 Subject: program/GF-DUMP: Shield ping processing from traffic to Glusterfs Program Since poller thread bears the brunt of execution till the request is handed over to io-threads, poller thread experiencies lock contention(s) in the control flow till io-threads, which slows it down. This delay invariably affects reading ping requests from network and responding to them, resulting in increased ping latencies, which sometimes results in a ping-timer-expiry on client leading to disconnect of transport. So, this patch aims to free up poller thread from executing code of Glusterfs Program. We do this by making * Glusterfs Program registering itself asking rpcsvc to execute its actors in its own threads. * GF-DUMP Program registering itself asking rpcsvc to _NOT_ execute its actors in its own threads. Otherwise program's ownthreads become bottleneck in processing ping traffic. This means that poller thread reads a ping packet, invokes its actor and hands the response msg to transport queue. Change-Id: I526268c10bdd5ef93f322a4f95385137550a6a49 Signed-off-by: Raghavendra G BUG: 1421938 Reviewed-on: https://review.gluster.org/17105 NetBSD-regression: NetBSD Build System CentOS-regression: Gluster Build System Smoke: Gluster Build System Reviewed-by: Amar Tumballi Reviewed-by: Jeff Darcy --- xlators/protocol/server/src/server-helpers.c | 1 - xlators/protocol/server/src/server-rpc-fops.c | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) (limited to 'xlators') diff --git a/xlators/protocol/server/src/server-helpers.c b/xlators/protocol/server/src/server-helpers.c index 09e0012d70a..52d7f51a627 100644 --- a/xlators/protocol/server/src/server-helpers.c +++ b/xlators/protocol/server/src/server-helpers.c @@ -492,7 +492,6 @@ get_frame_from_request (rpcsvc_request_t *req) frame->root->uid = req->uid; frame->root->gid = req->gid; frame->root->pid = req->pid; - gf_client_ref (client); frame->root->client = client; frame->root->lk_owner = req->lk_owner; diff --git a/xlators/protocol/server/src/server-rpc-fops.c b/xlators/protocol/server/src/server-rpc-fops.c index 4e71715bf8e..ba5543fdb41 100644 --- a/xlators/protocol/server/src/server-rpc-fops.c +++ b/xlators/protocol/server/src/server-rpc-fops.c @@ -6911,4 +6911,5 @@ struct rpcsvc_program glusterfs3_3_fop_prog = { .progver = GLUSTER_FOP_VERSION, .numactors = GLUSTER_FOP_PROCCNT, .actors = glusterfs3_3_fop_actors, + .ownthread = _gf_true, }; -- cgit