<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/tools/testing/selftests/rcutorture, branch linux-5.4.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.4.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.4.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2019-08-01T21:30:22Z</updated>
<entry>
<title>rcutorture: Test TREE03 with the threadirqs kernel boot parameter</title>
<updated>2019-08-01T21:30:22Z</updated>
<author>
<name>Paul E. McKenney</name>
</author>
<published>2019-06-27T21:05:54Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f4e8352928587ef8772df3d269a328efa609daaa'/>
<id>urn:sha1:f4e8352928587ef8772df3d269a328efa609daaa</id>
<content type='text'>
Since commit 05f415715ce45 ("rcu: Speed up expedited GPs when interrupting
RCU reader") in v5.0 and through v5.1, booting with the threadirqs kernel
boot parameter caused self-deadlocks, which can be reproduced using the
following command on an 8-CPU system:

tools/testing/selftests/rcutorture/bin/kvm.sh --duration 5 --configs "TREE03" --bootargs "threadirqs"

This commit therefore adds the threadirqs kernel boot parameter to
the TREE03 rcutorture scenario in order to more quickly detect future
similar bugs.

Link: http://lkml.kernel.org/r/20190626135447.y24mvfuid5fifwjc@linutronix.de
Signed-off-by: Paul E. McKenney &lt;paulmck@linux.ibm.com&gt;
Cc: Sebastian Andrzej Siewior &lt;bigeasy@linutronix.de&gt;
Cc: Joel Fernandes &lt;joel@joelfernandes.org&gt;
</content>
</entry>
<entry>
<title>torture: Expand last_ts variable in kvm-test-1-run.sh</title>
<updated>2019-08-01T21:30:22Z</updated>
<author>
<name>Paul E. McKenney</name>
</author>
<published>2019-06-21T17:32:57Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2c667e5eae232f7f4a4fc30f58e51abdb0dc43c5'/>
<id>urn:sha1:2c667e5eae232f7f4a4fc30f58e51abdb0dc43c5</id>
<content type='text'>
The kvm-test-1-run.sh script says 'test -z "last_ts"' which always
evaluates to true (AKA zero) regardless of the value of the last_ts shell
variable.  This commit therefore inserts the needed dollar sign ("$").

Signed-off-by: Paul E. McKenney &lt;paulmck@linux.ibm.com&gt;
</content>
</entry>
<entry>
<title>torture: Suppress propagating trace_printk() warning</title>
<updated>2019-05-28T16:06:09Z</updated>
<author>
<name>Paul E. McKenney</name>
</author>
<published>2019-05-22T15:52:18Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=8997e6311ed6cb95be34409bc6b4a11c7a84ac35'/>
<id>urn:sha1:8997e6311ed6cb95be34409bc6b4a11c7a84ac35</id>
<content type='text'>
When trace_printk() is used, a message including "BUG" is printed to
the console, which fools the rcutorture scripting into believing that
the corresponding test scenario failed.  This commit therefore filters
out this particular instance of "BUG", thus avoiding the false-positive
test-failure report.

Signed-off-by: Paul E. McKenney &lt;paulmck@linux.ibm.com&gt;
</content>
</entry>
<entry>
<title>torture: Add --trust-make to suppress "make clean"</title>
<updated>2019-05-28T16:06:09Z</updated>
<author>
<name>Paul E. McKenney</name>
</author>
<published>2019-05-12T03:18:00Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b93c765fda30cadae6aafb9d32a30f9391dc0b41'/>
<id>urn:sha1:b93c765fda30cadae6aafb9d32a30f9391dc0b41</id>
<content type='text'>
The current rcutorture scripts unconditionally do "make clean", which is
a good way of getting the needed testing done despite any imperfections in
Makefile dependency tracking.  However, this can be a bit irritating when
repeatedly running a single scenario after small changes, for example,
when debugging a problem that affects only a single scenario.  This commit
therefore adds a --trust-make argument that suppresses the "make clean".

Even when using ccache, this speeds up kernel builds by up to almost an
order of magnitude on my laptop.

Reported-by: Peter Zijlstra &lt;peterz@infradead.org&gt;
Signed-off-by: Paul E. McKenney &lt;paulmck@linux.ibm.com&gt;
</content>
</entry>
<entry>
<title>torture: Make --cpus override idleness calculations</title>
<updated>2019-05-28T16:06:09Z</updated>
<author>
<name>Paul E. McKenney</name>
</author>
<published>2019-05-12T00:59:52Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=7225c0777271bb489ad6fb095aa10985ad138a81'/>
<id>urn:sha1:7225c0777271bb489ad6fb095aa10985ad138a81</id>
<content type='text'>
Currently, rcutorture will use relatively few CPUs to build the kernel
on a busy system, which is often as it should be.  However, if the user
has used the --cpus argument to dedicate a specified number of CPUs to
this torture test, it would be good if the kernel build also made use
of them.  This commit therefore changes the cpus2use.sh script to use
--cpus when specified and to do the idleness calculations otherwise.

Signed-off-by: Paul E. McKenney &lt;paulmck@linux.ibm.com&gt;
</content>
</entry>
<entry>
<title>torture: Run kernel build in source directory</title>
<updated>2019-05-28T16:06:09Z</updated>
<author>
<name>Paul E. McKenney</name>
</author>
<published>2019-05-11T04:31:52Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=6dc82595ef0839a45c26075612f304979b6c92c2'/>
<id>urn:sha1:6dc82595ef0839a45c26075612f304979b6c92c2</id>
<content type='text'>
For historical reasons, rcutorture places its build products in a
tools/testing/selftests/rcutorture/b1 directory using the O= kbuild
command-line argument.  However, doing this requires that the source
directory be pristine: Not just "make clean" pristine, but instead "make
mrproper" (or, equivalently, "make distclean") pristine.  Therefore,
rcutorture executes a "make mrproper" before each build.  Unfortunately,
"make mrproper" has the side effect of removing pretty much everything,
including tags files and cscope databases, which can be inconvenient
to people whose workflow centers around a single source tree.

This commit therefore makes rcutorture do the build directly in the
source directory, removing the need for "make mrproper".  This works
because all needed build products are moved to their proper place in the
"res" directory immediately after the build completes, so that multiple
rcutorture kernels can still run concurrently.

Reported-by: Peter Zijlstra &lt;peterz@infradead.org&gt;
Signed-off-by: Paul E. McKenney &lt;paulmck@linux.ibm.com&gt;
</content>
</entry>
<entry>
<title>torture: Add function graph-tracing cheat sheet</title>
<updated>2019-05-28T16:06:09Z</updated>
<author>
<name>Paul E. McKenney</name>
</author>
<published>2019-05-01T20:26:11Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=cd6cb7c8a509b1e785fa67e2eb6bd5003198ac39'/>
<id>urn:sha1:cd6cb7c8a509b1e785fa67e2eb6bd5003198ac39</id>
<content type='text'>
Signed-off-by: Paul E. McKenney &lt;paulmck@linux.ibm.com&gt;
</content>
</entry>
<entry>
<title>torture: Capture qemu output</title>
<updated>2019-05-28T16:06:09Z</updated>
<author>
<name>Paul E. McKenney</name>
</author>
<published>2019-04-24T11:39:10Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=7dedfd4335f7b795d12191d03626212ff71e52aa'/>
<id>urn:sha1:7dedfd4335f7b795d12191d03626212ff71e52aa</id>
<content type='text'>
Currently qemu output appears on standard output, but is inaccessible
later on.  This commit therefore captures this output and causes
kvm-recheck.sh to output this output if QEMU gave a non-zero non-137
exit code.  (And exit code of 137 indicates that QEMU was killed, in
which case we want to know about the hang rather than the fact that
QEMU was killed.)

Signed-off-by: Paul E. McKenney &lt;paulmck@linux.ibm.com&gt;
</content>
</entry>
<entry>
<title>rcutorture: Tweak kvm options</title>
<updated>2019-05-28T16:06:09Z</updated>
<author>
<name>Sebastian Andrzej Siewior</name>
</author>
<published>2019-04-24T07:34:46Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a6fda6dab93c2c06ef4b8cb4b9258df6674d2438'/>
<id>urn:sha1:a6fda6dab93c2c06ef4b8cb4b9258df6674d2438</id>
<content type='text'>
In one of my rcutorture tests the TSC clocksource got marked unstable
due to a large difference in the TSC value. I'm not sure if the guest
run for a long time with disabled interrupts or if the host was very
busy and didn't schedule the guest for some time.

I took a look on the qemu/KVM options and decided to update the options:

- Use kvm{32|64} as CPU. We could probably use `host' (like ARM does)
  for maximum available features but since we don't run any userland I'm
  not sure if it makes any difference.

- Drop the "noapic" option. There is no history why the APIC was disabled,
  I see no reason for it.  Once old qemu versions fade away, we can add
  "x2apic=on,tsc-deadline=on,hypervisor=on,tsc_adjust=on".

- Additional config options. It ensures that the kernel knowns that it
  runs as a kvm guest and can use virt devices like the kvm-clock as
  clocksource. The kvm-clock was the main motivation here.

- I didn't add a random HW device. It would make the random device ready
  earlier (not it doesn't complete the initialisation at all) but I
  doubt that there is any need for this.

Signed-off-by: Sebastian Andrzej Siewior &lt;bigeasy@linutronix.de&gt;
[ paulmck: The world is not quite ready for CONFIG_PARAVIRT_SPINLOCKS=y
  and x2apic, so they are omitted for the time being. ]
Signed-off-by: Paul E. McKenney &lt;paulmck@linux.ibm.com&gt;
</content>
</entry>
<entry>
<title>rcutorture: Add trivial RCU implementation</title>
<updated>2019-05-28T16:06:09Z</updated>
<author>
<name>Paul E. McKenney</name>
</author>
<published>2019-04-19T14:38:27Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c682db558e6eec10a711b0a6bcb8c35fd15f6a39'/>
<id>urn:sha1:c682db558e6eec10a711b0a6bcb8c35fd15f6a39</id>
<content type='text'>
I have been showing off a trivial RCU implementation for non-preemptive
environments for some time now:

	#define rcu_read_lock()
	#define rcu_read_unlock()
	#define rcu_dereference(p) READ_ONCE(p)
	#define rcu_assign_pointer(p, v) smp_store_release(&amp;(p), (v))
	void synchronize_rcu(void)
	{
	int cpu;
		for_each_online_cpu(cpu)
			sched_setaffinity(current-&gt;pid, cpumask_of(cpu));
	}

Trivial or not, as the old saying goes, "if it ain't tested, it don't
work!".  This commit therefore adds a "trivial" flavor to rcutorture
and a corresponding TRIVIAL test scenario.  This variant does not handle
CPU hotplug, which is unconditionally enabled on x86 for post-v5.1-rc3
kernels, which is why the TRIVIAL.boot says "rcutorture.onoff_interval=0".
This commit actually does handle CONFIG_PREEMPT=y kernels, but only
because it turns back the Linux-kernel clock in order to provide these
alternative definitions (or the moral equivalent thereof):

	#define rcu_read_lock() preempt_disable()
	#define rcu_read_unlock() preempt_enable()

In CONFIG_PREEMPT=n kernels without debugging, these are equivalent to
empty macros give or take a compiler barrier.  However, the have been
successfully tested with actual empty macros as well.

Signed-off-by: Paul E. McKenney &lt;paulmck@linux.ibm.com&gt;
[ paulmck: Fix symbol issue reported by kbuild test robot &lt;lkp@intel.com&gt;. ]
[ paulmck: Work around sched_setaffinity() issue noted by Andrea Parri. ]
[ paulmck: Add rcutorture.shuffle_interval=0 to TRIVIAL.boot to fix
  interaction with shuffler task noted by Peter Zijlstra. ]
Tested-by: Andrea Parri &lt;andrea.parri@amarulasolutions.com&gt;
</content>
</entry>
</feed>
