All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Paul E. McKenney" <paulmck@kernel.org>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: Zhouyi Zhou <zhouzhouyi@gmail.com>,
	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
Date: Sun, 27 Nov 2022 09:53:17 -0800	[thread overview]
Message-ID: <20221127175317.GF4001@paulmck-ThinkPad-P17-Gen-1> (raw)
In-Reply-To: <87v8n0woxv.ffs@tglx>

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

WARNING: multiple messages have this Message-ID (diff)
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: Sun, 27 Nov 2022 09:53:17 -0800	[thread overview]
Message-ID: <20221127175317.GF4001@paulmck-ThinkPad-P17-Gen-1> (raw)
In-Reply-To: <87v8n0woxv.ffs@tglx>

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

  reply	other threads:[~2022-11-27 17:53 UTC|newest]

Thread overview: 33+ 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-22  1:37   ` Paul E. McKenney
2022-11-23  2:23   ` Zhouyi Zhou
2022-11-23  2:23     ` Zhouyi Zhou
2022-11-23 18:49     ` Paul E. McKenney
2022-11-23 18:49       ` Paul E. McKenney
2022-11-24  2:35       ` Zhouyi Zhou
2022-11-24  2:35         ` Zhouyi Zhou
2022-11-23 22:25   ` Frederic Weisbecker
2022-11-23 22:25     ` Frederic Weisbecker
2022-11-23 23:00     ` Paul E. McKenney
2022-11-23 23:00       ` Paul E. McKenney
2022-11-23 22:36 ` Frederic Weisbecker
2022-11-23 22:36   ` Frederic Weisbecker
2022-11-24  2:18   ` Zhouyi Zhou
2022-11-24  2:18     ` Zhouyi Zhou
2022-11-26 17:05 ` Thomas Gleixner
2022-11-27  2:45   ` Zhouyi Zhou
2022-11-27  2:45     ` Zhouyi Zhou
2022-11-27 12:40     ` Thomas Gleixner
2022-11-27 12:40       ` Thomas Gleixner
2022-11-27 17:53       ` Paul E. McKenney [this message]
2022-11-27 17:53         ` Paul E. McKenney
2022-11-28  3:00         ` Zhouyi Zhou
2022-11-28  3:00           ` Zhouyi Zhou
2022-11-28  8:12         ` Thomas Gleixner
2022-11-28  8:12           ` Thomas Gleixner
2022-11-28 15:16           ` Paul E. McKenney
2022-11-28 15:16             ` Paul E. McKenney
2023-07-06  7:09 ` Christophe Leroy
2023-07-06  8:13   ` Zhouyi Zhou
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=20221127175317.GF4001@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=mpe@ellerman.id.au \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.