Hi Michael,
On 2/21/25 12:42 AM, Michael S. Tsirkin wrote:
> Hongyu reported a hang on kexec in a VM. QEMU reported invalid memory
> accesses during the hang.
>
> Invalid read at addr 0x102877002, size 2, region '(null)', reason:
> rejected
> Invalid write at addr 0x102877A44, size 2
On Mon, Feb 24, 2025 at 7:44 AM Eugenio Perez Martin
wrote:
>
> On Mon, Feb 24, 2025 at 3:01 AM Jason Wang wrote:
> >
> > On Sat, Feb 22, 2025 at 1:07 AM Eugenio Pérez wrote:
> > >
> > > Disable notifications right before scheduling, instead of waiting until
> > > the work is running.
> > >
> >
On Mon, Feb 24, 2025 at 3:01 AM Jason Wang wrote:
>
> On Sat, Feb 22, 2025 at 1:07 AM Eugenio Pérez wrote:
> >
> > Disable notifications right before scheduling, instead of waiting until
> > the work is running.
> >
> > After applying this patch, fio read test goes from 1191MiB/s to
> > 1263.14Mi
On Mon, Feb 24, 2025 at 2:57 AM Jason Wang wrote:
>
> On Sat, Feb 22, 2025 at 1:06 AM Eugenio Pérez wrote:
> >
> > A VDUSE device that implements virtiofs device works fine just by
> > adding the device id to the whitelist.
> >
> > Signed-off-by: Eugenio Pérez
> > Acked-by: Jason Wang
> > ---
>
./tools/testing/selftests/filesystems/utils.c: sys/types.h is included more
than once.
Reported-by: Abaci Robot
Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=19042
Signed-off-by: Jiapeng Chong
---
tools/testing/selftests/filesystems/utils.c | 1 -
1 file changed, 1 deletion(-)
diff -
Commit 918327e9b7ff ("ubsan: Remove CONFIG_UBSAN_SANITIZE_ALL")
removed the CONFIG_UBSAN_SANITIZE_ALL configuration option.
Eliminate invalid configurations to improve code readability.
Link: https://lore.kernel.org/all/20250123105743.go395...@kernel.org/
Reviewed-by: Simon Horman
Signed-off-by:
The filename parameter in write_file(), maybe_write_file(),
and vmaybe_write_file() is unmodified / read-only.
So, used 'const' to improve type safety.
Signed-off-by: Ritvik Gupta
---
tools/testing/selftests/mount/unprivileged-remount-test.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletio
From: "Paul E. McKenney"
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 o
From: "Paul E. McKenney"
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 Nak
From: "Paul E. McKenney"
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 involv
From: "Paul E. McKenney"
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. McK
From: "Paul E. McKenney"
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 src
From: "Paul E. McKenney"
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
From: "Paul E. McKenney"
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
acce
From: "Paul E. McKenney"
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
From: "Paul E. McKenney"
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:
Si
From: "Paul E. McKenney"
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 Star
From: "Paul E. McKenney"
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:
From: "Paul E. McKenney"
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,
From: "Paul E. McKenney"
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:
Signed-off-by: Boqun Feng
---
include/linux/srcutree.h | 1
From: "Paul E. McKenney"
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 o
From: "Paul E. McKenney"
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: Pa
From: "Paul E. McKenney"
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
From: "Paul E. McKenney"
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 Starov
From: "Paul E. McKenney"
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:
From: "Paul E. McKenney"
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
From: "Paul E. McKenney"
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, primar
Hi,
Please find the upcoming changes in SRCU for v6.15. The changes can also
be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/rcu/linux.git
srcu.2025.02.05a
Regards,
Boqun
Paul E. McKenney (20):
srcu: Make Tiny SRCU able to operate in preemptible kernels
srcu: Define SRCU
On Fri, Feb 21, 2025 at 9:37 AM Michael S. Tsirkin wrote:
>
> On Fri, Feb 21, 2025 at 09:11:51AM +0800, Jason Wang wrote:
> > On Fri, Feb 21, 2025 at 7:42 AM Michael S. Tsirkin wrote:
> > >
> > > Hongyu reported a hang on kexec in a VM. QEMU reported invalid memory
> > > accesses during the hang.
On Sun, Feb 23, 2025 at 11:41 PM Cindy Lu wrote:
>
> Add a new UAPI to enable setting the vhost device to task mode.
> The userspace application can use VHOST_SET_INHERIT_FROM_OWNER
> to configure the mode if necessary.
> This setting must be applied before VHOST_SET_OWNER, as the worker
> will be
On Sat, Feb 22, 2025 at 1:07 AM Eugenio Pérez wrote:
>
> This is useful for some setups like swiotlb or VDUSE where the DMA
> operations are expensive and/or need to be performed with a write lock.
>
> After applying this patch, fio read test goes from 1124MiB/s to 1191MiB/s.
What FIO parameter h
On Sat, Feb 22, 2025 at 1:07 AM Eugenio Pérez wrote:
>
> Disable notifications right before scheduling, instead of waiting until
> the work is running.
>
> After applying this patch, fio read test goes from 1191MiB/s to
> 1263.14Mib/s
Let's describe more about the testing. E.g FIO parameters, tes
On Sat, Feb 22, 2025 at 1:06 AM Eugenio Pérez wrote:
>
> A VDUSE device that implements virtiofs device works fine just by
> adding the device id to the whitelist.
>
> Signed-off-by: Eugenio Pérez
> Acked-by: Jason Wang
> ---
Let's separate this from this series.
Thanks
On Sun, Feb 23, 2025 at 11:41 PM Cindy Lu wrote:
>
> The VHOST_NEW_WORKER requires the inherit_owner
> setting to be true. So we need to add a check for this.
>
> Signed-off-by: Cindy Lu
> ---
Acked-by: Jason Wang
Thanks
On Sun, Feb 23, 2025 at 11:41 PM Cindy Lu wrote:
>
> This commit restores the previously removed functions kthread_wakeup and
> kthread_stop, and introduces a new ops structure to handle worker wakeup,
> stop, and creation. The function vhost_worker_create initializes these
> ops pointers based on
On Sun, Feb 23, 2025 at 5:36 PM Suren Baghdasaryan wrote:
>
> On Sat, Feb 22, 2025 at 8:44 PM Suren Baghdasaryan wrote:
> >
> > On Sat, Feb 22, 2025 at 4:19 PM Kent Overstreet
> > wrote:
> > >
> > > On Fri, Feb 14, 2025 at 05:27:36PM +0100, Vlastimil Babka wrote:
> > > > - Cheaper fast paths. Fo
On Sun, Feb 23, 2025 at 11:41 PM Cindy Lu wrote:
>
> Add back the previously removed cgroup function to support the kthread
> The biggest change for this part is in vhost_attach_cgroups() and
> vhost_attach_task_to_cgroups().
>
> Reuse the function __vhost_worker_flush, but in this situation, the
On Sun, Feb 23, 2025 at 11:41 PM Cindy Lu wrote:
>
> Add the previously removed function vhost_worker() back
> to support the kthread and rename it to vhost_run_work_kthread_list.
>
> The old function vhost_worker was change to support task in
> commit 6e890c5d5021 ("vhost: use vhost_tasks for wor
On Sat, Feb 22, 2025 at 8:44 PM Suren Baghdasaryan wrote:
>
> On Sat, Feb 22, 2025 at 4:19 PM Kent Overstreet
> wrote:
> >
> > On Fri, Feb 14, 2025 at 05:27:36PM +0100, Vlastimil Babka wrote:
> > > - Cheaper fast paths. For allocations, instead of local double cmpxchg,
> > > after Patch 5 it's
On Sun, Feb 23, 2025 at 11:40 PM Cindy Lu wrote:
>
> The vhost now uses vhost_task and workers as a child of the owner thread.
> While this aligns with containerization principles,it confuses some legacy
> userspace app, Therefore, we are reintroducing kthread API support.
>
> Introduce a new para
On Sat, Feb 22, 2025 at 02:00:50PM +0100, Luca Weiss wrote:
> Add the necessary supplies and set an appropriete firmware-name for the
Nit: appropriate
> modem and enable it.
>
> Signed-off-by: Luca Weiss
> ---
> arch/arm64/boot/dts/qcom/sdm632-fairphone-fp3.dts | 8
> 1 file changed,
On Sat, Feb 22, 2025 at 02:00:49PM +0100, Luca Weiss wrote:
> Set the paths where the device-specific firmware can be found for this
> device.
>
> Fairphone 3 was shipped with secure-boot off so any testkey-signed
> firmware is accepted.
>
> Signed-off-by: Luca Weiss
> ---
> arch/arm64/boot/dts
On Sat, Feb 22, 2025 at 02:00:47PM +0100, Luca Weiss wrote:
> As is common style nowadays, move the status properties to be the last
> property of a node.
>
> Signed-off-by: Luca Weiss
> ---
> arch/arm64/boot/dts/qcom/sdm632-fairphone-fp3.dts | 15 +--
> 1 file changed, 9 insertions(
On Sat, Feb 22, 2025 at 02:00:48PM +0100, Luca Weiss wrote:
> As is common style nowadays, make sure there's an empty line between
> regulator subnodes.
>
> Signed-off-by: Luca Weiss
> ---
> arch/arm64/boot/dts/qcom/sdm632-fairphone-fp3.dts | 18 ++
> 1 file changed, 18 insertion
The VHOST_NEW_WORKER requires the inherit_owner
setting to be true. So we need to add a check for this.
Signed-off-by: Cindy Lu
---
drivers/vhost/vhost.c | 7 +++
1 file changed, 7 insertions(+)
diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c
index 45d8f5c5bca9..26da561c6685 1006
Add a new UAPI to enable setting the vhost device to task mode.
The userspace application can use VHOST_SET_INHERIT_FROM_OWNER
to configure the mode if necessary.
This setting must be applied before VHOST_SET_OWNER, as the worker
will be created in the VHOST_SET_OWNER function
Signed-off-by: Cindy
This commit restores the previously removed functions kthread_wakeup and
kthread_stop, and introduces a new ops structure to handle worker wakeup,
stop, and creation. The function vhost_worker_create initializes these
ops pointers based on the inherit_owner value.
Signed-off-by: Cindy Lu
---
dri
Add the previously removed function vhost_worker() back
to support the kthread and rename it to vhost_run_work_kthread_list.
The old function vhost_worker was change to support task in
commit 6e890c5d5021 ("vhost: use vhost_tasks for worker threads")
change to xarray in
commit 1cdaafa1b8b4 ("vhost
Add back the previously removed cgroup function to support the kthread
The biggest change for this part is in vhost_attach_cgroups() and
vhost_attach_task_to_cgroups().
Reuse the function __vhost_worker_flush, but in this situation, the
attachment_cnt is 0. Therefore, add a boolean to disable this
The vhost now uses vhost_task and workers as a child of the owner thread.
While this aligns with containerization principles,it confuses some legacy
userspace app, Therefore, we are reintroducing kthread API support.
Introduce a new parameter to enable users to choose between
kthread and task mode
In commit 6e890c5d5021 ("vhost: use vhost_tasks for worker threads"),
the vhost now uses vhost_task and operates as a child of the
owner thread. This aligns with containerization principles.
However, this change has caused confusion for some legacy
userspace applications. Therefore, we
Thanks for the review! I'll split this up. Do you think it's better as two
patchsets -- one for stability/deflaking, one for return value and output
cleanup -- or as a single patchset with several commits?
> To be clear - are you running this over veth or a real device?
Over a veth.
>> Set the d
> Yes, the kernel will handle the 'fd' cleanup automatically, but
> the existing implementation already closes it before exiting.
^^^
Whoops! I meant 'returning' there.
Wording issue on my part :P
We're referring to the same thing!
Thanks
53 matches
Mail list logo