From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C4864426D18 for ; Thu, 9 Jul 2026 16:24:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=90.155.50.34 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783614260; cv=none; b=UZor1bC2bo11i/LWEe0NsW6iNcWKp9lubkJeCSEd6rtgQwJrRWFxfJsWtaNM5VdZAZzrQbtthbgGasSHSvH2LSFfkf0h3coepJ9xnx0H6ACUVELk8FdoWFabKHY87O8UW1SIFa44RaWhqwQbuaFTTtgxMBtkbNZWBMb7VTRQeLM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783614260; c=relaxed/simple; bh=xcOMhiegJDZu6ZLVDQNbQtUqpjwCaAxApDtNwiHC9fc=; h=Message-ID:Subject:From:To:Date:In-Reply-To:References: Content-Type:MIME-Version; b=rRQ8ZnUhnm5UmcvNtOTkLOSjipFOOAEqMRcRn1ulWb20KjjRp2VjBX1/HWO6nojPyv2NM0cnTv+d1qGArNcCD+JqWk+9DnBz/mGMFnGm1g7PDLigIKgMcmj8U2pRaWAgG9VoJnULY86th7cFBodiK9PoDm4t/SL7/3Pn14nXFbg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=infradead.org; spf=none smtp.mailfrom=casper.srs.infradead.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b=fsmyjopU; arc=none smtp.client-ip=90.155.50.34 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=infradead.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=casper.srs.infradead.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="fsmyjopU" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=MIME-Version:Content-Transfer-Encoding: Content-Type:References:In-Reply-To:Date:To:From:Subject:Message-ID:Sender: Reply-To:Cc:Content-ID:Content-Description; bh=sTmFWBlf4Lg3Ul4RXEII0SvlQQZwaT4tr7Wh/bq+qmA=; b=fsmyjopUNHPdfcQkvyHwdcPcTK JE/WdGC5kAwa4lkPTVE8lSBIeqEma5kl1U3ZX80wKusVl0M31nkatBDARl82NPiqC22fixKUVqDMU GWTBmsbQFsvL5NKb1Ib5Hf7xiIDbHsKgliX+zQe2jk8uT+Dkau4MhnlbItsYwH20h9cJrRmDByC1X tDo16n6yv5wvsWlW2OLTAd6fPf95U706pWA+nijWUHSee4iieqcEQ8OTa0qTDuN5xEG9ZpJWlTU+w Otu3rKxP5n/iXm2C7ZxUno4UoF2mXVb8GpEwHhrOd2qzRdSw2wJ8nRLL4gWVlR2WPlkhTXYWQ7URX Hj5QF7yQ==; Received: from [2001:8b0:10b:5:72ee:4f8a:770f:a7c2] (helo=u09cd745991455d.ant.amazon.com) by casper.infradead.org with esmtpsa (Exim 4.99.1 #2 (Red Hat Linux)) id 1whrXe-00000005Auy-21fu; Thu, 09 Jul 2026 16:24:02 +0000 Message-ID: Subject: Re: [PATCH v7 3/7] timekeeping: Account for clocksource tick quantisation via NTP From: David Woodhouse To: Marek Szyprowski , Richard Cochran , Wen Gu , Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , John Stultz , Thomas Gleixner , Stephen Boyd , Anna-Maria Behnsen , Frederic Weisbecker , Shuah Khan , Peter Zijlstra , Thomas =?ISO-8859-1?Q?Wei=DFschuh?= , Arnd Bergmann , Miroslav Lichvar , Julien Ridoux , Ryan Luu , linux-kernel@vger.kernel.org Date: Thu, 09 Jul 2026 17:24:01 +0100 In-Reply-To: <7f0cc3e3-a9aa-4583-bc94-1b80b82385ad@samsung.com> References: <20260621220051.1030462-1-dwmw2@infradead.org> <20260621220051.1030462-4-dwmw2@infradead.org> <7f0cc3e3-a9aa-4583-bc94-1b80b82385ad@samsung.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.60.3-0ubuntu1~ppa9~24.04 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-SRS-Rewrite: SMTP reverse-path rewritten from by casper.infradead.org. See http://www.infradead.org/rpr.html On Thu, 2026-07-09 at 18:21 +0200, Marek Szyprowski wrote: >=20 > Yes! Feel free to add: >=20 > Reported-by: Marek Szyprowski >=20 > Tested-by: Marek Szyprowski Thank you. I guess I could throw a Signed-off-by: David Woodhouse in too, just in case (as I'm going to be away for the next week or so, starting about now as I hear footsteps approaching the study). Thomas, do you want an incremental patch or is it OK to fold the one- liner back into the offending original? > --- a/kernel/time/timekeeping.c > +++ b/kernel/time/timekeeping.c > @@ -352,7 +352,7 @@ static void tk_setup_internals(struct timekeeper *tk,= struct clocksource *clock) > tk->tkr_raw.cycle_last =3D tk->tkr_mono.cycle_last; >=20 > /* Do the ns -> cycle conversion first, using original mult */ > - interval =3D NTP_INTERVAL_LENGTH << clock->shift; > + interval =3D (u64)NTP_INTERVAL_LENGTH << clock->shift; > interval +=3D clock->mult/2; > do_div(interval, clock->mult); > if (interval =3D=3D 0)