Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp14442807rwb; Mon, 28 Nov 2022 00:35:38 -0800 (PST) X-Google-Smtp-Source: AA0mqf4URfgZVlAwdoOP3rSnNsheedCg+EiuUoWJxFKV+RD56wGyuisd43ZDpt9roB1icMpkUzja X-Received: by 2002:a17:90a:5d05:b0:219:57e:7790 with SMTP id s5-20020a17090a5d0500b00219057e7790mr17914919pji.3.1669624538360; Mon, 28 Nov 2022 00:35:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669624538; cv=none; d=google.com; s=arc-20160816; b=ZnwtlWPa1JEHksW7XZi85Q0D3ygyAHv6h0JzWaGHc7P4j8RmKAzUGY3TNkXM6wHVVb BfOzFpw2S1HWtNyllPdFtwT3IDLuzTYPNCyo0i+S0Sr0KDiQF65ADIYV8SwUZZV/7pmn T5Ini/diBfJyYZHTaasR2TRYOwcR9PBbPzy5Q4XWJ+YgXwGMWgIkPw0PP78t8VGVIu5H oqvhIUj9d8XLHBuBUISO7Jm/taU7YFbMrGcJgj9a2sbWP8L3A0AlSace0ITlvP2D5E3/ q3c41JvoGjTdKkbmP4uFmm/HEKGYCF8pXIkpCe8a7BMpY31B8YMpiKFlVZgYer0yOyNV qZow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :in-reply-to:subject:cc:to:dkim-signature:dkim-signature:from; bh=VptkHmPTPSs5eOtCUMB4/TKM/fssvk4H/apqtf0JHkw=; b=g3545kDPWPWhYDc7s1OclxjXjqrRL7zSzctd2Yd8cAqdky/owviU+ugpmEbe3iKWq3 e52d2Uc1Dt1fg72dr6k2FoMyX3iEfXyJ7sVhv2EmG+iJRtgEgCUOm8CXvmhvdMea2ssw mM9EDoEpEeefxai2HbLEVHnJOKcFrF7D4NNd+O1LjJ4WrTof3rYX5dcJBgpVfo1b5PCT 87Xi6k/1LmN+KCz3O15W3NnkK81NLsg6lQ2U1ju8Q59N86aLSKuZ0vHetq1id7Dl0S7y bFyEsGXMo77PqGqmzkX9EflrqrTR6MpM/GpqEvmDitty3xtL2FWe7KrN4NCxCRt5Hzzi Ph3w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=RVM1J6xm; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=N+FP099L; 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=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 79-20020a630352000000b00476f1906152si10787561pgd.53.2022.11.28.00.35.27; Mon, 28 Nov 2022 00:35:38 -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=@linutronix.de header.s=2020 header.b=RVM1J6xm; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=N+FP099L; 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=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229773AbiK1IMg (ORCPT + 84 others); Mon, 28 Nov 2022 03:12:36 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59518 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229958AbiK1IMd (ORCPT ); Mon, 28 Nov 2022 03:12:33 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D0085C5E for ; Mon, 28 Nov 2022 00:12:31 -0800 (PST) From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1669623148; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=VptkHmPTPSs5eOtCUMB4/TKM/fssvk4H/apqtf0JHkw=; b=RVM1J6xmynemcQ48SmviPVnGKjkS+iQ7y+Dybo1n8DoWIBaaWEuXyAytD5l2OzjuGo+XFS Vk7ZKnYbH9kZZHEqug/eGckC2Pv+UOu8Nc49FWtne4+UPkyRZFdp5R50cRKgl5Yje2cxQo jAFdjHPp2hCdTAwi0J07qx20DkIEXxjb2mxvrN8i+p33hWoydbH9RsGFmRn8K7id0rHBBe LZbAIf2A/fEmq1cQEdvprJhMCpT2iyaxrvhrj2HHZg32ZEt0Di+ZMNxPiznaaJMaopGPIM 7VoGy40TdxuFU0Tj0dEQKOTf1dvvoc9WqzkxraB5SxTENJJk8X3lsAcRA8L7sw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1669623148; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=VptkHmPTPSs5eOtCUMB4/TKM/fssvk4H/apqtf0JHkw=; b=N+FP099LREZdAsl3iwZTUkFtZExrnpVx38wkGZq8p/XNiiqKi2AVZkLug7YXt+xE9Tn1yG OP1gD3qu12stZLBw== To: paulmck@kernel.org 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 In-Reply-To: <20221127175317.GF4001@paulmck-ThinkPad-P17-Gen-1> References: <20221121035140.118651-1-zhouzhouyi@gmail.com> <87y1rxwsse.ffs@tglx> <87v8n0woxv.ffs@tglx> <20221127175317.GF4001@paulmck-ThinkPad-P17-Gen-1> Date: Mon, 28 Nov 2022 09:12:28 +0100 Message-ID: <87sfi3wl8z.ffs@tglx> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,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 09:53, Paul E. McKenney wrote: > On Sun, Nov 27, 2022 at 01:40:28PM +0100, Thomas Gleixner wrote: >> 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(). Why special casing this? There are other valid reasons why offlining can fail. So we special case timekeeper today and then next week we special case something else just because. That does not make sense. If it fails there is a reason and you can log it. The important part is that the system is functional and stable after the fail and the rollback. >> 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. There is already an interface which is exposed to sysfs which allows you to enforce a "fail" at a defined hotplug state. > That would better test the CPU-hotplug common code's ability to deal > with failures. Correct. > Or did you have something else/additional in mind? No. Thanks, tglx