Received: by 2002:a05:6a10:a841:0:0:0:0 with SMTP id d1csp1883637pxy; Thu, 29 Apr 2021 17:26:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwXVhxULHoniQ6/CBW7KhvcFIqTHu4M0bb65KU4NXYIFQiL0j+VCYTOPg07ZM100//EZynd X-Received: by 2002:a17:902:da8c:b029:ec:f02d:fcce with SMTP id j12-20020a170902da8cb02900ecf02dfccemr2467565plx.0.1619742397227; Thu, 29 Apr 2021 17:26:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619742397; cv=none; d=google.com; s=arc-20160816; b=qVi2FolJm+T0AXlJmmUNMOBw5D2Yj+QAo6YsPC/hAQhh0yt72NvFNkSaSeLXGUjrzd sV5CzD8lKjF+hyCm+5V/DqjgkWwinHPYMqugabarn17twPf0g6JTJRjHCt5kpDG5j9eV Wx6HFMVEeghfKxtbd3rTkxdj5l4pzLgDQ4aG0Zyv5pV54DOn2BMtsl4l8vxWoPi7P1Cz qdXS6lGU9zLA2afjN7R96OCl/jtH6KQHn0OJmxjciBor93tdPMWwy6YyBj/VciakNNuW 48wKfIbI1kXgZ219wzW227VcCtB+FD0t3+f7V18aUrmoDwJhzd6mDnPKwiKvHNh6m8sU IsJQ== 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:reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=YwDrurHRMkYBn2c9ldCnoeNl9+IhjOxEajRud3GjZlE=; b=ZBkWVZ64iaEcDkvqpGon1tNL8DnF/OaukI7FSB2uoV0KqrWwMepsZ6w7hcP7HRGfyJ kT43wUdZsghrUjVIMFzhiF3cwGGA50JgQIEOOnyU+O0D5asLydOynrsV5tEYdFZv/e1c cvo62SkuDrfgzhzw4vy05BgF8XDkFedrD5lxbF4pqxCIGz+QnqHMJ4IfTQjZDJNSMcZe x7P/fKX7EBLQ6+xj2P7f92hU9LUI4AUmO5cE6T1xcMJ55hvVwBU18T55+WaERI7S+2Z0 1HPtCdI0uFccHgzY7/8FfQNBQ5SBRa3q4g9iIjKYbIoRaI7rG3TrWMWmVm0yS92mj3Us ZpYA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="nSAS/DXB"; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k14si1432423pgc.557.2021.04.29.17.26.18; Thu, 29 Apr 2021 17:26:37 -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=@kernel.org header.s=k20201202 header.b="nSAS/DXB"; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229582AbhD3AZr (ORCPT + 99 others); Thu, 29 Apr 2021 20:25:47 -0400 Received: from mail.kernel.org ([198.145.29.99]:33624 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229519AbhD3AZr (ORCPT ); Thu, 29 Apr 2021 20:25:47 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id CF8A861433; Fri, 30 Apr 2021 00:24:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1619742299; bh=En+FczNIwvLyCaIjOro7KVVQ1zy4lAiRsirNKCBYG2s=; h=Date:From:To:Cc:Subject:Reply-To:References:In-Reply-To:From; b=nSAS/DXBQ9SUXI9ju8j9Ny2q3Usx+T2UZ5jlssLAkRqw/7NAqKLKT8sry0fuEZSc3 SB8yFGOjsqqA24JChpSiCGnuS7qYS6jGVQp22bpkzr3TPkK9y04VrEZyAvlqlAWgRo gsflzwRBlwV7KwDAlvt9rsnGaxtlkugeIisRJagP/XYfbkqdgVmlprfZL+3h0KwMBq DJ53BUiN2oIHJQ33qsvU7mM9GBgqOAxVBQR1b31Tk6vSoDP3fe44brYLP5eswqf3rj dCRp0vJ8J2qOf1zVRrv/OAI9N7x5+/6oeNEmQeodNbypc7hf7VMOZhGuAz0zKtjRAa nKR6eAAqz8b5A== Received: by paulmck-ThinkPad-P17-Gen-1.home (Postfix, from userid 1000) id 759335C051D; Thu, 29 Apr 2021 17:24:59 -0700 (PDT) Date: Thu, 29 Apr 2021 17:24:59 -0700 From: "Paul E. McKenney" To: Andi Kleen Cc: Thomas Gleixner , Feng Tang , kernel test robot , 0day robot , John Stultz , Stephen Boyd , Jonathan Corbet , Mark Rutland , Marc Zyngier , Xing Zhengjun , LKML , lkp@lists.01.org, kernel-team@fb.com, neeraju@codeaurora.org, zhengjun.xing@intel.com, x86@kernel.org, Paolo Bonzini Subject: Re: [clocksource] 8c30ace35d: WARNING:at_kernel/time/clocksource.c:#clocksource_watchdog Message-ID: <20210430002459.GB975577@paulmck-ThinkPad-P17-Gen-1> Reply-To: paulmck@kernel.org References: <87y2d3mo2q.ffs@nanos.tec.linutronix.de> <87a6pimt1f.ffs@nanos.tec.linutronix.de> <20210428183118.GR975577@paulmck-ThinkPad-P17-Gen-1> <878s517axu.ffs@nanos.tec.linutronix.de> <20210429142641.GU975577@paulmck-ThinkPad-P17-Gen-1> <87lf91f177.ffs@nanos.tec.linutronix.de> <20210429230411.GK4032392@tassilo.jf.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210429230411.GK4032392@tassilo.jf.intel.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Apr 29, 2021 at 04:04:11PM -0700, Andi Kleen wrote: > > > The idea is to leave the watchdog code in kernel/time/clocksource.c, > > > but to move the fault injection into kernel/time/clocksourcefault.c or > > > some such. In this new file, new clocksource structures are created that > > > use some existing timebase/clocksource under the covers. These then > > > inject delays based on module parameters (one senstive to CPU number, > > > the other unconditional). They register these clocksources using the > > > normal interfaces, and verify that they are eventually marked unstable > > > when the fault-injection parameters warrant it. This is combined with > > > the usual checking of the console log. > > > > > > Or am I missing your point? > > > > That's what I meant. > > I still think all this stuff should be in the fault injection framework, > like other fault injections, to have a consistent discoverable interface. > > I actually checked now and the standard fault injection supports boot arguments, > so needing it at boot time shouldn't be a barrier. Per Thomas's feedback, I am in the midst of converting this to a unit test implemented as a kernel module, at which point the only fault injection will be in the unit test. At the moment, the code just registers, reads, unregisters, and verifies that the bogus unit-test clocksources act normally. Fault injection is next on the list for the fine-grained clocksource. Which, as Thomas noted, is quite a bit simpler, as I just need to force a delay until the clocksource gets marked unstable with no need for fancy counting. Thanx, Paul