From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 9CA2AA92E; Fri, 11 Jul 2025 06:18:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1752214726; cv=none; b=dSAUHUdFDfmSQj47zm1NpY/baxXMo730KdkppuEEhMzx2CLkyqUJ+ac9TtxTLRLdQzLTzX/8cGqq1suLY8e+4KKRBSx2atKe6iPkETf2ppoG8FISZ9AHeZdAX5Sp+AgbGpnfAUYdxptSPE//a7bKFK7FB6ygdsFqLglqGIExJwg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1752214726; c=relaxed/simple; bh=IhPBLsDyP0lJ1wB9QAcUuSmK9aEPSglH53xEhDaPnwI=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=sX4v787hOCHLDiYVSdQAY89ofApnGmtwfn3KnJRBQ8CqVwVaQPlwfJklWDAhiog5jvi53Hs1GxiiLsxgwpZdsu3WznXWwUy1Q5lVP2o5N3lqgIObcPVrO+OPxX6qUuzNrHFau1POw9FvazLUl844W+ey/KJ/07hHu6ToNa6XEKQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=rWynDrwZ; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="rWynDrwZ" Received: by smtp.kernel.org (Postfix) with ESMTPSA id B5055C4CEED; Fri, 11 Jul 2025 06:18:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1752214726; bh=IhPBLsDyP0lJ1wB9QAcUuSmK9aEPSglH53xEhDaPnwI=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=rWynDrwZCkV6WqQxyL1NAwNVuoxEPRKJgHsRaw39ob7pPObHtxNGbK6MM+HewkYtc u/5jdX8Z3fzTxcYdj+IuegRzsOsbwnSrhHxK7TgutVfmugR29w1L1GxxoyLoIg5U3Z Gx01h/MRTDvjDdb9Ibqm0D7f+tUADEf4OR8FQ3sOMgO8c6Uwvo+VdMYtJ8TPv4lMtD rJ82cKfQTjGqfUzb57F7yFfeWaI+xK1SP8e71FSjfJCUoO9oyW4fMPHGf4QLH8W53l ngIOmDCiW3J2qpM7rFbvZU5gFVax9QcgLEmFQp8z4QV8hTS2FTCPiDB4RXSTa90lJB rxlScRKdS2qRw== From: Andreas Hindborg To: "Lyude Paul" Cc: , "FUJITA Tomonori" , "Boqun Feng" , "Frederic Weisbecker" , "Thomas Gleixner" , "Anna-Maria Behnsen" , "John Stultz" , "Stephen Boyd" , "Miguel Ojeda" , "Alex Gaynor" , "Gary Guo" , =?utf-8?Q?Bj?= =?utf-8?Q?=C3=B6rn?= Roy Baron , "Benno Lossin" , "Alice Ryhl" , "Trevor Gross" , "Danilo Krummrich" , Subject: Re: [PATCH] rust: time: Pass correct timer mode ID to hrtimer_start_range_ns In-Reply-To: <20250710225129.670051-1-lyude@redhat.com> (Lyude Paul's message of "Thu, 10 Jul 2025 18:51:13 -0400") References: <20250710225129.670051-1-lyude@redhat.com> User-Agent: mu4e 1.12.9; emacs 30.1 Date: Fri, 11 Jul 2025 08:18:37 +0200 Message-ID: <87jz4fi72a.fsf@kernel.org> Precedence: bulk X-Mailing-List: rust-for-linux@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain "Lyude Paul" writes: > While rebasing rvkms I noticed that timers I was setting seemed to have > pretty random timer values that amounted slightly over 2x the time value I > set each time. After a lot of debugging, I finally managed to figure out > why: it seems that since we moved to Instant and Delta, we mistakenly > began passing the clocksource ID to hrtimer_start_range_ns, when we should > be passing the timer mode instead. Presumably, this works fine for simple > relative timers - but immediately breaks on other types of timers. > > So, fix this by passing the ID for the timer mode instead. > > Signed-off-by: Lyude Paul > Cc: FUJITA Tomonori > Fixes: fcc1dd8c8656 ("rust: time: Make HasHrTimer generic over HrTimerMode") Wow, thanks! Miguel, can you take this through rust-fixes? Acked-by: Andreas Hindborg Best regards, Andreas Hindborg