Received: by 10.213.65.68 with SMTP id h4csp2855498imn; Mon, 2 Apr 2018 15:35:30 -0700 (PDT) X-Google-Smtp-Source: AIpwx49ZEGxS0Kqn40xtDC2NVRopJji4EgSGlC+tlK24dB6a3gLMRNpZhufCkKk11w/3R9lGaxBv X-Received: by 10.99.111.3 with SMTP id k3mr7462971pgc.135.1522708530536; Mon, 02 Apr 2018 15:35:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522708530; cv=none; d=google.com; s=arc-20160816; b=Vz2MBNo2Zl+R4DZqOqudtaHVry4BEPREreay3kEQNmRPXg/Of6I6d5a1X29eyhppo2 8rQkfjWy25WYxCaF71amAUfAQi4cSZk9Tf3XYAAAfhskTaGDaMgY69rkiSPW3SoFS1Rh TaKc2bLRhmBzN0odDhZvEHV/9l7XY3iF2owA09fsayOWqcQE6nMTdkxfCky6bAQy3n0j hpI0Am8dGk1zhaoy5PgtqFehghdIni7967SfOF3r4Z4gTjhGrJ5OzaF324mq8DDQdoDe FlAqDlb30Wb29/AaeYvc0RbqfvN6twu1r/SiQltU4Nea+Mt5Q39ShBTrqyuf3eAnk29O +GpQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:references :in-reply-to:subject:cc:date:to:from:arc-authentication-results; bh=8OazoarOMi80RrZtr/rXjuOzkNnc4u9aOUTJifNk3sc=; b=P7SG2CHNAPgpKNh0iWd/lhixw56bmvF10s1sbyN4aL7zK1d/LwhSO8s0jrbXWh71G7 8CVvpM0AtWiHbRVtszFgFZw4VNXvhk0/xtvisnHY4LS7Ld1pvgB5XjmfeR1kQvYpEm5W CgYe/9xGikVJobgNCGq68aUAnfk8D/O7to2rsJCNUYTAHNSW7XrJGm7Q+fjR/J4VqROI wKzB4LVmjMn2bErYZKFabmKcfIMUcQxsMhBbwmdqNIZWVAb2p+eeJoDRw0p510iF1NnM puh2puIxUi6gLbwdJDyJ57/4JP7/zwU/Nmo0uesYcy8bzRJ2kRttkWCpi8OVyRXQF5LZ xkHg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l61-v6si1326653plb.568.2018.04.02.15.35.16; Mon, 02 Apr 2018 15:35:30 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754567AbeDBWeK (ORCPT + 99 others); Mon, 2 Apr 2018 18:34:10 -0400 Received: from mx2.suse.de ([195.135.220.15]:60342 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754516AbeDBWeJ (ORCPT ); Mon, 2 Apr 2018 18:34:09 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 924DAAE09; Mon, 2 Apr 2018 22:34:08 +0000 (UTC) From: NeilBrown To: "Dilger\, Andreas" Date: Tue, 03 Apr 2018 08:34:00 +1000 Cc: "Drokin\, Oleg" , Greg Kroah-Hartman , James Simmons , "Linux Kernel Mailing List" , Lustre Development List Subject: Re: [PATCH 13/17] staging: lustre: libcfs: remove cfs_timeout_cap() In-Reply-To: <346B8E2C-5842-4771-86D8-CBB5CEF2DC35@intel.com> References: <152229732768.27689.4800156943561963977.stgit@noble> <152229760874.27689.12453214678546053828.stgit@noble> <346B8E2C-5842-4771-86D8-CBB5CEF2DC35@intel.com> Message-ID: <87k1tp1bmv.fsf@notabene.neil.brown.name> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On Mon, Apr 02 2018, Dilger, Andreas wrote: > On Mar 28, 2018, at 22:26, NeilBrown wrote: >> diff --git a/drivers/staging/lustre/include/linux/libcfs/linux/linux-tim= e.h b/drivers/staging/lustre/include/linux/libcfs/linux/linux-time.h >> index ff3aae2f1231..ecb2126a9e6f 100644 >> --- a/drivers/staging/lustre/include/linux/libcfs/linux/linux-time.h >> +++ b/drivers/staging/lustre/include/linux/libcfs/linux/linux-time.h >> @@ -78,7 +78,7 @@ static inline int cfs_time_beforeq_64(u64 t1, u64 t2) >> /* >> * One jiffy >> */ >> -#define CFS_TICK (1) >> +#define CFS_TICK (1UL) > > It seems like CFS_TICK is mostly useless as well and could just be droppe= d? Possibly, but I don't know what its purpose is so I didn't want to just drop it in the middle of a patch that is performing an idempotent transformation. Do you know why the one place that uses CFS_TICK wants to protect about a timeout of zero? Maybe because the old l_wait_event() treated a timeout of zero as meaning no timeout? In that case this really is irrelevant now and that wait_event_idle_timeout() should just use "timeout" directly. Thanks, NeilBrown > >> #define CFS_DURATION_T "%ld" >>=20 >> diff --git a/drivers/staging/lustre/lustre/ptlrpc/import.c b/drivers/sta= ging/lustre/lustre/ptlrpc/import.c >> index 4a9d1f189d01..dd4fd54128dd 100644 >> --- a/drivers/staging/lustre/lustre/ptlrpc/import.c >> +++ b/drivers/staging/lustre/lustre/ptlrpc/import.c >> @@ -1486,7 +1486,7 @@ int ptlrpc_disconnect_import(struct obd_import *im= p, int noclose) >> } >>=20 >> if (ptlrpc_import_in_recovery(imp)) { >> - long timeout; >> + unsigned long timeout; >>=20 >> if (AT_OFF) { >> if (imp->imp_server_timeout) >> @@ -1501,7 +1501,7 @@ int ptlrpc_disconnect_import(struct obd_import *im= p, int noclose) >>=20 >> if (wait_event_idle_timeout(imp->imp_recovery_waitq, >> !ptlrpc_import_in_recovery(imp), >> - cfs_timeout_cap(timeout)) =3D=3D 0) >> + max(timeout, CFS_TICK)) =3D=3D 0) >> l_wait_event_abortable( >> imp->imp_recovery_waitq, >> !ptlrpc_import_in_recovery(imp)); >>=20 >>=20 > > Cheers, Andreas > -- > Andreas Dilger > Lustre Principal Architect > Intel Corporation --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEG8Yp69OQ2HB7X0l6Oeye3VZigbkFAlrCr9kACgkQOeye3VZi gbnnfhAAv1ip0QJR0qLJ8SXIOFocVwJfPS+J9pw51MC+2bkZkQ1x8ZO6gq0ZlVoR Hmc/65qENJAyJtXee6RxC1fO5fF2pLkHbUkzPg5cohu8sjBznaZA2OFShLwnRXyd /hFp+az2v1UG7rcoY63yXVgtkPzoQRTSdnE+A9sOqYdUdOAQ6Ap+BBlvvwjob6YB UY4o1Qd0pT9Fnk28YvS53dERbKTuUdvI8Gdqlh3+8kLkwp4ZofooIyv2IUlhiE1v TCpTARl5ETY0YSZ4poXYjMLPPESd20PRzC0c425Zg786h2Lwv36cE0daypQaeZx/ xl/aF+aSKJ2L+1M2/ZYLN33j8bfelzV0ox53bUqC055Xnwh1mVv8g3dZX4pncRPH D2TWwqT33eB1ybvXsff48N745XZMaMKYTEZGOsq8DlV01x4sCmKOuKFmlwMro6PS FKlvJE66O8W3nf/CTgTuRgu3zo/x1RfTdkOe3UI/y/kiuqJrUkFf83Uucf4WrERm GZWF8uzEAKqI6+slMEp3+a1WMv2YDvuzloQSSAjJzrmA1p1d1XtqsPd6Aw4Z4Yfw wSHARh5CrwhghVmVz2ADwtWONUWrp6VZsau/ZNhRyBYiRkpL8wfA8euBePTdX6Bw TDZNC2FbSozAg98Vhm/eFiSVYNj0RN6r5TwcJ9BUiBaS7whGggo= =Bb07 -----END PGP SIGNATURE----- --=-=-=--