Received: by 2002:a05:6a10:a841:0:0:0:0 with SMTP id d1csp3306812pxy; Sun, 25 Apr 2021 21:09:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwthHjihGIyYlHYeFtmgUWrsjiNqh6tWvtPJQogIta3dQ1aUg+4nPb89W/FMx7Da1O6bsqN X-Received: by 2002:a17:906:8407:: with SMTP id n7mr16011621ejx.264.1619410141188; Sun, 25 Apr 2021 21:09:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619410141; cv=none; d=google.com; s=arc-20160816; b=vmrnSld2YaGYJfTLtHkEQ9qU5e5W+5uqI/8hWpGXwfnJj7vFzekBXCRarWGK103Cxj YjoOgI7yTGLxHJnALqE//LBKdUmK8NmyxK+tF99pVPyN1IHYfTUMOkFHizMEYQI/+sjk r8iKuxZhxd0gyudBS0oPBLdTX3cS5xA2jvZy0S/IOWj3SsWJNiii+yzkoBFZgKy0wgqZ 6YHgKnWDOE6qKdnePURE7bmzm9Aju0UVtfgmD32lPEQyUkodrFdc/zlrKKbh9hcBcI6M 9PkJ5h3IfYmrof/MA4jvpZP7s9ahsIHl4r8ElwIydPHKbrgxMbAMgJl1/RbSYSRKDEBl +uNw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:ironport-sdr :ironport-sdr; bh=Sf5XmcI16cO9333A0gRzBL5HCWfPYD6HB67FlRtiYaM=; b=f5sVsFODLxyIIJWXRIbmuX1OtWcs9+1JAJMqyFUGG9JODt9LKPAqb0gC3nBXFC+Wk7 cx3SaLf94MLKzuHzqn8ZJpWKGeu9wi+OCJs3K53kM/+CHHJ997v5cN8ipNk5n7NFhmzR rqtPQA5IGmNHVPLm/NtAVkZxZIG/jdHX03++SWtCE4du2xXQIHuV0+UImX9Sdga2R3Ea /rYTUPewOw/MFoUmCZnU0eda5RaYHeFsp7X6SAA6N10fTiDLCoMQ6afWE+IIJsPgTipH bSh+0vFW4GlDQegdZydaIeUxBQ3UEBfUcV9MqyLzHw2+4O4mdBoyP7DP7/psb7aRtIT/ Cnuw== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id cq21si12315827ejc.542.2021.04.25.21.08.38; Sun, 25 Apr 2021 21:09:01 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231530AbhDZEIU (ORCPT + 99 others); Mon, 26 Apr 2021 00:08:20 -0400 Received: from mga04.intel.com ([192.55.52.120]:42951 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229469AbhDZEIT (ORCPT ); Mon, 26 Apr 2021 00:08:19 -0400 IronPort-SDR: FVURFWsILss3bDaCFGzMwCsrY5Hl7qbhZPy0qXk3Q9I8g5pYGzcu08Ux+UNbUNZg1sFKXklu7b GIe4Q3F4CIZg== X-IronPort-AV: E=McAfee;i="6200,9189,9965"; a="194159729" X-IronPort-AV: E=Sophos;i="5.82,251,1613462400"; d="scan'208";a="194159729" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Apr 2021 21:07:37 -0700 IronPort-SDR: dqyzByXavGFwoGvnU4/sBrLM6HqaZ1b7JjQnstiAUTMz5nM3KbDRaGp8dLrMxJ1GjDKrQ5GnRW YVdTllLWTrHA== X-IronPort-AV: E=Sophos;i="5.82,251,1613462400"; d="scan'208";a="429191228" Received: from tassilo.jf.intel.com ([10.54.74.11]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Apr 2021 21:07:37 -0700 Date: Sun, 25 Apr 2021 21:07:36 -0700 From: Andi Kleen To: "Paul E. McKenney" Cc: tglx@linutronix.de, linux-kernel@vger.kernel.org, john.stultz@linaro.org, sboyd@kernel.org, corbet@lwn.net, Mark.Rutland@arm.com, maz@kernel.org, kernel-team@fb.com, neeraju@codeaurora.org, feng.tang@intel.com, zhengjun.xing@intel.com, Chris Mason Subject: Re: [PATCH v10 clocksource 1/7] clocksource: Provide module parameters to inject delays in watchdog Message-ID: <20210426040736.GS1401198@tassilo.jf.intel.com> References: <20210425224540.GA1312438@paulmck-ThinkPad-P17-Gen-1> <20210425224709.1312655-1-paulmck@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210425224709.1312655-1-paulmck@kernel.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > occur between the reads of the two clocks. Yes, interrupts are disabled > across those two reads, but there are no shortage of things that can > delay interrupts-disabled regions of code ranging from SMI handlers to > vCPU preemption. It would be good to have some indication as to why I assume vCPU preemption here refers to preempt RT? I didn't think a standard kernel could preempt when interrupt are disabled. > > + clocksource.inject_delay_period= [KNL] > + Number of calls to clocksource_watchdog() before > + delays are injected between reads from the > + two clocksources. Values of zero disable this > + delay injection. These delays can cause clocks > + to be marked unstable, so use of this parameter > + should therefore be avoided on production systems. > + Defaults to zero (disabled). > + > + clocksource.inject_delay_repeat= [KNL] > + Number of repeated clocksource_watchdog() delay > + injections per period. If inject_delay_period > + is five and inject_delay_repeat is three, there > + will be five delay-free reads followed by three > + delayed reads. I'm not sure command line options are the right way to do this. How about integrating it with the fault injection framework in debugfs. This way syzkaller etc. can play with it, which long term would give much better test coverage. This wouldn't allow boot time coverage, but presumably that's not too important here. -Andi