Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp1574417pxa; Thu, 20 Aug 2020 15:05:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzQhSNiXLEU2e1hYyeYrlwmqxnihcd0693+oBCoMZW1OX7+9eubnIk2oQf5gbaki5IDLnTX X-Received: by 2002:a17:906:57cc:: with SMTP id u12mr1717ejr.422.1597961159095; Thu, 20 Aug 2020 15:05:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597961159; cv=none; d=google.com; s=arc-20160816; b=RPK5m3904nLFNh5GA6xuo/DAaG9XqSLPsf6VOQ+4yWJQCUeSshRkviZeVLtq6BxoqJ /nVzNlqev9a6whXzTazi3BlEtRnrbUOiD2f47VEmPW4sWpjayNy/ItENlXUMDBqWMd4L XwtFSP72kLU9rlgIwSRx4BKsWVWke94uHLqSQ1a9igirKS7jPbXbaLwcPIy+CeA8Ung0 eXz3ICBZ2syo8JBlOtP7+0oBppCFd4nXCD746rlAbD9jLfSoeLihDfHZdB9YS8ef6osg r4Djlnm4MGkDhP4EJsBQGiZPv5o72Bznv5HL8FjocMsek2sUG0caMCD2VDsl2WE0L7aS O3Yw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:dkim-filter; bh=2H5J51gfYomnZO7gO0OSn0mfMlYSdm+2t/COROltWJk=; b=K5fSZ+J7AzWEpVhnxeHs5KANMONTSuOfhzWZU1zDGbmJxEng+uRS7JdVciKttkmt7s Bqq9S6dfkGeSWXPMvgcW5VTAwKDdSlb9vHPRHxRS6KyvlESi/vUkEZ3S325TuXibL2VI 5/JF9RlaqaP3DyL0KBWj/tNvXXEzUnd6FCXYqskd76p3hzUjQkVnmmlbc1lLjOmMMqCQ a/P1RjilmIgz0AE7fgJVwwU4oNSB5ZXERWq/SLqrYoGebsUuKu7DUL/3mn5TAvN6ZhoT Aps11NqSN9lwDckwSdfEYbOYahSAih6v6hDwFDuDyQ1ODIUgXItMbPw84D+MV+hi38LG ow5g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.microsoft.com header.s=default header.b=L8Xc757w; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.microsoft.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a3si2212935edk.48.2020.08.20.15.05.35; Thu, 20 Aug 2020 15:05:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.microsoft.com header.s=default header.b=L8Xc757w; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727888AbgHTVjO (ORCPT + 99 others); Thu, 20 Aug 2020 17:39:14 -0400 Received: from linux.microsoft.com ([13.77.154.182]:38128 "EHLO linux.microsoft.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726435AbgHTVjN (ORCPT ); Thu, 20 Aug 2020 17:39:13 -0400 Received: from viremana-dev.fwjladdvyuiujdukmejncen4mf.xx.internal.cloudapp.net (unknown [13.66.132.26]) by linux.microsoft.com (Postfix) with ESMTPSA id 832E320B4908; Thu, 20 Aug 2020 14:39:12 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 832E320B4908 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1597959552; bh=2H5J51gfYomnZO7gO0OSn0mfMlYSdm+2t/COROltWJk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=L8Xc757whT9VGBAlNfTbZP2IUNTBjn5l9aAU4aVMa+NrFXAlLtFNUGr18jxDkhbZa x8rJ+O/011M8foZM1gay5fWqaiXh9WEa2uBRQOZld4doNSr3/+fd7KI2ubMhqspE8a dPscSCUZ0+elGrfU+x9MfxmSZvcXVBpC66tXTwYY= Date: Thu, 20 Aug 2020 21:39:12 +0000 From: Vineeth Pillai To: Michael Kelley Cc: Haiyang Zhang , Stephen Hemminger , Wei Liu , KY Srinivasan , "linux-hyperv@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH] hv_utils: return error if host timesysnc update is stale Message-ID: <20200820213912.fmttvj6wcirn5sas@viremana-dev.fwjladdvyuiujdukmejncen4mf.xx.internal.cloudapp.net> References: <20200819174527.47156-1-viremana@linux.microsoft.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20171215 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Michael, > > +const u64 HOST_TIMESYNC_DELAY_THRESH = 600 * NSEC_PER_SEC; > > Kernel test robot has already complained that this should be static, > and about the potential overflow based on the types of the constants in > the right side expression. I didn't check the details, but I suspect the > complaint is when building in 32-bit mode. This code does get built in > 32-bit mode and it's possible for run 32-bit Linux guests on Hyper-V. > NSEC_PER_SEC is defined long and it caused the warning with i386 build. Casting it to u64 would fix the issue. Will fix the static warning as well in the next iteration. > > + pr_warn("TIMESYNC IC: Stale time stamp, %llu nsecs old\n", > > + HOST_TIMESYNC_DELAY_THRESH); > > Let's provide the timediff_adj in the message instead of the constant > threshold value so we know the degree of staleness. :-) > > Also, I'm wondering if this should be pr_warn_once(). Presumably > chronyd or whoever is reading /dev/ptp0 will give up after getting > this error, but if not, it would be nice to avoid filling up the console > with these error messages. > Makes sense, will fix this also. Thanks, Vineeth