Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp13739374rwb; Sun, 27 Nov 2022 10:24:26 -0800 (PST) X-Google-Smtp-Source: AA0mqf5z0RhyUsS9iAl1+ybJ6bRkBNvz1Km+YHqirT8B1cE95+sGSlAI3ayoHWcLC2Wevc8aPdqN X-Received: by 2002:a05:6a00:1a4c:b0:574:97d4:c10f with SMTP id h12-20020a056a001a4c00b0057497d4c10fmr16534374pfv.81.1669573466295; Sun, 27 Nov 2022 10:24:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669573466; cv=none; d=google.com; s=arc-20160816; b=V3SquleZdX6ejm7n7ZzXKi07+qnV+00LBk8PrHlksMmTHMwnqEhmrds9swrNG3gYmr oZDTz04qsrHFfp45FRXfHRHOd8qPJbedEMYNT9qgitzX8S43UYc/XNKRYFF+YGE4ZK6r TfT74EFDYOVEQ1rIZhhnllELiPPXAyeMB3/p9KARFGiQ6h4qCPANt+RA4BofIN5S2hUu faKE/KePMspVtwS5lu9IDWhcLFaU6jr1gkbsT+ZTkbI0wDF0LsUAsY+wZMnDoUx4zkvu hwRHNMSZKfI4OYz4QnDc7fR5yRFu49v+01rEG/TZP+JCjfSAEjmRkfeSDqWD/JWUM9IP 95lQ== 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=CuZH5kwVteSbQ1iuLITJQOwHjFvR132L7J6S3GI8GXk=; b=GlrbMom3fSjzCqw0DDaZkyC5yENTvQsnunBxhm5tT+GV3fLQ5QaCsQFNuy5oWAdrYE ce/Q213m4aLnbdtJq10bQVxwdnf6WezR0KLZ2cML9qm9AQktn1LdSTupsHBrQN5BRoAF bff9nU1SSRod+1wacoQf4U7MSg7heLydErC8S7ysbbB5jMkG4DS0KIzO4xd4VPbPCH3R Sc8kgje+rKqi+/ecty+6et+bDqDjk/NYqZOPPlG/AOfNZfMCit+DgM4Y9dvHtvDnyKAF N7cMO/rucrUmdC0Q2lrLXFSEDvUMJvqIhAihrxhJPFhzxKk/uo0Mkmm9DOSqXz/lVzxn 0mIQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=rTPtL2mt; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o20-20020a056a0015d400b005397c4ad9e1si10897696pfu.134.2022.11.27.10.24.15; Sun, 27 Nov 2022 10:24:26 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=rTPtL2mt; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S229550AbiK0RxV (ORCPT + 84 others); Sun, 27 Nov 2022 12:53:21 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58296 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229450AbiK0RxT (ORCPT ); Sun, 27 Nov 2022 12:53:19 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C0B77CD2 for ; Sun, 27 Nov 2022 09:53:18 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 5999F60E0B for ; Sun, 27 Nov 2022 17:53:18 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B73F0C433C1; Sun, 27 Nov 2022 17:53:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1669571597; bh=cR4oVWEUk67TAnV7gA291l8sois74FLMYSBwf6j79kg=; h=Date:From:To:Cc:Subject:Reply-To:References:In-Reply-To:From; b=rTPtL2mt8FWmVx2GP8FAoATCIpkEzeWETxEmypyD2s5cVOjNNGDxffAIzVp+JJSPB kXga7F2X5leOvfu67vLAf22y9LWndAsNNtso1+hYnONzBoYwsbPea9x6HAYJhOqrbZ kQPhGkpCqyLtZcsQE1OMPX7i65c2RVrOHqdjDKQMjUD+TA21q8VcuykyyfPCHavjpE qwxiLu+LltpusRu+su7+zAmRVho0hshDG+lP3LSwlnMoBt6/dG/IUwEZBVsO8BZtOQ 9QBOozQ1iuvtJmf9oHp2ax8RE4QTE2Asb9XM3T3frPojd4+jTSxUSOv9AO8DfTuBGf tpIV1md3I+68A== Received: by paulmck-ThinkPad-P17-Gen-1.home (Postfix, from userid 1000) id 555555C09B0; Sun, 27 Nov 2022 09:53:17 -0800 (PST) Date: Sun, 27 Nov 2022 09:53:17 -0800 From: "Paul E. McKenney" To: Thomas Gleixner Cc: Zhouyi Zhou , fweisbec@gmail.com, mingo@kernel.org, dave@stgolabs.net, josh@joshtriplett.org, mpe@ellerman.id.au, linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH linux-next][RFC]torture: avoid offline tick_do_timer_cpu Message-ID: <20221127175317.GF4001@paulmck-ThinkPad-P17-Gen-1> Reply-To: paulmck@kernel.org References: <20221121035140.118651-1-zhouzhouyi@gmail.com> <87y1rxwsse.ffs@tglx> <87v8n0woxv.ffs@tglx> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87v8n0woxv.ffs@tglx> X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Nov 27, 2022 at 01:40:28PM +0100, Thomas Gleixner wrote: [ . . . ] > >> No. We are not exporting this just to make a bogus test case happy. > >> > >> Fix the torture code to handle -EBUSY correctly. > > I am going to do a study on this, for now, I do a grep in the kernel tree: > > find . -name "*.c"|xargs grep cpuhp_setup_state|wc -l > > The result of the grep command shows that there are 268 > > cpuhp_setup_state* cases. > > which may make our task more complicated. > > Why? The whole point of this torture thing is to stress the > infrastructure. Indeed. > There are quite some reasons why a CPU-hotplug or a hot-unplug operation > can fail, which is not a fatal problem, really. > > So if a CPU hotplug operation fails, then why can't the torture test > just move on and validate that the system still behaves correctly? > > That gives us more coverage than just testing the good case and giving > up when something unexpected happens. Agreed, with access to a function like the tick_nohz_full_timekeeper() suggested earlier in this email thread, then yes, it would make sense to try to offline the CPU anyway, then forgive the failure in cases where the CPU matches that indicated by tick_nohz_full_timekeeper(). > I even argue that the torture test should inject random failures into > the hotplug state machine to achieve extended code coverage. I could imagine torture_onoff() telling various CPU-hotplug notifiers to refuse the transition using some TBD interface. That would better test the CPU-hotplug common code's ability to deal with failures. Or did you have something else/additional in mind? Thanx, Paul