From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Martin K. Petersen" Subject: Re: [PATCH] scsi: lpfc: use monotonic timestamps for statistics Date: Tue, 26 Jun 2018 12:00:54 -0400 Message-ID: References: <20180618152903.1756535-1-arnd@arndb.de> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Return-path: In-Reply-To: <20180618152903.1756535-1-arnd@arndb.de> (Arnd Bergmann's message of "Mon, 18 Jun 2018 17:28:23 +0200") List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: y2038-bounces@lists.linaro.org Sender: "Y2038" To: Arnd Bergmann Cc: Hannes Reinecke , "James E.J. Bottomley" , linux-scsi@vger.kernel.org, "Martin K. Petersen" , y2038@lists.linaro.org, James Smart , linux-kernel@vger.kernel.org, Johannes Thumshirn , Dick Kennedy List-Id: linux-scsi@vger.kernel.org CkFybmQsCgo+IFRoZSBnZXRfc2Vjb25kcygpIGZ1bmN0aW9uIHN1ZmZlcnMgZnJvbSBhIHBvc3Np YmxlIG92ZXJmbG93IGluIDIwMzggb3IKPiAyMTA2LCBhcyB3ZWxsIGFzIGppdHRlciBkdWUgdG8g c2V0dGltZW9mZGF5IG9yIGxlYXAgc2Vjb25kIHVwZGF0ZXMsCj4gYW5kIGlzIGRlcHJlY2F0ZWQu Cj4KPiBBcyB3ZSBhcmUgaW50ZXJlc3RlZCBpbiBlbGFwc2VkIHRpbWUgb25seSwgdXNpbmcga3Rp bWVfZ2V0X3NlY29uZHMoKQo+IHRvIHJlYWQgdGhlIENMT0NLX01PTk9UT05JQyB0aW1lYmFzZSBp cyBpZGVhbCBoZXJlLiBUaGlzIGFsc28gbGV0cyB1cwo+IHJlbW92ZSB0aGUgaGFjayB0aGF0IHRy aWVzIHRvIGRlYWwgd2l0aCBnZXRfc2Vjb25kcygpIGdvaW5nIHNsaWdodGx5Cj4gYmFja3dhcmRz LCB3aGljaCBjYW5ub3QgaGFwcGVuIHdpdGggbW9udG9uaWMgdGltZXN0YW1wcy4KCkFwcGxpZWQg dG8gNC4xOS9zY3NpLXF1ZXVlLiBUaGFua3MhCgotLSAKTWFydGluIEsuIFBldGVyc2VuCU9yYWNs ZSBMaW51eCBFbmdpbmVlcmluZwpfX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fXwpZMjAzOCBtYWlsaW5nIGxpc3QKWTIwMzhAbGlzdHMubGluYXJvLm9yZwpodHRw czovL2xpc3RzLmxpbmFyby5vcmcvbWFpbG1hbi9saXN0aW5mby95MjAzOAo= From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.9 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_PASS, T_DKIMWL_WL_HIGH,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3563FC43144 for ; Tue, 26 Jun 2018 16:03:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E551D26D85 for ; Tue, 26 Jun 2018 16:03:28 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="X1vebm+h" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E551D26D85 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=oracle.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752715AbeFZQD0 (ORCPT ); Tue, 26 Jun 2018 12:03:26 -0400 Received: from userp2120.oracle.com ([156.151.31.85]:60830 "EHLO userp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752524AbeFZQDY (ORCPT ); Tue, 26 Jun 2018 12:03:24 -0400 Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w5QFsTN0149617; Tue, 26 Jun 2018 16:01:01 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=to : cc : subject : from : references : date : in-reply-to : message-id : mime-version : content-type; s=corp-2017-10-26; bh=TU7YPeB8u9a/+uEXgGW/SXplYVc2tIbi4l/A6Ccfwew=; b=X1vebm+hARIV6ftB0f8YeBmyeUm5/o5PKXoD27fjaAqoSpwfTmkvV5r08TqMVIupZvI4 YYKqCB0ZV7lzXJ2k/2H+57o3Uwqk+JqSA+97rG99rV1dtPtJwceFmMD0czcCJa9JgUle R3sxrlIfAFkWpoIsPCdH01cJAXPoUZ3FSmDPl8BmDN9TG+qRkn0zk2Mzj/Urel53T2ia GAYXAbtvRwFoIjJYbLcbgzdnC2Fia7T+6oAE7rA63ZyfxltmfNz/JoJX8wkeR9Pmm60R DgUibMmb3vneqIUzXMLrwfu8PTNofXX+Szls7K4aGTn8KXHXgo5F640eSKO6vkenJOsB Ww== Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by userp2120.oracle.com with ESMTP id 2jum0a18g5-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 26 Jun 2018 16:01:01 +0000 Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by aserv0022.oracle.com (8.14.4/8.14.4) with ESMTP id w5QG0wGQ003421 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 26 Jun 2018 16:00:59 GMT Received: from abhmp0011.oracle.com (abhmp0011.oracle.com [141.146.116.17]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id w5QG0vw3003620; Tue, 26 Jun 2018 16:00:58 GMT Received: from ca-mkp.ca.oracle.com (/10.159.214.123) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 26 Jun 2018 09:00:57 -0700 To: Arnd Bergmann Cc: James Smart , Dick Kennedy , "James E.J. Bottomley" , "Martin K. Petersen" , y2038@lists.linaro.org, Hannes Reinecke , Johannes Thumshirn , linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] scsi: lpfc: use monotonic timestamps for statistics From: "Martin K. Petersen" Organization: Oracle Corporation References: <20180618152903.1756535-1-arnd@arndb.de> Date: Tue, 26 Jun 2018 12:00:54 -0400 In-Reply-To: <20180618152903.1756535-1-arnd@arndb.de> (Arnd Bergmann's message of "Mon, 18 Jun 2018 17:28:23 +0200") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8935 signatures=668703 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=660 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1806210000 definitions=main-1806260179 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Arnd, > The get_seconds() function suffers from a possible overflow in 2038 or > 2106, as well as jitter due to settimeofday or leap second updates, > and is deprecated. > > As we are interested in elapsed time only, using ktime_get_seconds() > to read the CLOCK_MONOTONIC timebase is ideal here. This also lets us > remove the hack that tries to deal with get_seconds() going slightly > backwards, which cannot happen with montonic timestamps. Applied to 4.19/scsi-queue. Thanks! -- Martin K. Petersen Oracle Linux Engineering