ote:
> > > > On Fri, Jan 31, 2025 at 10:47:49AM -0500, Tamir Duberstein wrote:
>
> [...]
>
> > There are other options like CONFIG_TEST_PRINTF or so in defconfig files.
> > Why are they there to begin with? The answer to this Q will affect the
> > change
>
> There are other options like CONFIG_TEST_PRINTF or so in defconfig files.
> Why are they there to begin with? The answer to this Q will affect the change
> you have done in this patch.
CONFIG_TEST_PRINTF still exists; that test has not been converted to kunit.
Yan Zhai wrote:
> Commit 4094871db1d6 ("udp: only do GSO if # of segs > 1") avoided GSO
> for small packets. But the kernel currently dismisses GSO requests only
> after checking MTU/PMTU on gso_size. This means any packets, regardless
> of their payload sizes, could be dropped when PMTU becomes sm
due to
> > passing `test` around.
>
> Ah, you were referring to git format-patch. Sure, if you'd like me to
> rename the file, I'll use those flags in v2.
Yes.
--
With Best Regards,
Andy Shevchenko
On Fri, Jan 31, 2025 at 12:22:39PM -0500, Tamir Duberstein wrote:
> On Fri, Jan 31, 2025 at 12:11 PM Andy Shevchenko
> wrote:
> > On Fri, Jan 31, 2025 at 10:47:49AM -0500, Tamir Duberstein wrote:
> > > Convert the scanf() self-test to a KUnit test.
> > >
> > &g
On Fri, Jan 31, 2025 at 12:22 PM Tamir Duberstein wrote:
>
> On Fri, Jan 31, 2025 at 12:11 PM Andy Shevchenko
> wrote:
> >
> > On Fri, Jan 31, 2025 at 10:47:49AM -0500, Tamir Duberstein wrote:
> > > Convert the scanf() self-test to a KUnit test.
> > >
>
On Fri, Jan 31, 2025 at 12:11 PM Andy Shevchenko
wrote:
>
> On Fri, Jan 31, 2025 at 10:47:49AM -0500, Tamir Duberstein wrote:
> > Convert the scanf() self-test to a KUnit test.
> >
> > In the interest of keeping the patch reasonably-sized this doesn't
> > renam
On Fri, Jan 31, 2025 at 10:47:49AM -0500, Tamir Duberstein wrote:
> Convert the scanf() self-test to a KUnit test.
>
> In the interest of keeping the patch reasonably-sized this doesn't
> rename the file in accordance with usual kunit conventions nor does it
> refactor t
On 28-01-2025 03:03, Weinan Liu wrote:
Since SFrame is considered as reliable stacktrace, enable livepatch in
arch/arm64/Kconfig
Signed-off-by: Weinan Liu
---
arch/arm64/Kconfig | 3 +++
1 file changed, 3 insertions(+)
diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
index 100570a048c
Convert the scanf() self-test to a KUnit test.
In the interest of keeping the patch reasonably-sized this doesn't
rename the file in accordance with usual kunit conventions nor does it
refactor the tests into proper parameterized tests - it's all one big
test case.
Signed-off
On 29.01.2025 10:23 PM, Alexey Minnekhanov wrote:
> Add resets to eMMC/SD card blocks so linux can properly reset
> them during initialization.
>
> Signed-off-by: Alexey Minnekhanov
> ---
Thanks!
Reviewed-by: Konrad Dybcio
Konrad
sleep 5s
> yum erase -y kernel-livepatch-6.1.12-0.x86_64
> yum install -y ./kernel-livepatch-6.1.6-0.x86_64.rpm
> ./apply_livepatch_61.sh # it will sleep 5s
> done
A live patch application is a slowpath. It is expected not to run
frequently (in a relative sense). If
On 29.01.2025 10:23 PM, Alexey Minnekhanov wrote:
> This will allow linux to properly reset eMMC/SD blocks.
>
> Signed-off-by: Alexey Minnekhanov
> Fixes: f2a76a2955c0 ("clk: qcom: Add Global Clock controller (GCC) driver for
> SDM660")
> ---
Reviewed-by: Konrad Dybcio
Konrad
Add a new selftest to verify netconsole's handling of messages that
exceed the packet size limit and require fragmentation. The test sends
messages with varying sizes and userdata, validating that:
1. Large messages are correctly fragmented and reassembled
2. Userdata fields are properly preserved
sole
> > is not in use.
> >
> > Looks like virtio-console continues to write to the MMIO even after
> > underlying virtio-pci device is removed.
> >
> > The problem can be mitigated by removing all virtio devices on virtio
> > bus shutdown.
> >
On Fri, 31 Jan 2025 at 09:45, David Gow wrote:
> One future idea would be to look into microvms, which might be even
> faster. I'll give myself a TODO to experiment with those.
Yeah, that would be cool although I think they require CONFIG_PARAVIRT
which isn't an entirely negligible constraint. St
been
> > > working with this code in practice and found this to be useful.
> >
> > It's also nice to add that people on the libc/allocator side should
> > also appreciate skipping pidfd_open's reliability concerns (mostly,
> > that RLIMIT_NOFILE Sho
derlying virtio-pci device is removed.
>
> The problem can be mitigated by removing all virtio devices on virtio
> bus shutdown.
>
> Signed-off-by: Kirill A. Shutemov
> Reported-by: Hongyu Ning
Gentle ping on that patch that seems to have fallen though the cracks.
I think this fi
From: Willem de Bruijn
commit 6513eb3d3191574b58859ef2d6dc26c0277c6f81 upstream.
The referenced commit drops bad input, but has false positives.
Tighten the check to avoid these.
The check detects illegal checksum offload requests, which produce
csum_start/csum_off beyond end of packet after s
On Fri, 24 Jan 2025 at 19:01, Brendan Jackman wrote:
>
> As noted in [0], SeaBIOS (QEMU default) makes a mess of the terminal,
> qboot does not.
>
> It turns out this is actually useful with kunit.py, since the user is
> exposed to this issue if they set --raw_output=all.
>
> qboot is also faster
From: Willem de Bruijn
commit 89add40066f9ed9abe5f7f886fe5789ff7e0c50e upstream.
Tighten csum_start and csum_offset checks in virtio_net_hdr_to_skb
for GSO packets.
The function already checks that a checksum requested with
VIRTIO_NET_HDR_F_NEEDS_CSUM is in skb linear. But for GSO packets
this
From: Eric Dumazet
commit 49d14b54a527289d09a9480f214b8c586322310a upstream.
syzbot was able to trigger this warning [1], after injecting a
malicious packet through af_packet, setting skb->csum_start and thus
the transport header to an incorrect value.
We can at least make sure the transport he
From: Eric Dumazet
commit 9181d6f8a2bb32d158de66a84164fac05e3ddd18 upstream.
syzbot/KMSAN reports access to uninitialized data from gso_features_check() [1]
The repro use af_packet, injecting a gso packet and hdrlen == 0.
We could fix the issue making gso_features_check() more careful
while de
Link: https://nvd.nist.gov/vuln/detail/cve-2024-43817
[PATCH 5.10 1/5] net: more strict VIRTIO_NET_HDR_GSO_UDP_L4 validation
[PATCH 5.10 2/5] net: drop bad gso csum_start and offset in virtio_net_hdr
[PATCH 5.10 3/5] net: tighten bad gso csum offset check in virtio_net_hdr
[PATCH 5.10 4/5] net
From: Willem de Bruijn
commit fc8b2a619469378717e7270d2a4e1ef93c585f7a upstream.
Syzbot reported two new paths to hit an internal WARNING using the
new virtio gso type VIRTIO_NET_HDR_GSO_UDP_L4.
RIP: 0010:skb_checksum_help+0x4a2/0x600 net/core/dev.c:3260
skb len=64521 gso_size=344
and
Commit 4094871db1d6 ("udp: only do GSO if # of segs > 1") avoided GSO
for small packets. But the kernel currently dismisses GSO requests only
after checking MTU/PMTU on gso_size. This means any packets, regardless
of their payload sizes, could be dropped when PMTU becomes smaller than
requested gso
rect endianness. When it’s called
> before mlx5_vdpa_set_driver_features(), the flag is clear, and the data are
> returned as big-endian on big-endian machines, while QEMU interprets them
> as little-endian.
>
Good catch! Thank you for the patch.
Could you add the clarification that m
XDP programs loaded on egress is tested by test_xdp_redirect_multi.sh
but not by the test_progs framework.
Add a test case in test_xdp_veth.c to test the XDP program on egress.
Use the same BPF program than test_xdp_redirect_multi.sh that replaces
the source MAC address by one provided through a B
x27;s an extra safety net that avoids
>> memleaks when we forget to kfree, and not that we deliberately do not
>> free and get lax about managing allocated memory.
>>
>> So I'd prefer a patch that keeps all current frees as they are, but
>> with the added advanta
The tests done by test_xdp_redirect_multi.sh are now fully covered by
the CI through test_xdp_veth.c.
Remove test_xdp_redirect_multi.sh
Remove xdp_redirect_multi.c that was used by the script to load and
attach the BPF programs.
Remove their entries in the Makefile
Acked-by: Stanislav Fomichev
S
XDP redirections with BPF_F_BROADCAST and BPF_F_EXCLUDE_INGRESS flags
are tested by test_xdp_redirect_multi.sh but not within the test_progs
framework.
Add a broadcast test case in test_xdp_veth.c to test them.
Use the same BPF programs than the one used by
test_xdp_redirect_multi.sh.
Use a BPF ma
Broadcasting flags are hardcoded for each kind for protocol.
Create a redirect_flags map that allows to select the broadcasting flags
to use in the bpf_redirect_map(). The protocol ID is used as a key.
Set the old hardcoded values as default if the map isn't filled by the
BPF caller.
Acked-by: St
The XDP redirection is tested without any flag provided to the
xdp_attach() function.
Add two subtests that check the correct behaviour with
XDP_FLAGS_{DRV/SKB}_MODE flags
Acked-by: Stanislav Fomichev
Signed-off-by: Bastien Curutchet (eBPF Foundation)
---
.../selftests/bpf/prog_tests/test_xdp
The network namespaces and the veth used by the tests have hardcoded
names that can conflict with other tests during parallel runs.
Use the append_tid() helper to ensure the uniqueness of these names.
Use the static network configuration table as a template on which
thread IDs are appended in each
The BPF program attached to each veth is hardcoded through the
use of the struct skeletons. It prevents from re-using the initialization
code in new test cases.
Replace the struct skeletons by a bpf_object table.
Add a struct prog_configuration that holds the name of BPF program to
load on a given
XDP flags are hardcoded to 0 at attachment.
Add flags attributes to the struct prog_configuration to allow flag
modifications for each test case.
Acked-by: Stanislav Fomichev
Signed-off-by: Bastien Curutchet (eBPF Foundation)
---
tools/testing/selftests/bpf/prog_tests/test_xdp_veth.c | 14 +++
configure_network() does two things : it first creates the network
topology and then configures the BPF maps to fit the test needs. This
isn't convenient if we want to re-use the same network topology for
different test cases.
Rename configure_network() create_network().
Move the BPF configuration
In the struct veth_configuration, the next_veth string is used to tell
the next virtual interface to which packets must be redirected to. So it
has to match the local_veth string of an other veth_configuration.
Change next_veth type to int to avoid handling two identical strings.
This integer is u
The network topology is held by the config[] table. This 'config' name
is a bit too generic if we want to add other configuration variables.
Rename config[] to net_config[].
Acked-by: Stanislav Fomichev
Signed-off-by: Bastien Curutchet (eBPF Foundation)
---
.../selftests/bpf/prog_tests/test_x
check_ping() directly returns a SYS_NOFAIL without any previous
treatment. It's called only once in the file and hardcodes the used
namespace and ip address.
Replace check_ping() with a direct call of SYS_NOFAIL in the test.
Signed-off-by: Bastien Curutchet (eBPF Foundation)
---
tools/testing/
IP_CMD_MAX_LEN and NS_SUFFIX_LEN aren't used anywhere.
Remove these unused defines
Signed-off-by: Bastien Curutchet (eBPF Foundation)
---
tools/testing/selftests/bpf/prog_tests/test_xdp_veth.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/tools/testing/selftests/bpf/prog_tests/test_xdp_
Some tests can't be run in parallel because they use same namespace
names or veth names.
Create an helper that appends the thread ID to a given string. 8
characters are used for it (7 digits + '\0')
Signed-off-by: Bastien Curutchet (eBPF Foundation)
---
tools/testing/selftests/bpf/network_help
Hi all,
This patch series continues the work to migrate the *.sh tests into
prog_tests framework.
test_xdp_redirect_multi.sh tests the XDP redirections done through
bpf_redirect_map().
This is already partly covered by test_xdp_veth.c that already tests
map redirections at XDP level. What isn
Since commit 7e92e01b7245 ("powerpc: Provide syscall wrapper")
landed in v6.1, syscall wrapper is enabled on powerpc. Commit
94746890202c ("powerpc: Don't add __powerpc_ prefix to syscall
entry points") , that drops the prefix to syscall entry points,
also landed in the same release. So, add the m
, if no CPUs are allocated
from NUMA node 0.
This patch fixes the issue by setting NUMA_NO_NODE (-1) for map
creation for this selftest.
Fixes: 96eabe7a40aa ("bpf: Allow selecting numa node during map creation")
Signed-off-by: Saket Kumar Bhaskar
---
tools/testing/selftests/bpf/
On 1/30/25 2:33 PM, Daniel Xu wrote:
Since 67ab80a01886 ("selftests/bpf: Prefer static linking for LLVM
libraries"), only statically linking test_progs is supported. However,
some distros only provide a dynamically linkable LLVM.
This commit adds a fallback for dynamically linking LLVM if st
On 1/30/25 2:33 PM, Daniel Xu wrote:
Since 67ab80a01886 ("selftests/bpf: Prefer static linking for LLVM
libraries"), only statically linking test_progs is supported. However,
some distros only provide a dynamically linkable LLVM.
This commit adds a fallback for dynamically linking LLVM if st
On Thu, 2025-01-30 at 15:33 -0700, Daniel Xu wrote:
> Since 67ab80a01886 ("selftests/bpf: Prefer static linking for LLVM
> libraries"), only statically linking test_progs is supported. However,
> some distros only provide a dynamically linkable LLVM.
>
> This commit adds a fallback for dynamically
or a
> malloc[1]). Besides the big syscall reduction and nice speedup, that
> is.
>
> [1] whether this is the already case is an exercise left to the
> reader, but at the very least we should not add onto existing problems
Thanks.
Could we please get all the above spelled out much more thoroughly in
the [0/n] description (aka Patch Series Sales Brochure)?
On Thu, Jan 30, 2025 at 10:53 PM Lorenzo Stoakes
wrote:
>
> On Thu, Jan 30, 2025 at 02:37:54PM -0800, Andrew Morton wrote:
> > On Thu, 30 Jan 2025 20:40:25 + Lorenzo Stoakes
> > wrote:
> >
> > > If you wish to utilise a pidfd interface to refer to the current process
> > > or
> > > thread i
On Thu, Jan 30, 2025 at 02:37:54PM -0800, Andrew Morton wrote:
> On Thu, 30 Jan 2025 20:40:25 + Lorenzo Stoakes
> wrote:
>
> > If you wish to utilise a pidfd interface to refer to the current process or
> > thread it is rather cumbersome, requiring something like:
> >
> > int pidfd = pidf
On Thu, 30 Jan 2025 20:40:25 + Lorenzo Stoakes
wrote:
> If you wish to utilise a pidfd interface to refer to the current process or
> thread it is rather cumbersome, requiring something like:
>
> int pidfd = pidfd_open(getpid(), 0 or PIDFD_THREAD);
>
> ...
>
> close(pidf
Since 67ab80a01886 ("selftests/bpf: Prefer static linking for LLVM
libraries"), only statically linking test_progs is supported. However,
some distros only provide a dynamically linkable LLVM.
This commit adds a fallback for dynamically linking LLVM if static
linking is not available. If both opti
mlx5_vdpa_dev_add() doesn’t initialize mvdev->actual_features. It’s
initialized later by mlx5_vdpa_set_driver_features(). However,
mlx5_vdpa_get_config() depends on the VIRTIO_F_VERSION_1 flag in
actual_features to return data with correct endianness. When it’s called
before mlx5_vdpa_set_driver_fe
It is useful to be able to utilise the pidfd mechanism to reference the
current thread or process (from a userland point of view - thread group
leader from the kernel's point of view).
Therefore introduce PIDFD_SELF_THREAD to refer to the current thread, and
PIDFD_SELF_THREAD_GROUP to refer to the
Now we have PIDFD_SELF available for process_madvise(), make use of it in
the guard pages test.
This is both more convenient and asserts that PIDFD_SELF works as expected.
Signed-off-by: Lorenzo Stoakes
---
tools/testing/selftests/mm/Makefile | 4
tools/testing/selftests/mm/guard-pag
Add tests to assert that PIDFD_SELF* correctly refers to the current
thread and process.
We explicitly test pidfd_send_signal(), however We defer testing of
mm-specific functionality which uses pidfd, namely process_madvise() and
process_mrelease() to mm testing (though note the latter can not be
Conflicts can arise between system fcntl.h and linux/fcntl.h, imported by
the linux/pidfd.h UAPI header.
Work around this by adding a wrapper for linux/pidfd.h to
tools/include/ which sets the linux/fcntl.h header guard ahead of
importing the pidfd.h header file.
Adjust the pidfd selftests Makefi
If you wish to utilise a pidfd interface to refer to the current process or
thread it is rather cumbersome, requiring something like:
int pidfd = pidfd_open(getpid(), 0 or PIDFD_THREAD);
...
close(pidfd);
Or the equivalent call opening /proc/self. It is more convenient t
It seems tests other than the pidfd tests use the wait_for_pid() function
declared in pidfd.h.
Since we will shortly be modifying pidfd.h in a way that might clash with
other tests, separate this out and update tests accordingly.
Signed-off-by: Lorenzo Stoakes
---
tools/testing/selftests/cgroup
The pidfd_fdinfo_test.c and pidfd_setns_test.c tests appear to be missing
fundamental system header imports required to execute correctly. Add these.
Signed-off-by: Lorenzo Stoakes
---
tools/testing/selftests/pidfd/pidfd_fdinfo_test.c | 1 +
tools/testing/selftests/pidfd/pidfd_setns_test.c | 1
From: Thomas Weißschuh
Add an allocation-free implementation of readdir() and related
functions. The implementation is modelled after the one for FILE.
Signed-off-by: Thomas Weißschuh
Signed-off-by: Thomas Weißschuh
---
I'm not entirely sure where to put it. It doesn't really belong into
stdi
From: Thomas Weißschuh
Not all architectures have the old sys_lseek(), notably riscv32.
Implement lseek() in terms of sys_llseek() in that case.
Signed-off-by: Thomas Weißschuh
Signed-off-by: Thomas Weißschuh
---
tools/include/nolibc/sys.h | 29 -
1 file changed, 2
Add support opendir(), readdir(), closedir() and friends.
Signed-off-by: Thomas Weißschuh
---
Thomas Weißschuh (2):
tools/nolibc: add support for sys_llseek()
tools/nolibc: add support for directory access
tools/include/nolibc/stdio.h | 76 +++
This commit abstracts the srcu_read_unlock*() integer-to-pointer
conversion into a new __srcu_ctr_to_ptr(). This will be used
in rcutorture for testing an srcu_read_unlock_fast() that avoids
array-indexing overhead by taking a pointer rather than an integer.
[ paulmck: Apply kernel test robot fee
Hi Roman,
On Thu, Jan 30, 2025 at 11:01 AM Roman Gushchin
wrote:
>
> On Thu, Jan 30, 2025 at 10:34:09AM -0800, Song Liu wrote:
> > On Thu, Jan 30, 2025 at 9:59 AM Song Liu wrote:
> > >
> > > I missed this set before sending my RFC set. If this set works well, we
> > > won't need the other set. I
With only eight bits per grace-period sequence number, wrap can happen
in 64 grace periods. This commit therefore increases this to sixteen
bits for normal grace-period sequence numbers and the combined short-form
polling sequence numbers, thus deferring wrap for at least 16,384 grace
periods. Be
This commit adds a test_boost_holdoff module parameter that tells the RCU
priority-boosting tests to wait for the specified number of seconds past
the start of the rcutorture test. This can be useful when rcutorture
is built into the kernel (as opposed to being modprobed), especially on
large syst
This commit reformats the expedited grace-period numbers into hexadecimal
for easier decoding and comparison. The normal grace-period numbers
remain in decimal for the time being.
Signed-off-by: Paul E. McKenney
---
include/trace/events/rcu.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-
This commit adds an ftrace-compatible microsecond-scale timestamp
to the failure/close-call output, but only in kernels built with
CONFIG_RCU_TORTURE_TEST_LOG_GP=y.
Signed-off-by: Paul E. McKenney
---
kernel/rcu/rcutorture.c | 8 +++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --gi
The Tree and Tiny implementations of rcutorture_format_gp_seqs() use
hard-coded constants for the length of the buffer that they format into.
This is of course an accident waiting to happen, so this commit therefore
makes them take a length argument. The rcutorture calling code uses
ARRAY_SIZE() t
The RCU_TORTURE_TEST_CHK_RDR_STATE and RCU_TORTURE_TEST_LOG_CPU Kconfig
options are pointlessly defined as tristate. This commit therefore
converts them to bool.
Reported-by: kernel test robot
Closes: https://lore.kernel.org/oe-lkp/202412241458.150d082b-...@intel.com
Signed-off-by: Paul E. McKen
Currently, rcutorture ignores reader_flavor bits that are not in the
SRCU_READ_FLAVOR_ALL bitmask, which could confuse rcutorture users into
believing buggy patches had been fully tested. This commit therefore
produces a splat in this case.
Signed-off-by: Paul E. McKenney
---
kernel/rcu/rcutort
This commit adds a get_torture_init_jiffies() function that returns the
value of the jiffies counter at the start of the test, that is, at the
point where torture_init_begin() was invoked.
This will be used to enable torture-test holdoffs for tests implemented
using per-CPU kthreads, which are cre
Recent experience shows that the srcu_read_lock_nmisafe() and
srcu_read_unlock_nmisafe() functions are not sufficiently tested.
This commit therefore causes the torture.sh script's SRCU lockdep testing
to use these two functions. This will cause these two functions to
be regularly tested by severa
This commit includes the grace-period sequence numbers at the beginning
and end of each segment in the "Failure/close-call rcutorture reader
segments" list. These are in hexadecimal, and only the bottom byte.
Currently, only RCU is supported, with its three sequence numbers (normal,
expedited, and
The srcu_read_lock_nmisafe() and srcu_read_unlock_nmisafe() functions
map to __srcu_read_lock() and __srcu_read_unlock() on systems like x86
that have NMI-safe this_cpu_inc() operations. This makes the underlying
__srcu_read_lock_nmisafe() and __srcu_read_unlock_nmisafe() functions
difficult to te
Hello!
This series contains torture-test updates:
1. Add get_torture_init_jiffies() for test-start time.
2. Add a test_boost_holdoff module parameter.
3. Include grace-period sequence numbers in failure/close-call.
4. Expand failure/close-call grace-period output.
5.
The srcu_read_unlock_lite() and srcu_read_unlock_nmisafe() both say that
their idx parameters must come from srcu_read_lock(). This would be bad,
because a given srcu_struct structure may be used only with one flavor of
SRCU reader. This commit therefore updates the srcu_read_unlock_lite()
kernel
This commit adds a sentence to the srcu_down_read() function's kernel-doc
header noting that it is permissible to use srcu_down_read() and
srcu_read_lock() on the same srcu_struct, even concurrently.
Signed-off-by: Paul E. McKenney
Cc: Alexei Starovoitov
Cc: Andrii Nakryiko
Cc: Peter Zijlstra
BPF uses rcu_read_lock_trace() in NMI context, so srcu_read_lock_fast()
must be NMI-safe if it is to have any chance of addressing RCU Tasks
Trace use cases. This commit therefore causes srcu_read_lock_fast()
and srcu_read_unlock_fast() to use atomic_long_inc() instead of
this_cpu_inc() on archite
A pair of matching srcu_read_lock_fast() and srcu_read_unlock_fast()
invocations must take place within the same context, for example, within
the same task. Otherwise, lockdep complains, as is the right thing to
do for most use cases.
However, there are use cases involving tracing (for example, u
This commit creates a new srcu-fast option for the refscale.scale_type
module parameter that selects srcu_read_lock_fast() and
srcu_read_unlock_fast().
Signed-off-by: Paul E. McKenney
Cc: Alexei Starovoitov
Cc: Andrii Nakryiko
Cc: Peter Zijlstra
Cc: Kent Overstreet
Cc:
---
kernel/rcu/refsca
This commit causes the rcutorture SRCU-P scenario use the
srcu_read_lock_fast() and srcu_read_unlock_fast() functions. This will
cause these two functions to be regularly tested by several developers
(myself included), for example, those who use torture.sh as an RCU
acceptance test.
Signed-off-by
There are a couple of definitions under "#ifdef CONFIG_TINY_SRCU"
in include/linux/srcu.h. There is no point in them being there,
so this commit moves them to include/linux/srcutiny.h and
include/linux/srcutree.c, thus eliminating that #ifdef.
Signed-off-by: Paul E. McKenney
Cc: Alexei Starovoit
This commit abstracts the srcu_read_lock*() pointer-to-integer conversion
into a new __srcu_ptr_to_ctr(). This will be used in rcutorture for
testing an srcu_read_lock_fast() that returns a pointer rather than
an integer.
Signed-off-by: Paul E. McKenney
Cc: Alexei Starovoitov
Cc: Andrii Nakryik
This commit permits rcutorture to test srcu_read_{,un}lock_fast(), which
is specified by the rcutorture.reader_flavor=0x8 kernel boot parameter.
Signed-off-by: Paul E. McKenney
Cc: Alexei Starovoitov
Cc: Andrii Nakryiko
Cc: Peter Zijlstra
Cc: Kent Overstreet
Cc:
---
kernel/rcu/rcutorture.c
This commit adds srcu_read_{,un}lock_fast(), which is similar
to srcu_read_{,un}lock_lite(), but avoids the array-indexing and
pointer-following overhead. On a microbenchmark featuring tight
loops around empty readers, this results in about a 20% speedup
compared to RCU Tasks Trace on my x86 lapto
This commit switches from a direct test of SRCU_READ_FLAVOR_LITE to a new
SRCU_READ_FLAVOR_SLOWGP macro to check for substituting synchronize_rcu()
for smp_mb() in SRCU grace periods. Right now, SRCU_READ_FLAVOR_SLOWGP
is exactly SRCU_READ_FLAVOR_LITE, but the addition of the _fast() flavor
of SRC
This commit stops using ->srcu_idx for rcutorture's reader-batch
consistency checking, using ->srcu_gp_seq instead. This is a first
step towards a faster srcu_read_{,un}lock_lite() that avoids the array
accesses that use ->srcu_idx.
Signed-off-by: Paul E. McKenney
Cc: Alexei Starovoitov
Cc: And
This commit causes SRCU readers to use ->srcu_ctrs for counter
selection instead of ->srcu_idx. This takes another step towards
array-indexing-free SRCU readers.
[ paulmck: Apply kernel test robot feedback. ]
Co-developed-by: Z qiang
Signed-off-by: Z qiang
Signed-off-by: Paul E. McKenney
Test
This commit renames the srcu_check_read_flavor_lite() function to
srcu_check_read_flavor_force() and adds a read_flavor argument in order to
support an srcu_read_lock_fast() variant that is to avoid array indexing
in both the lock and unlock primitives.
Signed-off-by: Paul E. McKenney
Cc: Alexei
This commit prepares for array-index-free srcu_read_lock*() by moving the
->srcu_{un,}lock_count fields into a new srcu_ctr structure. This will
permit ->srcu_index to be replaced by a per-CPU pointer to this structure.
Signed-off-by: Paul E. McKenney
Cc: Alexei Starovoitov
Cc: Andrii Nakryiko
This commit makes Tree SRCU updates independent of ->srcu_idx, then
drop ->srcu_idx.
Signed-off-by: Paul E. McKenney
Cc: Alexei Starovoitov
Cc: Andrii Nakryiko
Cc: Peter Zijlstra
Cc: Kent Overstreet
Cc:
---
include/linux/srcutree.h | 1 -
kernel/rcu/srcutree.c| 68 -
Currently, srcu_get_delay() can be called concurrently, for example,
by a CPU that is the first to request a new grace period and the CPU
processing the current grace period. Although concurrent access is
harmless, it unnecessarily expands the state space. Additionally,
all calls to srcu_get_dela
Given that SRCU allows its read-side critical sections are not just
preemptible, but also allow general blocking, there is not much
reason to restrict Tiny SRCU to non-preemptible kernels. This commit
therefore removes Tiny SRCU dependencies on non-preemptibility, primarily
surrounding its interac
This commit defines SRCU_READ_FLAVOR_ALL in terms of the
SRCU_READ_FLAVOR_* definitions instead of a hexadecimal constant.
Suggested-by: Neeraj Upadhyay
Signed-off-by: Paul E. McKenney
Cc: Alexei Starovoitov
Cc: Andrii Nakryiko
Cc: Peter Zijlstra
Cc: Kent Overstreet
Cc:
---
include/linux/s
Hello!
This series contains SRCU updates, perhaps most notably the addition of
srcu_read_lock_fast() and srcu_read_unlock_fast(), which on my laptop are
about 20% faster than rcu_read_lock_trace() and rcu_read_unlock_trace().
There are of course drawbacks:
o Lack of CPU stall warnings.
o
On Thu, Jan 30, 2025 at 10:34:09AM -0800, Song Liu wrote:
> On Thu, Jan 30, 2025 at 9:59 AM Song Liu wrote:
> >
> > I missed this set before sending my RFC set. If this set works well, we
> > won't need the other set. I will give this one a try.
>
> I just realized that llvm doesn't support sfram
From: Ankur Arora
To reduce RCU noise for nohz_full configurations, osnoise depends
on cond_resched() providing quiescent states for PREEMPT_RCU=n
configurations. For PREEMPT_RCU=y configurations -- where
cond_resched() is a stub -- we do this by directly calling
rcu_momentary_eqs().
With (PREEM
1 - 100 of 526933 matches
Mail list logo