<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/kernel/rcu/refscale.c, branch v6.3</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=v6.3</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v6.3'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2023-01-05T20:09:42Z</updated>
<entry>
<title>refscale: Add tests using SLAB_TYPESAFE_BY_RCU</title>
<updated>2023-01-05T20:09:42Z</updated>
<author>
<name>Paul E. McKenney</name>
<email>paulmck@kernel.org</email>
</author>
<published>2022-11-08T16:18:06Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=a6889becb05394255c80b62103677e3b095726a9'/>
<id>urn:sha1:a6889becb05394255c80b62103677e3b095726a9</id>
<content type='text'>
This commit adds three read-side-only tests of three use cases featuring
SLAB_TYPESAFE_BY_RCU: One using per-object reference counting, one using
per-object locking, and one using per-object sequence locking.

[ paulmck: Apply feedback from kernel test robot. ]

Signed-off-by: Paul E. McKenney &lt;paulmck@kernel.org&gt;
</content>
</entry>
<entry>
<title>refscale: Provide for initialization failure</title>
<updated>2023-01-04T01:52:54Z</updated>
<author>
<name>Paul E. McKenney</name>
<email>paulmck@kernel.org</email>
</author>
<published>2022-11-07T04:58:15Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=3c6496c86e484be94cd8d69e604566dfeaa726a2'/>
<id>urn:sha1:3c6496c86e484be94cd8d69e604566dfeaa726a2</id>
<content type='text'>
Current tests all have init() functions that are guaranteed to succeed.
But upcoming tests will need to allocate memory, thus possibly failing.
This commit therefore handles init() function failure.

Signed-off-by: Paul E. McKenney &lt;paulmck@kernel.org&gt;
</content>
</entry>
<entry>
<title>refscale: Convert test_lock spinlock to raw_spinlock</title>
<updated>2022-06-21T22:57:04Z</updated>
<author>
<name>Zqiang</name>
<email>qiang1.zhang@intel.com</email>
</author>
<published>2022-06-12T02:02:25Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=7bf336fb8dac718febb7bf4fe79e1be0c5e4a631'/>
<id>urn:sha1:7bf336fb8dac718febb7bf4fe79e1be0c5e4a631</id>
<content type='text'>
In kernels built with CONFIG_PREEMPT_RT=y, spinlocks are replaced by
rt_mutex, which can sleep.  This means that acquiring a non-raw spinlock
in a critical section where preemption is disabled can trigger the
following BUG:

BUG: scheduling while atomic: ref_scale_reade/76/0x00000002
Preemption disabled at:
ref_lock_section+0x16/0x80
Call Trace:
&lt;TASK&gt;
dump_stack_lvl+0x5b/0x82
dump_stack+0x10/0x12
__schedule_bug.cold+0x9c/0xad
__schedule+0x839/0xc00
schedule_rtlock+0x22/0x40
rtlock_slowlock_locked+0x460/0x1350
rt_spin_lock+0x61/0xe0
ref_lock_section+0x29/0x80
rcu_scale_one_reader+0x52/0x60
ref_scale_reader+0x28d/0x490
kthread+0x128/0x150
ret_from_fork+0x22/0x30
&lt;/TASK&gt;

This commit therefore converts spinlock to raw_spinlock.

Signed-off-by: Zqiang &lt;qiang1.zhang@intel.com&gt;
Signed-off-by: Paul E. McKenney &lt;paulmck@kernel.org&gt;
</content>
</entry>
<entry>
<title>refscale: Allow refscale without RCU Tasks Rude/Trace</title>
<updated>2022-04-20T23:53:19Z</updated>
<author>
<name>Paul E. McKenney</name>
<email>paulmck@kernel.org</email>
</author>
<published>2022-03-25T22:21:07Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=dec86781a54f4a527386a0b86b22e99e2ac67a09'/>
<id>urn:sha1:dec86781a54f4a527386a0b86b22e99e2ac67a09</id>
<content type='text'>
Currently, a CONFIG_PREEMPT_NONE=y kernel substitutes normal RCU for
RCU Tasks Rude and RCU Tasks Trace.  Unless that kernel builds refscale,
whether built-in or as a module, in which case these RCU Tasks flavors are
(unnecessarily) built in.  This both increases kernel size and increases
the complexity of certain tracing operations.  This commit therefore
decouples the presence of refscale from the presence of RCU Tasks Rude
and RCU Tasks Trace.

Signed-off-by: Paul E. McKenney &lt;paulmck@kernel.org&gt;
</content>
</entry>
<entry>
<title>refscale: Allow refscale without RCU Tasks</title>
<updated>2022-04-20T23:53:19Z</updated>
<author>
<name>Paul E. McKenney</name>
<email>paulmck@kernel.org</email>
</author>
<published>2022-03-25T21:39:54Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=5f654af150fd5aeb9fff138c7cbd72cea016b863'/>
<id>urn:sha1:5f654af150fd5aeb9fff138c7cbd72cea016b863</id>
<content type='text'>
Currently, a CONFIG_PREEMPT_NONE=y kernel substitutes normal RCU for
RCU Tasks.  Unless that kernel builds refscale, whether built-in or as a
module, in which case RCU Tasks is (unnecessarily) built in.  This both
increases kernel size and increases the complexity of certain tracing
operations.  This commit therefore decouples the presence of refscale
from the presence of RCU Tasks.

Signed-off-by: Paul E. McKenney &lt;paulmck@kernel.org&gt;
</content>
</entry>
<entry>
<title>refscale: Add missing '\n' to flush message</title>
<updated>2021-12-08T00:36:12Z</updated>
<author>
<name>Li Zhijian</name>
<email>zhijianx.li@intel.com</email>
</author>
<published>2021-10-29T09:40:24Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f71f22b67d37c91a5c4320f6e821f64eb189627d'/>
<id>urn:sha1:f71f22b67d37c91a5c4320f6e821f64eb189627d</id>
<content type='text'>
Add '\n' to macros to flush message for each call.

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>refscale: Always log the error message</title>
<updated>2021-12-08T00:31:44Z</updated>
<author>
<name>Li Zhijian</name>
<email>lizhijian@cn.fujitsu.com</email>
</author>
<published>2021-10-25T03:26:58Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=4feeb9d5f82229bf39621be755bda81521539476'/>
<id>urn:sha1:4feeb9d5f82229bf39621be755bda81521539476</id>
<content type='text'>
An OOM is a serious error that should be logged even in non-verbose runs.
This commit therefore adds an unconditional SCALEOUT_ERRSTRING() macro
and uses it instead of VERBOSE_SCALEOUT_ERRSTRING() when reporting an OOM.

[ paulmck: Drop do-while from SCALEOUT_ERRSTRING() due to only single statement. ]

Signed-off-by: Li Zhijian &lt;lizhijian@cn.fujitsu.com&gt;
Signed-off-by: Paul E. McKenney &lt;paulmck@kernel.org&gt;
</content>
</entry>
<entry>
<title>refscale: Prevent buffer to pr_alert() being too long</title>
<updated>2021-12-01T01:29:50Z</updated>
<author>
<name>Li Zhijian</name>
<email>lizhijian@cn.fujitsu.com</email>
</author>
<published>2021-10-25T03:26:57Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=9880eb878c315b241002d43d7ff89df23713a51b'/>
<id>urn:sha1:9880eb878c315b241002d43d7ff89df23713a51b</id>
<content type='text'>
0Day/LKP observed that the refscale results fail to complete when larger
values of nrun (such as 300) are specified.  The problem is that printk()
can accept at most a 1024-byte buffer.  This commit therefore prints
the buffer whenever its length exceeds 800 bytes.

CC: Philip Li &lt;philip.li@intel.com&gt;
Reported-by: kernel test robot &lt;lkp@intel.com&gt;
Signed-off-by: Li Zhijian &lt;lizhijian@cn.fujitsu.com&gt;
Signed-off-by: Paul E. McKenney &lt;paulmck@kernel.org&gt;
</content>
</entry>
<entry>
<title>refscale: Simplify the errexit checkpoint</title>
<updated>2021-12-01T01:29:50Z</updated>
<author>
<name>Li Zhijian</name>
<email>lizhijian@cn.fujitsu.com</email>
</author>
<published>2021-10-25T03:26:56Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=c30c876312f66b0422a1d632b8c45b6416deeec0'/>
<id>urn:sha1:c30c876312f66b0422a1d632b8c45b6416deeec0</id>
<content type='text'>
There is only the one OOM error case in main_func(), so this commit
eliminates the errexit local variable in favor of a branch to cleanup
code.

Signed-off-by: Li Zhijian &lt;lizhijian@cn.fujitsu.com&gt;
Signed-off-by: Paul E. McKenney &lt;paulmck@kernel.org&gt;
</content>
</entry>
<entry>
<title>refscale: Warn on individual ref_scale_init() error conditions</title>
<updated>2021-09-13T23:36:16Z</updated>
<author>
<name>Paul E. McKenney</name>
<email>paulmck@kernel.org</email>
</author>
<published>2021-08-05T22:57:12Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=ed60ad733aa49b70720c9d8dded1b18374ec5022'/>
<id>urn:sha1:ed60ad733aa49b70720c9d8dded1b18374ec5022</id>
<content type='text'>
When running refscale as a module, any ref_scale_init() issues will be
reflected in the error code from modprobe or insmod, as the case may be.
However, these error codes are not available when running refscale
built-in, for example, when using the kvm.sh script.  This commit
therefore adds WARN_ON_ONCE() to allow distinguishing ref_scale_init()
errors when running refscale built-in.

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