From patchwork Wed Mar 7 20:00:01 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Schumaker, Anna" X-Patchwork-Id: 10265061 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id BF1616016D for ; Wed, 7 Mar 2018 20:00:20 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B342928346 for ; Wed, 7 Mar 2018 20:00:20 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A7A23294DF; Wed, 7 Mar 2018 20:00:20 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1CAB328346 for ; Wed, 7 Mar 2018 20:00:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754416AbeCGUAQ (ORCPT ); Wed, 7 Mar 2018 15:00:16 -0500 Received: from mx143.netapp.com ([216.240.21.24]:52971 "EHLO mx143.netapp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934877AbeCGUAJ (ORCPT ); Wed, 7 Mar 2018 15:00:09 -0500 X-IronPort-AV: E=Sophos;i="5.47,437,1515484800"; d="scan'208";a="246845670" Received: from vmwexchts02-prd.hq.netapp.com ([10.122.105.23]) by mx143-out.netapp.com with ESMTP; 07 Mar 2018 12:00:08 -0800 Received: from VMWEXCCAS03-PRD.hq.netapp.com (10.122.105.19) by VMWEXCHTS02-PRD.hq.netapp.com (10.122.105.23) with Microsoft SMTP Server (TLS) id 15.0.1320.4; Wed, 7 Mar 2018 12:00:08 -0800 Received: from NAM03-BY2-obe.outbound.protection.outlook.com (10.120.60.153) by VMWEXCCAS03-PRD.hq.netapp.com (10.122.105.19) with Microsoft SMTP Server (TLS) id 15.0.1320.4 via Frontend Transport; Wed, 7 Mar 2018 12:00:08 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=netapp.onmicrosoft.com; s=selector1-netapp-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=UbJhAn8s4i03x0+uxvJCa9QukrOAwzRJQzaiXhsX4LQ=; b=CPCRMrG3ueZ3BYQayI8s1cO09s4rrUEVR59QREQ5A/o+APUmSyfoOJPhr13tUzKY4nYfD32cCEaHbI2k16Bw8yba5JUADTxQTnRVFyCkT7E/fLs1GEvs8sFFQuHILIrwtcrP5PNOex/npqblhFPq2tTVJ6M5nK3FMtkvgmITJls= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Anna.Schumaker@netapp.com; Received: from gouda.nowheycreamery.com (68.40.188.1) by MWHPR06MB3166.namprd06.prod.outlook.com (2603:10b6:301:41::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.548.13; Wed, 7 Mar 2018 20:00:06 +0000 Subject: Re: [PATCH 5/9] SUNRPC: Initialize rpc_rqst outside of xprt->reserve_lock To: Chuck Lever CC: linux-rdma , Linux NFS Mailing List References: <20180305200825.10904.40829.stgit@manet.1015granger.net> <20180305201318.10904.57825.stgit@manet.1015granger.net> <4dd8259a-e447-122b-c267-75e2e6b4714e@Netapp.com> <41538F44-115C-4F64-9BCA-0A6B8723A9F5@oracle.com> From: Anna Schumaker Message-ID: <9ac7ea34-d409-da6a-21cb-35fa6e09cd66@Netapp.com> Date: Wed, 7 Mar 2018 15:00:01 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <41538F44-115C-4F64-9BCA-0A6B8723A9F5@oracle.com> Content-Language: en-US X-Originating-IP: [68.40.188.1] X-ClientProxiedBy: DM5PR1401CA0018.namprd14.prod.outlook.com (2603:10b6:4:4a::28) To MWHPR06MB3166.namprd06.prod.outlook.com (2603:10b6:301:41::12) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 085fd912-e4b2-4c5c-6b4b-08d584660679 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(5600026)(4604075)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7193020); SRVR:MWHPR06MB3166; X-Microsoft-Exchange-Diagnostics: 1; MWHPR06MB3166; 3:QmjmVgq/aJwFTZBfkXFNdBMLGOXCbQtY9bBdY2WqZ6N5UbFizN2UaMOxumQ7yiE+mFC5ge63uLwbsmif/KLWOWtkOl0RQBarUqZLa/SSAiwY/DBdaD0ZRuj+FsNQcQG6a6Yjn/Rt2H5Br4rFgzDhT/CbdMJsyWOKxNKY6KeYEE0rrpjpM8LfDpEdNkvfjREp/1x8Q+QTeOcixJ+MCskDHatlsHvXuubUF6OGnft+wSxpwkckuqQ+NLF63GwHS56y; 25:0c0QBnEoO2XxNgWCw8YH3BhRmZuYC0Bf9SESs/4XDYYkRXktZGKYqtzMuGau1T+cpxMhlf5zE+ZS21pYOG3ZeBvefvUtVsdrxLsIQTUZnz73n25xCbIqVvheVeojmK7e4SGBBK/nola4Cr5L1JrGAKnaMVaJQnZxCZO7hEYf4vDvL93GPk3PDCgr/EZKSA/XJImonvBA/C/vpnyV5ifNwl9+C2n3f3nRCxgzFx7mlN70DrNE6nCuMh6xo40LK4H+6Uyb8UYpQrGzhlMSgndD9l5VNV3Xhv9EKX9sXsruov4Dm+ScYbIpcZ+Rlk+/OB25GG/iNUKOaJdh0kqhi+DvNw==; 31:pphTkoF4LZN4t8zcpv4z3oZ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j1lI4ypMI0eImOx4MkKu/3PXdcIzgTlP/j+0+Jq4P2weV1bAbg1eap7UyKnILwqhyCTym0cxJzX84As2haaKg3dlOeteZGQ2l+hZf4nEiJb X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(9452136761055)(21532816269658)(146099531331640); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040501)(2401047)(8121501046)(5005006)(3002001)(3231220)(944501244)(52105095)(93006095)(93001095)(10201501046)(6055026)(6041288)(20161123562045)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123558120)(6072148)(201708071742011); SRVR:MWHPR06MB3166; BCL:0; PCL:0; RULEID:; SRVR:MWHPR06MB3166; X-Forefront-PRVS: 0604AFA86B X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(979002)(39860400002)(39380400002)(366004)(346002)(376002)(396003)(199004)(189003)(2486003)(52146003)(52116002)(31686004)(16526019)(76176011)(59450400001)(186003)(23676004)(106356001)(6486002)(386003)(8936002)(53546011)(36756003)(6506007)(575784001)(25786009)(86362001)(478600001)(26005)(50466002)(2906002)(6306002)(93886005)(6512007)(53416004)(64126003)(53936002)(305945005)(4326008)(54906003)(7736002)(6116002)(3846002)(58126008)(47776003)(81166006)(65956001)(229853002)(65806001)(105586002)(66066001)(81156014)(316002)(230700001)(65826007)(69596002)(8676002)(5660300001)(6666003)(72206003)(2950100002)(68736007)(966005)(6916009)(31696002)(97736004)(6246003)(969003)(989001)(999001)(1009001)(1019001); DIR:OUT; SFP:1101; SCL:1; SRVR:MWHPR06MB3166; H:gouda.nowheycreamery.com; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; Received-SPF: None (protection.outlook.com: netapp.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtNV0hQUjA2TUIzMTY2OzIzOm1tQkNWLzl1YUlIdmtqOTQ5SHhCa1FtQ2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I1p/mNyUAVWQ311I0rhCcnNDWzjUojKT7PUNnXLfQGZCoLv4KUR88y6A0pV4QJyeaX19yXF4Xllq4CK/R7e9WLL8QAqCyZl10BEzBcDCJpLfSlkI8=; 24:kcE2KTdsHO/sGm1sDZEHvELnS67NT4TdNXdagv40L2h7iTqNT2Q4xrcrW88BbZBVbG0cf02TvkSFe/LMRbn8ZLY/BqUradjj1qwG96kFtmw=; 7:z4L6lGXRMlHYFOySriib9TK1yz+Mmi7BBt9ze8Duesf2I6UMdkHchMWFK/v6p5qnnc2vsYCLUuMptPcZpOWjF8brXNed8dafNBDswlM38nttnixVJJU81v7C8cMyI4CreAmaBvjWrr5pLdBZ0jJD8DGAsj5kleekF44gq5GTfQPToTUscwHiYJZM11y3TMqp8FKlSYzEWLZ31xRLwZmg721ums9Y19TxHJo5gHyb3uP+RwhJoveqbozT0Gf5xX6X SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Mar 2018 20:00:06.8100 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 085fd912-e4b2-4c5c-6b4b-08d584660679 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4b0911a0-929b-4715-944b-c03745165b3a X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR06MB3166 X-OriginatorOrg: netapp.com Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On 03/06/2018 05:30 PM, Chuck Lever wrote: > > >> On Mar 6, 2018, at 5:07 PM, Chuck Lever wrote: >> >> >> >>> On Mar 6, 2018, at 5:02 PM, Anna Schumaker wrote: >>> >>> Hi Chuck, >>> >>> I'm seeing a huge performance hit with this patch. I'm just running cthon over TCP, and it goes from finishing in 22 seconds to taking well over 5 minutes. I seem to only see this on the read and write tests, such as basic test5 taking a minute to finish: >>> >>> ./test5: read and write >>> wrote 1048576 byte file 10 times in 60.35 seconds (173737 bytes/sec) >>> read 1048576 byte file 10 times in 0.0 seconds (-2147483648 bytes/sec) >>> ./test5 ok. >> >> OK. This looks like write is impacted, but this test doesn't >> actually perform any reads on the wire. Try iozone with -I, >> maybe? That would show results for both read and write. > > Hum. > > Stock v4.16-rc4: > > ./test5: read and write > wrote 1048576 byte file 10 times in 0.2 seconds (350811642 bytes/sec) > read 1048576 byte file 10 times in 0.0 seconds (-2147483648 bytes/sec) > ./test5 ok. > > > v4.16-rc4 with my full set of patches: > > ./test5: read and write > wrote 1048576 byte file 10 times in 0.2 seconds (354236681 bytes/sec) > read 1048576 byte file 10 times in 0.0 seconds (-2147483648 bytes/sec) > ./test5 ok. > > I don't see a regression here. Let me know how it goes! I'm using rc4 too, so maybe it's something different in my setup? Making this change fixes the issue for me: Anna > > >>> I haven't dug into this too deeply, but my best guess is that maybe it's due to adding a call to xprt_request_init() in net/sunrpc/clnt.c:call_reserveresult() >> >> It wasn't added there, it was moved from xprt_alloc_slot. So, >> it's not new work per-RPC. >> >> Any additional information would be appreciated! >> >> >>> Thoughts? >>> Anna >>> >>> On 03/05/2018 03:13 PM, Chuck Lever wrote: >>>> alloc_slot is a transport-specific op, but initializing an rpc_rqst >>>> is common to all transports. Move initialization to common code in >>>> preparation for adding a transport-specific alloc_slot to xprtrdma. >>>> >>>> Signed-off-by: Chuck Lever >>>> --- >>>> include/linux/sunrpc/xprt.h | 1 + >>>> net/sunrpc/clnt.c | 1 + >>>> net/sunrpc/xprt.c | 12 +++++++----- >>>> 3 files changed, 9 insertions(+), 5 deletions(-) >>>> >>>> diff --git a/include/linux/sunrpc/xprt.h b/include/linux/sunrpc/xprt.h >>>> index 5fea0fb..9784e28 100644 >>>> --- a/include/linux/sunrpc/xprt.h >>>> +++ b/include/linux/sunrpc/xprt.h >>>> @@ -324,6 +324,7 @@ struct xprt_class { >>>> struct rpc_xprt *xprt_create_transport(struct xprt_create *args); >>>> void xprt_connect(struct rpc_task *task); >>>> void xprt_reserve(struct rpc_task *task); >>>> +void xprt_request_init(struct rpc_task *task); >>>> void xprt_retry_reserve(struct rpc_task *task); >>>> int xprt_reserve_xprt(struct rpc_xprt *xprt, struct rpc_task *task); >>>> int xprt_reserve_xprt_cong(struct rpc_xprt *xprt, struct rpc_task *task); >>>> diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c >>>> index 6e432ec..226f558 100644 >>>> --- a/net/sunrpc/clnt.c >>>> +++ b/net/sunrpc/clnt.c >>>> @@ -1546,6 +1546,7 @@ void rpc_force_rebind(struct rpc_clnt *clnt) >>>> task->tk_status = 0; >>>> if (status >= 0) { >>>> if (task->tk_rqstp) { >>>> + xprt_request_init(task); >>>> task->tk_action = call_refresh; >>>> return; >>>> } >>>> diff --git a/net/sunrpc/xprt.c b/net/sunrpc/xprt.c >>>> index 70f0050..a394b46 100644 >>>> --- a/net/sunrpc/xprt.c >>>> +++ b/net/sunrpc/xprt.c >>>> @@ -66,7 +66,7 @@ >>>> * Local functions >>>> */ >>>> static void xprt_init(struct rpc_xprt *xprt, struct net *net); >>>> -static void xprt_request_init(struct rpc_task *, struct rpc_xprt *); >>>> +static __be32 xprt_alloc_xid(struct rpc_xprt *xprt); >>>> static void xprt_connect_status(struct rpc_task *task); >>>> static int __xprt_get_cong(struct rpc_xprt *, struct rpc_task *); >>>> static void __xprt_put_cong(struct rpc_xprt *, struct rpc_rqst *); >>>> @@ -987,6 +987,8 @@ bool xprt_prepare_transmit(struct rpc_task *task) >>>> task->tk_status = -EAGAIN; >>>> goto out_unlock; >>>> } >>>> + if (likely(!bc_prealloc(req))) >>>> + req->rq_xid = xprt_alloc_xid(xprt); >>>> ret = true; >>>> out_unlock: >>>> spin_unlock_bh(&xprt->transport_lock); >>>> @@ -1163,10 +1165,10 @@ void xprt_alloc_slot(struct rpc_xprt *xprt, struct rpc_task *task) >>>> out_init_req: >>>> xprt->stat.max_slots = max_t(unsigned int, xprt->stat.max_slots, >>>> xprt->num_reqs); >>>> + spin_unlock(&xprt->reserve_lock); >>>> + >>>> task->tk_status = 0; >>>> task->tk_rqstp = req; >>>> - xprt_request_init(task, xprt); >>>> - spin_unlock(&xprt->reserve_lock); >>>> } >>>> EXPORT_SYMBOL_GPL(xprt_alloc_slot); >>>> >>>> @@ -1303,8 +1305,9 @@ static inline void xprt_init_xid(struct rpc_xprt *xprt) >>>> xprt->xid = prandom_u32(); >>>> } >>>> >>>> -static void xprt_request_init(struct rpc_task *task, struct rpc_xprt *xprt) >>>> +void xprt_request_init(struct rpc_task *task) >>>> { >>>> + struct rpc_xprt *xprt = task->tk_xprt; >>>> struct rpc_rqst *req = task->tk_rqstp; >>>> >>>> INIT_LIST_HEAD(&req->rq_list); >>>> @@ -1312,7 +1315,6 @@ static void xprt_request_init(struct rpc_task *task, struct rpc_xprt *xprt) >>>> req->rq_task = task; >>>> req->rq_xprt = xprt; >>>> req->rq_buffer = NULL; >>>> - req->rq_xid = xprt_alloc_xid(xprt); >>>> req->rq_connect_cookie = xprt->connect_cookie - 1; >>>> req->rq_bytes_sent = 0; >>>> req->rq_snd_buf.len = 0; >>>> >> >> -- >> Chuck Lever >> >> >> >> -- >> To unsubscribe from this list: send the line "unsubscribe linux-rdma" in >> the body of a message to majordomo@vger.kernel.org >> More majordomo info at http://vger.kernel.org/majordomo-info.html > > -- > Chuck Lever > > > --- To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/net/sunrpc/xprt.c b/net/sunrpc/xprt.c index a394b4635f8e..273847f7e455 100644 --- a/net/sunrpc/xprt.c +++ b/net/sunrpc/xprt.c @@ -987,8 +987,6 @@ bool xprt_prepare_transmit(struct rpc_task *task) task->tk_status = -EAGAIN; goto out_unlock; } - if (likely(!bc_prealloc(req))) - req->rq_xid = xprt_alloc_xid(xprt); ret = true; out_unlock: spin_unlock_bh(&xprt->transport_lock); @@ -1315,6 +1313,7 @@ void xprt_request_init(struct rpc_task *task) req->rq_task = task; req->rq_xprt = xprt; req->rq_buffer = NULL; + req->rq_xid = xprt_alloc_xid(xprt); req->rq_connect_cookie = xprt->connect_cookie - 1; req->rq_bytes_sent = 0; req->rq_snd_buf.len = 0;