Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752233AbdHNSQd (ORCPT ); Mon, 14 Aug 2017 14:16:33 -0400 Received: from mail-sn1nam01on0134.outbound.protection.outlook.com ([104.47.32.134]:44064 "EHLO NAM01-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750936AbdHNSQb (ORCPT ); Mon, 14 Aug 2017 14:16:31 -0400 From: Long Li To: Christoph Hellwig CC: Steve French , "linux-cifs@vger.kernel.org" , "samba-technical@lists.samba.org" , "linux-kernel@vger.kernel.org" Subject: RE: [[PATCH v1] 12/37] [CIFS] SMBD: Handle send completion from CQ Thread-Topic: [[PATCH v1] 12/37] [CIFS] SMBD: Handle send completion from CQ Thread-Index: AQHTC8upFWdt/gloekSkwng+Ju3JKqKCI8eAgAIWPgA= Date: Mon, 14 Aug 2017 18:16:28 +0000 Message-ID: References: <1501704648-20159-1-git-send-email-longli@exchange.microsoft.com> <1501704648-20159-13-git-send-email-longli@exchange.microsoft.com> <20170813101945.GE17287@infradead.org> In-Reply-To: <20170813101945.GE17287@infradead.org> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Enabled=True; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_SiteId=72f988bf-86f1-41af-91ab-2d7cd011db47; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Ref=https://api.informationprotection.azure.com/api/72f988bf-86f1-41af-91ab-2d7cd011db47; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Owner=longli@microsoft.com; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_SetDate=2017-08-14T11:16:27.2072111-07:00; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Name=General; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Application=Microsoft Azure Information Protection; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Extended_MSFT_Method=Automatic; Sensitivity=General x-originating-ip: [2001:4898:80e8:c::735] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;CY4PR21MB0133;6:e2OupxJwbex6zCyggZ0spQmuRU2/jwubhncmXCAXFeMHH63kCgiHsePvCeLiOpvI7g1Sw/dgWzZsJ33Lkv40BDIyvuu67A9qU6/m4wEcu4gMSnOfN7ih4TnlEr1TslyJ8RyS9Sb+/M/0RVaKykM/PgoS1PbG8kqT/bXfA45z3tW0xWQpucT41iO1iZ1L8xut1R1zt+wztbDVVXzuBdBbsPP5NSv+NowQmQhNptNLR1v62AGBsq2CGj5GOIYfe/gh9pT6MyI3XoBifI+pyOFl53ny7rSVFoDbFVxsk1/sdXC/DD3b2bW9NBH4doxZtQdGnQdWr9BtF4FdJnCZJlZiDg==;5:4Eo+patEcMqcea9TtSmm8EGF+iiZuyZmU1vPoDGgw41RdEqJt9EUKeLkHjt/spYwEItjzEFSPXQSYr+IHcKeTZTL3M8NuU0HEH7syv6hOC/x9wLd8K9agyNdpgob6d3+Qw3O/YVvJQj0OEcAIb+otmPt9NZsj4oHKobWCaN7XNQ=;24:PJ45zWvpQVyyvQDj2PO4DhUqPcYWdMZbWhjhCdexI2U2TQTO89X2Bl4HGuqc9dqtbdTs+Fg/+slBxPBLojoN+5lOzqsda9i613UCiPACIlM=;7:SrLlv30l7HnNIm/ZnRCS3KkBya1ta+gUQAxFvQbR6Tqes1tr2zLA/ZiupJ6KSDQi4ppsJ0C6oVS/UQUfdTRo9PJVPaVZC4zWrRDIbD5h2obw3X7eowuETa04BkO8ITDsr/GlH/KHIJd+oRK1f3Rl1xdxnAema66Oop9lx3ICUzlVMYxpuD3FRSB+tMVCaH1Sic4wE4P/ysr/DHQriXJi7OlzuseJP/bCG92DV4fxCU4= x-ms-office365-filtering-correlation-id: d07bc021-f865-42bc-ad2c-08d4e340957b x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(2017030254152)(48565401081)(300000503095)(300135400095)(2017052603142)(201703131423075)(201703031133081)(201702281549075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095);SRVR:CY4PR21MB0133; x-ms-traffictypediagnostic: CY4PR21MB0133: x-exchange-antispam-report-test: UriScan:(89211679590171)(9452136761055); x-microsoft-antispam-prvs: x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(61425038)(6040450)(601004)(2401047)(8121501046)(5005006)(10201501046)(3002001)(100000703101)(100105400095)(93006095)(93001095)(6055026)(61426038)(61427038)(6041248)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123562025)(20161123564025)(20161123560025)(20161123555025)(20161123558100)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095);SRVR:CY4PR21MB0133;BCL:0;PCL:0;RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095);SRVR:CY4PR21MB0133; x-forefront-prvs: 039975700A x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(6009001)(39860400002)(47760400005)(377454003)(189002)(199003)(13464003)(7696004)(86362001)(110136004)(6246003)(189998001)(99286003)(54906002)(55016002)(9686003)(14454004)(102836003)(6116002)(10090500001)(2906002)(97736004)(10290500003)(3280700002)(3660700001)(86612001)(4326008)(478600001)(25786009)(50986999)(6506006)(77096006)(101416001)(76176999)(54356999)(106356001)(53546010)(105586002)(229853002)(6436002)(33656002)(7736002)(68736007)(8990500004)(305945005)(5660300001)(53936002)(81166006)(81156014)(74316002)(8676002)(2950100002)(6916009)(8936002)(5005710100001)(2900100001);DIR:OUT;SFP:1102;SCL:1;SRVR:CY4PR21MB0133;H:CY4PR21MB0182.namprd21.prod.outlook.com;FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;LANG:en; authentication-results: spf=none (sender IP is ) smtp.mailfrom=longli@microsoft.com; spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-originalarrivaltime: 14 Aug 2017 18:16:29.0155 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR21MB0133 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by nfs id v7EIGdfS024267 Content-Length: 902 Lines: 22 > -----Original Message----- > From: Christoph Hellwig [mailto:hch@infradead.org] > Sent: Sunday, August 13, 2017 3:20 AM > To: Long Li > Cc: Steve French ; linux-cifs@vger.kernel.org; samba- > technical@lists.samba.org; linux-kernel@vger.kernel.org; Long Li > > Subject: Re: [[PATCH v1] 12/37] [CIFS] SMBD: Handle send completion from > CQ > > You seem to be doing memory allocations and frees for every packet on the > write. At least for other RDMA protocols that would have been a major > performance issue. The size of SGE array passed to IB is unknown, so I don't know how much to pre-allocate in advance. But it seems this size is not big when passed down from CIFS. I will look at pre-allocating buffer if this is an issue. > > Do you have any performance numbers and/or profiles of the code? I will look into profiling.