Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752165AbdHNUXR (ORCPT ); Mon, 14 Aug 2017 16:23:17 -0400 Received: from mail-by2nam01on0094.outbound.protection.outlook.com ([104.47.34.94]:54208 "EHLO NAM01-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751527AbdHNUXP (ORCPT ); Mon, 14 Aug 2017 16:23:15 -0400 From: Tom Talpey To: Long Li , Steve French , "linux-cifs@vger.kernel.org" , "samba-technical@lists.samba.org" , "linux-kernel@vger.kernel.org" Subject: RE: [[PATCH v1] 14/37] [CIFS] SMBD: Post a SMBD data transfer message with page payload Thread-Topic: [[PATCH v1] 14/37] [CIFS] SMBD: Post a SMBD data transfer message with page payload Thread-Index: AQHTC8z5zaFVgLKT5kG3WmmFZMkWtqKEXN3Q Date: Mon, 14 Aug 2017 20:23:13 +0000 Message-ID: References: <1501704648-20159-1-git-send-email-longli@exchange.microsoft.com> <1501704648-20159-15-git-send-email-longli@exchange.microsoft.com> In-Reply-To: <1501704648-20159-15-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;CY4PR21MB0279;6:fGlsLi/BP9mQgsjYBtAKkYZ4e2B7V4rQPssRL0cqKwq6O5f3QyKcJbp0kqLP0f7/AnZ42vJmTL+6dmYg3e3XmiFr5x+0BAAAKNVG+2NP6Z2SqKJ0BPQeNHVxh2K0FRMqrFzh39no6vq0Wivq0LIHNONpthmzLCK03BODgu3o99r+dhGSuAwtlOyoA5hjxwhc5lPLTfq5vRjID2ED/oHG/6Mybpe+vJCUnk824BNsCUMgYZFEWOsMKFLXsiXkQwWpIt07UYpFt2405/95f6W65MZGbOik80gaTYLNwB6OWtOcjVrHqKpyMmbApOkyuNuOnLo802pYFFu/XL/DxTCJHQ==;5:+DkOj6IsAXiVf0WI1icrjU6FCamaPd4HXmpygY2w5rvYte5rYN1t4679B1OU6aJCCVQ4vecOYf4nAdvWVLa6Y+OFf+zuFdXOGP0ADFhRHcJlyPvdhSjY3kymivPoF2LMmnYZZkLawic6iJHqFYEDOw==;24:aoHvDrTAtDGC8L4F4PcmSt2uqHqhtoAlq8hSdLSbIio9Q5noggXnF/APUZiecTmkJPuOxoVnB6AYNxhAMPp7mrsu7FdcL8aqk68Cxq/PL4s=;7:cjA7c19ertZ4CZAOyN3v5+bb1EoAh7KsELkXG2nS7xmHtgMwqgXuiF3NaZlSJrZWvxTIaDK+87qZFhur8qc5zrVYaGO+A30VCh12uEyqxumLNXWdORRt9vGHVGRpXh2qMDsRK4hkBbTdnwn7Q3jTQcZmDcaK5/0MIunwybQcF2NjfoOG91Vth0geJLKX5SWYy6MxR4TZrZVakVIYgJcs1/CtA+EfNiUD82Ija6lqweQ= x-ms-office365-filtering-correlation-id: a6645c7d-73fb-4f76-aaf1-08d4e3524a2f x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(2017030254152)(300000503095)(300135400095)(48565401081)(2017052603142)(201703131423075)(201703031133081)(201702281549075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095);SRVR:CY4PR21MB0279; x-ms-traffictypediagnostic: CY4PR21MB0279: 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)(3002001)(93006095)(93001095)(10201501046)(6055026)(61426038)(61427038)(6041248)(20161123562025)(20161123555025)(20161123564025)(20161123560025)(20161123558100)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095);SRVR:CY4PR21MB0279;BCL:0;PCL:0;RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095);SRVR:CY4PR21MB0279; x-forefront-prvs: 039975700A x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(6009001)(39860400002)(47760400005)(199003)(13464003)(189002)(377454003)(2900100001)(97736004)(102836003)(3846002)(189998001)(6116002)(25786009)(53936002)(8936002)(99286003)(55016002)(6436002)(9686003)(8676002)(81156014)(81166006)(7736002)(15650500001)(3280700002)(3660700001)(2906002)(2201001)(53546010)(68736007)(5005710100001)(7696004)(10090500001)(8990500004)(5660300001)(105586002)(33656002)(478600001)(101416001)(106356001)(10290500003)(217423001)(50986999)(86612001)(1511001)(14454004)(86362001)(66066001)(74316002)(77096006)(305945005)(54356999)(76176999)(2950100002)(2501003)(6506006)(229853002)(6246003)(226483002);DIR:OUT;SFP:1102;SCL:1;SRVR:CY4PR21MB0279;H:CY4PR21MB0182.namprd21.prod.outlook.com;FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX: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 20:23:13.6293 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR21MB0279 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 v7EKNKLJ031695 Content-Length: 1182 Lines: 31 > -----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:10 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] 14/37] [CIFS] SMBD: Post a SMBD data transfer message > with page payload > > /* > + * Send a page > + * page: the page to send > + * offset: offset in the page to send > + * size: length in the page to send > + * remaining_data_length: remaining data to send in this payload > + */ > +static int cifs_rdma_post_send_page(struct cifs_rdma_info *info, struct page > *page, > + unsigned long offset, size_t size, int remaining_data_length) > +{ >... > + wait_event(info->wait_send_queue, atomic_read(&info->send_credits) > > 0); This is an uninterruptible wait, correct? What's to guarantee the event will ever fire? Also, if the count is zero, there should be a check that an SMB Direct credit request is outstanding. If not, it's wasteful to sleep for the keepalive timer to do so. Tom.