From: "Paul E. McKenney" <paulmck@kernel.org>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: dave@stgolabs.net, linuxppc-dev@lists.ozlabs.org,
josh@joshtriplett.org, linux-kernel@vger.kernel.org,
Zhouyi Zhou <zhouzhouyi@gmail.com>,
fweisbec@gmail.com, mingo@kernel.org
Subject: Re: [PATCH linux-next][RFC]torture: avoid offline tick_do_timer_cpu
Date: Mon, 28 Nov 2022 07:16:23 -0800 [thread overview]
Message-ID: <20221128151623.GI4001@paulmck-ThinkPad-P17-Gen-1> (raw)
In-Reply-To: <87sfi3wl8z.ffs@tglx>
On Mon, Nov 28, 2022 at 09:12:28AM +0100, Thomas Gleixner wrote:
> 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.
Perhaps there are other valid reasons, but they have not been showing up
in my torture-test runs for well over a decade. Not saying that they
don't happen, of course. But if they involved (say) cgroups, then my
test setup would not exercise them.
So are you looking to introduce spurious CPU-hotplug failures? If so,
these will also affect things like suspend/resume. Plus it will make
it much more difficult to detect real but intermittent CPU-hotplug bugs,
which is the motivation for special-casing the tick_nohz_full_timekeeper()
failures.
So we should discuss introduciton of any spurious failures that might
be under consideration.
Independently of that, the torture_onoff() functions can of course keep
some sort of histogram of the failure return codes. Or are there other
failure indications that should be captured?
> >> 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.
If you would like me to be testing this as part of my normal testing
regimen, I will need an in-kernel interface. Such an interface is of
course not needed for modprobe-style testing, in which case the script
doing the modprobe and rmmod can of course manipulate the sysfs files.
But I don't do that sort of testing very often. And when I do, it is
almost always with kernels configured for Meta's fleet, which almost
never do CPU-offline operations.
Thanx, Paul
> > 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
next prev parent reply other threads:[~2022-11-28 15:17 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-21 3:51 [PATCH linux-next][RFC]torture: avoid offline tick_do_timer_cpu Zhouyi Zhou
2022-11-22 1:37 ` Paul E. McKenney
2022-11-23 2:23 ` Zhouyi Zhou
2022-11-23 18:49 ` Paul E. McKenney
2022-11-24 2:35 ` Zhouyi Zhou
2022-11-23 22:25 ` Frederic Weisbecker
2022-11-23 23:00 ` Paul E. McKenney
2022-11-23 22:36 ` Frederic Weisbecker
2022-11-24 2:18 ` Zhouyi Zhou
2022-11-26 17:05 ` Thomas Gleixner
2022-11-27 2:45 ` Zhouyi Zhou
2022-11-27 12:40 ` Thomas Gleixner
2022-11-27 17:53 ` Paul E. McKenney
2022-11-28 3:00 ` Zhouyi Zhou
2022-11-28 8:12 ` Thomas Gleixner
2022-11-28 15:16 ` Paul E. McKenney [this message]
2023-07-06 7:09 ` Christophe Leroy
2023-07-06 8:13 ` Zhouyi Zhou
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20221128151623.GI4001@paulmck-ThinkPad-P17-Gen-1 \
--to=paulmck@kernel.org \
--cc=dave@stgolabs.net \
--cc=fweisbec@gmail.com \
--cc=josh@joshtriplett.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mingo@kernel.org \
--cc=tglx@linutronix.de \
--cc=zhouzhouyi@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox