<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/kernel/torture.c, branch v5.19</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v5.19</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v5.19'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2022-02-02T01:24:39Z</updated>
<entry>
<title>torture: Wake up kthreads after storing task_struct pointer</title>
<updated>2022-02-02T01:24:39Z</updated>
<author>
<name>Paul E. McKenney</name>
<email>paulmck@kernel.org</email>
</author>
<published>2022-01-03T14:07:09Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=6b8646a9d37c6324cf994dbefb75f3eb20b109ab'/>
<id>urn:sha1:6b8646a9d37c6324cf994dbefb75f3eb20b109ab</id>
<content type='text'>
Currently, _torture_create_kthread() uses kthread_run() to create
torture-test kthreads, which means that the resulting task_struct
pointer is stored after the newly created kthread has been marked
runnable.  This in turn can cause spurious failure of checks for
code being run by a particular kthread.  This commit therefore changes
_torture_create_kthread() to use kthread_create(), then to do an explicit
wake_up_process() after the task_struct pointer has been stored.

Reported-by: Frederic Weisbecker &lt;frederic@kernel.org&gt;
Reviewed-by: Neeraj Upadhyay &lt;quic_neeraju@quicinc.com&gt;
Reviewed-by: Uladzislau Rezki (Sony) &lt;urezki@gmail.com&gt;
Reviewed-by: Frederic Weisbecker &lt;frederic@kernel.org&gt;
Signed-off-by: Paul E. McKenney &lt;paulmck@kernel.org&gt;
</content>
</entry>
<entry>
<title>torture: Distinguish kthread stopping and being asked to stop</title>
<updated>2022-02-02T01:24:38Z</updated>
<author>
<name>Paul E. McKenney</name>
<email>paulmck@kernel.org</email>
</author>
<published>2021-12-16T20:23:31Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=2b4a7f20f160e6440848c62a70ee5dc5237a2c8b'/>
<id>urn:sha1:2b4a7f20f160e6440848c62a70ee5dc5237a2c8b</id>
<content type='text'>
Right now, if a given kthread (call it "kthread") realizes that it needs
to stop, "Stopping kthread" is written to the console.  When the cleanup
code decides that it is time to stop that kthread, "Stopping kthread
tasks" is written to the console.  These two events might happen in
either order, especially in the case of time-based torture-test shutdown.

But it is hard to distinguish these, especially for those unfamiliar with
the torture tests.  This commit therefore changes the first case from
"Stopping kthread" to "kthread is stopping" to make things more clear.

Signed-off-by: Paul E. McKenney &lt;paulmck@kernel.org&gt;
</content>
</entry>
<entry>
<title>locktorture,rcutorture,torture: Always log error message</title>
<updated>2021-12-08T00:36:17Z</updated>
<author>
<name>Li Zhijian</name>
<email>zhijianx.li@intel.com</email>
</author>
<published>2021-11-03T08:30:28Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=81faa4f6fba429334ff72bb5ba7696818509b5b5'/>
<id>urn:sha1:81faa4f6fba429334ff72bb5ba7696818509b5b5</id>
<content type='text'>
Unconditionally log messages corresponding to errors.

Acked-by: Davidlohr Bueso &lt;dbueso@suse.de&gt;
Signed-off-by: Li Zhijian &lt;zhijianx.li@intel.com&gt;
Signed-off-by: Paul E. McKenney &lt;paulmck@kernel.org&gt;
</content>
</entry>
<entry>
<title>torture: Replace deprecated CPU-hotplug functions.</title>
<updated>2021-08-10T17:48:07Z</updated>
<author>
<name>Sebastian Andrzej Siewior</name>
<email>bigeasy@linutronix.de</email>
</author>
<published>2021-08-03T14:16:18Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=ed4fa2442e87bf9143d608473df117589e4bfc70'/>
<id>urn:sha1:ed4fa2442e87bf9143d608473df117589e4bfc70</id>
<content type='text'>
The functions get_online_cpus() and put_online_cpus() have been
deprecated during the CPU hotplug rework. They map directly to
cpus_read_lock() and cpus_read_unlock().

Replace deprecated CPU-hotplug functions with the official version.
The behavior remains unchanged.

Cc: Davidlohr Bueso &lt;dave@stgolabs.net&gt;
Cc: "Paul E. McKenney" &lt;paulmck@kernel.org&gt;
Cc: Josh Triplett &lt;josh@joshtriplett.org&gt;
Signed-off-by: Sebastian Andrzej Siewior &lt;bigeasy@linutronix.de&gt;
Signed-off-by: Paul E. McKenney &lt;paulmck@kernel.org&gt;
</content>
</entry>
<entry>
<title>torture: Replace torture_init_begin string with %s</title>
<updated>2021-03-08T22:22:28Z</updated>
<author>
<name>Stephen Zhang</name>
<email>stephenzhangzsd@gmail.com</email>
</author>
<published>2021-01-23T08:34:01Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=4ac9de07b24f93a87ad38c497ad00fe2451203e7'/>
<id>urn:sha1:4ac9de07b24f93a87ad38c497ad00fe2451203e7</id>
<content type='text'>
This commit replaces a hard-coded "torture_init_begin" string in
a pr_alert() format with "%s" and __func__.

Signed-off-by: Stephen Zhang &lt;stephenzhangzsd@gmail.com&gt;
Signed-off-by: Paul E. McKenney &lt;paulmck@kernel.org&gt;
</content>
</entry>
<entry>
<title>torture: Maintain torture-specific set of CPUs-online books</title>
<updated>2021-01-07T01:17:22Z</updated>
<author>
<name>Paul E. McKenney</name>
<email>paulmck@kernel.org</email>
</author>
<published>2020-12-19T15:34:35Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=1afb95fee0342b8d9e05b0433e8e44a6dfd7c4a3'/>
<id>urn:sha1:1afb95fee0342b8d9e05b0433e8e44a6dfd7c4a3</id>
<content type='text'>
The TREE01 rcutorture scenario intentionally creates confusion as to the
number of available CPUs by specifying the "maxcpus=8 nr_cpus=43" kernel
boot parameters.  This can disable rcutorture's load shedding, which
currently uses num_online_cpus(), which would count the extra 35 CPUs.
However, the rcutorture guest OS will be provisioned with only 8 CPUs,
which means that rcutorture will present full load even when all but one
of the original 8 CPUs are offline.  This can result in spurious errors
due to extreme overloading of that single remaining CPU.

This commit therefore keeps a separate set of books on the number of
usable online CPUs, so that torture_num_online_cpus() is used for load
shedding instead of num_online_cpus().  Note that initial sizing must
use num_online_cpus() because torture_num_online_cpus() will return
NR_CPUS until shortly after torture_onoff_init() is invoked.

Reported-by: Frederic Weisbecker &lt;frederic@kernel.org&gt;
[ paulmck: Apply feedback from kernel test robot. ]
Signed-off-by: Paul E. McKenney &lt;paulmck@kernel.org&gt;
</content>
</entry>
<entry>
<title>torture: Clean up after torture-test CPU hotplugging</title>
<updated>2021-01-07T01:17:22Z</updated>
<author>
<name>Paul E. McKenney</name>
<email>paulmck@kernel.org</email>
</author>
<published>2020-12-19T15:05:58Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=0b962c8fe0e5c72a252b236814a6b6e9df799061'/>
<id>urn:sha1:0b962c8fe0e5c72a252b236814a6b6e9df799061</id>
<content type='text'>
This commit puts all CPUs back online at the end of a torture test,
and also unconditionally puts them online at the beginning of the test,
rather than just in the case of built-in tests.  This allows torture tests
to behave in a predictable manner, whether built-in or based on modules.

Signed-off-by: Paul E. McKenney &lt;paulmck@kernel.org&gt;
</content>
</entry>
<entry>
<title>torture: Throttle VERBOSE_TOROUT_*() output</title>
<updated>2021-01-07T01:17:21Z</updated>
<author>
<name>Paul E. McKenney</name>
<email>paulmck@kernel.org</email>
</author>
<published>2020-11-25T21:00:04Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=8a67a20bf257ca378d6e5588fbe4382966395ac8'/>
<id>urn:sha1:8a67a20bf257ca378d6e5588fbe4382966395ac8</id>
<content type='text'>
This commit adds kernel boot parameters torture.verbose_sleep_frequency
and torture.verbose_sleep_duration, which allow VERBOSE_TOROUT_*() output
to be throttled with periodic sleeps on large systems.

Signed-off-by: Paul E. McKenney &lt;paulmck@kernel.org&gt;
</content>
</entry>
<entry>
<title>torture: Make stutter use torture_hrtimeout_*() functions</title>
<updated>2021-01-07T01:17:20Z</updated>
<author>
<name>Paul E. McKenney</name>
<email>paulmck@kernel.org</email>
</author>
<published>2020-11-17T20:17:42Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=ed24affa71f7abf7d81698a99b6c2623491a35b0'/>
<id>urn:sha1:ed24affa71f7abf7d81698a99b6c2623491a35b0</id>
<content type='text'>
This commit saves a few lines of code by making the stutter_wait()
and torture_stutter() functions use torture_hrtimeout_jiffies() and
torture_hrtimeout_us().

Signed-off-by: Paul E. McKenney &lt;paulmck@kernel.org&gt;
</content>
</entry>
<entry>
<title>torture: Add fuzzed hrtimer-based sleep functions</title>
<updated>2021-01-07T01:17:19Z</updated>
<author>
<name>Paul E. McKenney</name>
<email>paulmck@kernel.org</email>
</author>
<published>2020-11-17T19:30:18Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=ae19aaafae95a5487469433e9cae4c208f8d15cd'/>
<id>urn:sha1:ae19aaafae95a5487469433e9cae4c208f8d15cd</id>
<content type='text'>
This commit adds torture_hrtimeout_ns(), torture_hrtimeout_us(),
torture_hrtimeout_ms(), torture_hrtimeout_jiffies(), and
torture_hrtimeout_s(), each of which uses hrtimers to block for a fuzzed
time interval.  These functions are intended to be used by the various
torture tests to decouple wakeups from the timer wheel, thus providing
more opportunity for Murphy to insert destructive race conditions.

Signed-off-by: Paul E. McKenney &lt;paulmck@kernel.org&gt;
</content>
</entry>
</feed>
