Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752780AbdHNXmc (ORCPT ); Mon, 14 Aug 2017 19:42:32 -0400 Received: from mail-sn1nam02on0113.outbound.protection.outlook.com ([104.47.36.113]:38072 "EHLO NAM02-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752651AbdHNXma (ORCPT ); Mon, 14 Aug 2017 19:42:30 -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] 25/37] [CIFS] SMBD: Support SMBD idle connection timer Thread-Topic: [[PATCH v1] 25/37] [CIFS] SMBD: Support SMBD idle connection timer Thread-Index: AQHTC8w1dwfWYewARk2rHr9arncB7KKEaznggAAnkgCAAAHXIA== Date: Mon, 14 Aug 2017 23:42:13 +0000 Message-ID: References: <1501704648-20159-1-git-send-email-longli@exchange.microsoft.com> <1501704648-20159-26-git-send-email-longli@exchange.microsoft.com> In-Reply-To: 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;CY4PR21MB0117;6:4+3RsH9iH6m7nRPv+UYEyjCramm1P94kcOaL3/TMXjPLPb2+p8gO1uFuf5HPNtL78+t4b4kppjlUyBNPhSAiiSU8OQtZTfOyUwWmRlFlxYq3Dd/KImRBV8erfatrQQNKcyXI92Xo9uZvHEdVPWCafLVmp2LpIiE4yf4meln9pze4Fddk3n/x2Y9wXPn1crJBs6TTtTGID5B33KNOksrOq6I/Xwh/bjZPkQcSS3ojPL8FcZ8UYUnEVxjodpTVO20W4KRHUrATCT8/aOhJsq3zlg5GmL3SssRGuiSvXg6t9p+p0/IazyTN3m6bzn1eRK7uTvcg569vdGDi959tAjgqsA==;5:I3PUBnjeeonJSMF70Kl4v7CdfcaeSk/FQIeRrPq1Jz9DTWadyGL9SbFB8zNTVBV+7+5dYYWm39Ve7nBcYYTNEFiRPA3jRbuFc5SYOKh3jdGnKdd7hZyqqWbelqKyIsGxQIfzXfHAdzRu/IQb2NyIUQ==;24:49BavjPFheRZpiehKmuoFYPpWh20QuBBluGjavV7mSR+n8Rbja/hZKhC2mpJfIILdBFUukrDioXFfxtM2wDoAg/i2jZV010QXh1avHzg5BI=;7:SB2/AlaFe9upL/ed/eSYilUpbKzSFqbNoAx77zXF65r1eLZs1PtfaOzUlxj4S/CiI3RIrfWst0b8bP0hrvPExjFzwOrKZHyE8psLOXwvC5M0GrcG5wDPueRQNoOg1qeeMvY9Tr7AZXzDDzjGHlXEw9NIQlm3R4zt9v4VXaIyCChxOSNAEt0Dwx0/ZlBNDlQb6OeiS4gJd6Q75tw524Plk5Rr9tc1ll0qHHqoDpYF9hw= x-ms-office365-filtering-correlation-id: 879b9e3f-a2af-4ff8-d3dc-08d4e36e1e4f 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)(2017052603143)(201703131423075)(201703031133081)(201702281549075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095);SRVR:CY4PR21MB0117; x-ms-traffictypediagnostic: CY4PR21MB0117: 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)(5005006)(8121501046)(100000703101)(100105400095)(93006095)(93001095)(3002001)(10201501046)(6055026)(61426038)(61427038)(6041248)(20161123560025)(20161123564025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123562025)(20161123558100)(20161123555025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095);SRVR:CY4PR21MB0117;BCL:0;PCL:0;RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095);SRVR:CY4PR21MB0117; x-forefront-prvs: 039975700A x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(6009001)(39860400002)(47760400005)(13464003)(199003)(377454003)(189002)(33656002)(86612001)(8936002)(1511001)(106356001)(105586002)(68736007)(2900100001)(101416001)(76176999)(54356999)(50986999)(66066001)(2421001)(6116002)(3846002)(102836003)(81156014)(53376002)(53366004)(229853002)(6666003)(2950100002)(10090500001)(97736004)(81166006)(6246003)(6436002)(53936002)(99286003)(55016002)(9686003)(2906002)(189998001)(3660700001)(8990500004)(6306002)(5005710100001)(77096006)(3280700002)(6506006)(93886004)(2561002)(74316002)(2201001)(478600001)(10290500003)(2501003)(86362001)(8676002)(305945005)(7736002)(53546010)(7696004)(25786009)(966005)(14454004)(5660300001)(10090945008);DIR:OUT;SFP:1102;SCL:1;SRVR:CY4PR21MB0117;H:CY4PR21MB0182.namprd21.prod.outlook.com;FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:1;LANG:en; authentication-results: spf=none (sender IP is ) smtp.mailfrom=ttalpey@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 23:42:13.5225 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR21MB0117 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 v7ENgbfW010655 Content-Length: 2838 Lines: 70 > -----Original Message----- > From: linux-cifs-owner@vger.kernel.org [mailto:linux-cifs- > owner@vger.kernel.org] On Behalf Of Long Li > Sent: Monday, August 14, 2017 7:30 PM > To: Tom Talpey ; Steve French ; > linux-cifs@vger.kernel.org; samba-technical@lists.samba.org; linux- > kernel@vger.kernel.org > Subject: RE: [[PATCH v1] 25/37] [CIFS] SMBD: Support SMBD idle connection > timer > > [This sender failed our fraud detection checks and may not be who they appear > to be. Learn about spoofing at http://aka.ms/LearnAboutSpoofing] > > > -----Original Message----- > > From: Tom Talpey > > Sent: Monday, August 14, 2017 2:12 PM > > 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] 25/37] [CIFS] SMBD: Support SMBD idle connection > > timer > > > > > -----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] 25/37] [CIFS] SMBD: Support SMBD idle connection > > > timer > > > > > > +static int keep_alive_interval = 120; > > > > This is the recommended value, but not the only possibility. > > > > > @@ -1348,6 +1369,10 @@ struct cifs_rdma_info* > > cifs_create_rdma_session( > > > init_waitqueue_head(&info->wait_send_queue); > > > init_waitqueue_head(&info->wait_reassembly_queue); > > > > > > + INIT_DELAYED_WORK(&info->idle_timer_work, > > idle_connection_timer); > > > + schedule_delayed_work(&info->idle_timer_work, > > > + info->keep_alive_interval*HZ); > > > + > > > > This initialization is ok, but the timer should be rescheduled (extended) any > > time any packet is sent. There is no need to perform keepalives on an active > > SMB Direct connection. > > My feeling is that rescheduling on a work queue for every packet is sent is not > efficient, especially under heavy conditions. That's not what I was suggesting. Cant the timer simply be re-extended to the 120-second interval? I.e. on an active connection, it will never fire because it's always advancing. As defined here, it will go off and send a keepalive every 120 seconds. The idle_connection_timer() routine unconditionally sends it. > > Firing it every 120 seconds doesn't seem to be big waste and may actually save > some CPU. Firing the timer, no big deal. Sending the packets and requiring the peer to process them too, disagree. Tom.