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=-17.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 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 1D179C433DB for ; Wed, 3 Feb 2021 01:41:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C558E64F67 for ; Wed, 3 Feb 2021 01:41:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231156AbhBCBlY (ORCPT ); Tue, 2 Feb 2021 20:41:24 -0500 Received: from mail.kernel.org ([198.145.29.99]:37412 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229621AbhBCBlW (ORCPT ); Tue, 2 Feb 2021 20:41:22 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 02BE164F67; Wed, 3 Feb 2021 01:40:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1612316441; bh=cF1nSFMZ2Ahm9ekU3rWQ9EaZesNqYo23zQObZu0QJWE=; h=Date:From:To:Cc:Subject:Reply-To:References:In-Reply-To:From; b=GSC5chb9K/PDanYlE4EYEEgChrFoGewv3BiZ0okTaTpXesEW5cEeEy7FdOP2ju67t s9tUc0S/Dx8uHQANzqw8uAMhrjvopuibgqAcUF7zwrdqoHqO8+jPfLjdoBzZ5iYNTp ZppfrA5X4lZ20jWegWfZ9uk0MVVJM8uRIhjgvEoHsOuIFU/edHYzdlGBqPQRkPpgec 8SanajP84B7CfEl37KpmPHW40+wYV/qnKp/jgz3HybCOiJ9h78kftHQKP/kzdDeNe9 idsTGf9iQrJEyZhEX9bT14iRNKvIaF1tFujYQymJNWA2rOC+osIRwKtLVwJxm+a0X3 Whf7bZM6hYkKQ== Received: by paulmck-ThinkPad-P72.home (Postfix, from userid 1000) id B1C6C3522865; Tue, 2 Feb 2021 17:40:40 -0800 (PST) Date: Tue, 2 Feb 2021 17:40:40 -0800 From: "Paul E. McKenney" To: Randy Dunlap Cc: linux-kernel@vger.kernel.org, kernel-team@fb.com, john.stultz@linaro.org, tglx@linutronix.de, sboyd@kernel.org, corbet@lwn.net, Mark.Rutland@arm.com, maz@kernel.org, ak@linux.intel.com, clm@fb.com Subject: Re: [PATCH clocksource 4/5] clocksource: Provide a module parameter to fuzz per-CPU clock checking Message-ID: <20210203014040.GJ2743@paulmck-ThinkPad-P72> Reply-To: paulmck@kernel.org References: <20210202170437.GA23593@paulmck-ThinkPad-P72> <20210202170635.24839-4-paulmck@kernel.org> <5badf6e2-4600-4fe9-6b45-d0de94ad718b@infradead.org> <20210203005020.GI2743@paulmck-ThinkPad-P72> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Feb 02, 2021 at 05:31:55PM -0800, Randy Dunlap wrote: > On 2/2/21 4:50 PM, Paul E. McKenney wrote: > > On Tue, Feb 02, 2021 at 11:51:02AM -0800, Randy Dunlap wrote: > >> On 2/2/21 9:06 AM, paulmck@kernel.org wrote: > >>> From: "Paul E. McKenney" > >>> > >>> Code that checks for clock desynchronization must itself be tested, so > >>> this commit creates a new clocksource.inject_delay_shift_percpu= kernel > >>> boot parameter that adds or subtracts a large value from the check read, > >>> using the specified bit of the CPU ID to determine whether to add or > >>> to subtract. > >>> > >>> Cc: John Stultz > >>> Cc: Thomas Gleixner > >>> Cc: Stephen Boyd > >>> Cc: Jonathan Corbet > >>> Cc: Mark Rutland > >>> Cc: Marc Zyngier > >>> Cc: Andi Kleen > >>> Reported-by: Chris Mason > >>> Signed-off-by: Paul E. McKenney > >>> --- > >>> Documentation/admin-guide/kernel-parameters.txt | 9 +++++++++ > >>> kernel/time/clocksource.c | 10 +++++++++- > >>> 2 files changed, 18 insertions(+), 1 deletion(-) > >>> > >>> diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt > >>> index 9965266..f561e94 100644 > >>> --- a/Documentation/admin-guide/kernel-parameters.txt > >>> +++ b/Documentation/admin-guide/kernel-parameters.txt > >>> @@ -593,6 +593,15 @@ > >>> times the value specified for inject_delay_freq > >>> of consecutive non-delays. > >>> > >>> + clocksource.inject_delay_shift_percpu= [KNL] > >>> + Shift count to obtain bit from CPU number to > >>> + determine whether to shift the time of the per-CPU > >>> + clock under test ahead or behind. For example, > >> > >> It's a good think that you give an example -- it helps a little bit. > >> That sentence above needs to be rewritten... > > > > That is a bit obscure, now that you mention it. > > > >>> + setting this to the value four will result in > >>> + alternating groups of 16 CPUs shifting ahead and > >>> + the rest of the CPUs shifting behind. The default > >>> + value of -1 disable this type of error injection. > >> > >> disables > > > > Good eyes! > > > > So how about like this? > > Much better, thanks. > > > clocksource.inject_delay_shift_percpu= [KNL] > > Clocksource delay injection partitions the CPUs > > into two sets, one whose clocks are moved ahead > > and the other whose clocks are moved behind. > > This kernel parameter selects the CPU-number > > bit that determines which of these two sets the > > corresponding CPU is placed into. For example, > > setting this parameter to the value four will > > I know that in "writing," "four" should be written out as you have it, > but IMO using "4" here would be much better. FWIW. As long as it is "four" and not "fore"! Updated as requested. ;-) Thanx, Paul > > result in the first set containing alternating > > groups of 16 CPUs whose clocks are moved ahead, > > while the second set will contain the rest of > > the CPUs, whose clocks are moved behind. > > > > The default value of -1 disables this type of > > error injection. > > > > Thanx, Paul > > > >>> + > >>> clocksource.max_read_retries= [KNL] > >>> Number of clocksource_watchdog() retries due to > >>> external delays before the clock will be marked > > > thanks! > -- > ~Randy >