Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752517AbdHNVPi (ORCPT ); Mon, 14 Aug 2017 17:15:38 -0400 Received: from mail-bl2nam02on0107.outbound.protection.outlook.com ([104.47.38.107]:40160 "EHLO NAM02-BL2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752275AbdHNVPg (ORCPT ); Mon, 14 Aug 2017 17:15:36 -0400 From: Tom Talpey To: Long Li , Steve French , "linux-cifs@vger.kernel.org" , "samba-technical@lists.samba.org" , "linux-kernel@vger.kernel.org" CC: Long Li Subject: RE: [[PATCH v1] 26/37] [CIFS] SMBD: Send an immediate packet when it's needed Thread-Topic: [[PATCH v1] 26/37] [CIFS] SMBD: Send an immediate packet when it's needed Thread-Index: AQHTC8w6sPxG+C7/KEmB1RUqCWAX66KEbJgQ Date: Mon, 14 Aug 2017 21:15:33 +0000 Message-ID: References: <1501704648-20159-1-git-send-email-longli@exchange.microsoft.com> <1501704648-20159-27-git-send-email-longli@exchange.microsoft.com> In-Reply-To: <1501704648-20159-27-git-send-email-longli@exchange.microsoft.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [24.218.182.144] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;CY4PR21MB0696;6:YnFVpqiQsM9WVeAruTEEbQopKq36Wq9BZ4APvVsiDYUlQUmBZBvQggnlL76wECHgRHHyMO5Ahx6I41qUS/lqqpPFsGUJFr+kc4YdxRYPyfdgSw8MdH03tze+76+BEwyLCi6GeVnjbn7XaQ1z3/C+oyvUiNKg7pDuAZl06v5zv8OFDjcbtEHp4bWv9znJmIOuPR3xNsQkpUwdm/G/BmfwEzil53vNSmNhuNIStQBuYwkNV/SCQgge+9vYSVEPLNMGlhiBh8w6wQExdOAho3gd67cIOwyMuSmZ41LQhnErIvO7dmqcpRZTsqy2op15HF/00fctAg2nl2V9koV9nuHcew==;5:deYCwbmh69hj2AlZ6HXcZCCxvlxUmgW4DlL8B0UBO8ExFopceNXJ6UQGNdQnYgKDEWMXeW5vxkM76ulA5wDuaBJrkJVtESIFEunLODV3iaViC6q9O1mH9VzR5IsXQy8m1ZNgSywN4wcybHmd6Ykwgg==;24:CBtE4jgjTkq+dMIeMsMgz2CWkNq9qpRg+lrw5tDPoxMavUn1QGZinvvIi22S0UuTHAsqlUI9QCusDE2sXk3BM5gZ4H4F8U8vkIOA/lOccc0=;7:wAHKZsGakXWYHf4TF1W/3kSGYUTkee4pd/HTlIqrKdzKcdN7nTZj5nCyKpncDDi2uGf7Fded+YasDFJ/zOppRAH6+N5ZuerLoFkMmzLV1oEJmtL/MwLGWoq8E+NehsZTpaUwzC7XUqQT/PO9sxa8disTswtOYR1f7tUK4kdmeW/XG8Gkw8GmZTqKCLINw3Mpu7h2XmwrHsfiggYHp9BhK0W5C53CHi0JB6OlJXukRvY= x-ms-office365-filtering-correlation-id: f217c21f-625c-4c15-ea02-08d4e35999e3 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:CY4PR21MB0696; x-ms-traffictypediagnostic: CY4PR21MB0696: authentication-results: spf=none (sender IP is ) smtp.mailfrom=ttalpey@microsoft.com; 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)(100000703101)(100105400095)(93006095)(93001095)(3002001)(10201501046)(6055026)(61426038)(61427038)(6041248)(20161123564025)(20161123555025)(20161123560025)(20161123558100)(20161123562025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095);SRVR:CY4PR21MB0696;BCL:0;PCL:0;RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095);SRVR:CY4PR21MB0696; x-forefront-prvs: 039975700A x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(6009001)(39860400002)(47760400005)(377454003)(13464003)(189002)(199003)(77096006)(53546010)(10090500001)(189998001)(6116002)(102836003)(81156014)(81166006)(3846002)(8936002)(55016002)(66066001)(99286003)(50986999)(76176999)(2906002)(6506006)(54356999)(25786009)(2201001)(10290500003)(5660300001)(7696004)(2501003)(74316002)(97736004)(478600001)(14454004)(8990500004)(86612001)(229853002)(33656002)(2950100002)(7736002)(305945005)(2900100001)(86362001)(53936002)(3660700001)(5005710100001)(4326008)(8676002)(3280700002)(6436002)(6246003)(107886003)(106356001)(9686003)(105586002)(101416001)(68736007)(1511001)(14773001);DIR:OUT;SFP:1102;SCL:1;SRVR:CY4PR21MB0696;H:CY4PR21MB0182.namprd21.prod.outlook.com;FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;LANG:en; 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 21:15:33.6715 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR21MB0696 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 v7ELFki3003069 Content-Length: 1021 Lines: 28 > -----Original Message----- > From: linux-cifs-owner@vger.kernel.org [mailto:linux-cifs- > owner@vger.kernel.org] On Behalf Of Long Li > Sent: Wednesday, August 2, 2017 4:11 PM > To: Steve French ; linux-cifs@vger.kernel.org; samba- > technical@lists.samba.org; linux-kernel@vger.kernel.org > Cc: Long Li > Subject: [[PATCH v1] 26/37] [CIFS] SMBD: Send an immediate packet when it's > needed > > +/* > + * Check and schedule to send an immediate packet > + * This is used to extend credtis to remote peer to keep the transport busy > + */ > +static void check_and_send_immediate(struct cifs_rdma_info *info) > +{ > + info->send_immediate = true; > + > + // promptly send a packet if running low on receive credits ...if *our peer* is running low on credits. > + if (atomic_read(&info->receive_credits) < > + atomic_read(&info->receive_credit_target) -1 ) Why read the receive_credit_target atomically? It's a mostly unchanging local value? Tom.