Re: [PATCH net-next v4 1/3] vsock: add support for SIOCOUTQ ioctl

2024-07-31 Thread Stefano Garzarella
On Tue, Jul 30, 2024 at 09:43:06PM GMT, Luigi Leonardi via B4 Relay wrote: From: Luigi Leonardi Add support for ioctl(s) in AF_VSOCK. The only ioctl available is SIOCOUTQ/TIOCOUTQ, which returns the number of unsent bytes in the socket. This information is transport-specific and is delegated to

Re: [PATCH net-next v4 2/3] vsock/virtio: add SIOCOUTQ support for all virtio based transports

2024-07-31 Thread Stefano Garzarella
On Tue, Jul 30, 2024 at 09:43:07PM GMT, Luigi Leonardi via B4 Relay wrote: From: Luigi Leonardi Introduce support for virtio_transport_unsent_bytes ioctl for virtio_transport, vhost_vsock and vsock_loopback. For all transports the unsent bytes counter is incremented in virtio_transport_get_cre

Re: [PATCH net-next v4 3/3] test/vsock: add ioctl unsent bytes test

2024-07-31 Thread Stefano Garzarella
On Tue, Jul 30, 2024 at 09:43:08PM GMT, Luigi Leonardi via B4 Relay wrote: From: Luigi Leonardi Introduce two tests, one for SOCK_STREAM and one for SOCK_SEQPACKET, which use SIOCOUTQ ioctl to check that the number of unsent bytes is zero after delivering a packet. vsock_connect and vsock_acce

Re: [PATCH net-next v4 2/2] vsock/virtio: avoid queuing packets when intermediate queue is empty

2024-07-31 Thread Stefano Garzarella
On Tue, Jul 30, 2024 at 09:47:32PM GMT, Luigi Leonardi via B4 Relay wrote: From: Luigi Leonardi When the driver needs to send new packets to the device, it always queues the new sk_buffs into an intermediate queue (send_pkt_queue) and schedules a worker (send_pkt_work) to then queue them into t

Re: [PATCH v2 5/5] uprobes: make uprobe_register() return struct uprobe *

2024-07-31 Thread Oleg Nesterov
On 07/31, Masami Hiramatsu wrote: > > On Mon, 29 Jul 2024 15:45:35 +0200 > Oleg Nesterov wrote: > > > This way uprobe_unregister() and uprobe_apply() can use "struct uprobe *" > > rather than inode + offset. This simplifies the code and allows to avoid > > the unnecessary find_uprobe() + put_uprob

[PATCH] tracing: Replace strncpy() with strscpy() when copying comm

2024-07-31 Thread Jinjie Ruan
Replace the depreciated[1] strncpy() calls with strscpy() when copying comm. Link: https://github.com/KSPP/linux/issues/90 [1] Signed-off-by: Jinjie Ruan --- kernel/trace/trace.c | 2 +- kernel/trace/trace_events_hist.c | 4 ++-- kernel/trace/trace_sched_switch.c | 2 +- 3 files ch

Re: [PATCH v2 4/5] uprobes: kill uprobe_register_refctr()

2024-07-31 Thread Oleg Nesterov
On 07/31, Masami Hiramatsu wrote: > > OK, but it seems > > tools/testing/selftests/bpf/bpf_testmod/bpf_testmod.c > > is still using uprobe_register_refctr(). > > That should be updated too. OOPS, thanks a lot :/ I'll send v3 with the additional change below in reply to 4/5 in a minute. Masami, P

[PATCH v3 4/5] uprobes: kill uprobe_register_refctr()

2024-07-31 Thread Oleg Nesterov
It doesn't make any sense to have 2 versions of _register(). Note that trace_uprobe_enable(), the only user of uprobe_register(), doesn't need to check tu->ref_ctr_offset to decide which one should be used, it could safely pass ref_ctr_offset == 0 to uprobe_register_refctr(). Add this argument to

[PATCH v2 0/6] rtla: Support idle state disabling via libcpupower in timerlat

2024-07-31 Thread tglozar
From: Tomas Glozar rtla-timerlat allows reducing latency on wake up from idle by setting /dev/cpu_dma_latency during the timerlat measurement. This has an effect on the idle states of all CPUs, including those which are not used by timerlat. Add option --deepest-idle-state that allows limiting t

[PATCH v2 1/6] tools/build: Add libcpupower dependency detection

2024-07-31 Thread tglozar
From: Tomas Glozar Add the ability to detect the presence of libcpupower on a system to the Makefiles in tools/build. Signed-off-by: Tomas Glozar --- tools/build/Makefile.feature | 1 + tools/build/feature/Makefile | 4 2 files changed, 5 insertions(+) diff --git a/tools/build/Makefile.f

[PATCH v2 2/6] rtla: Add optional dependency on libcpupower

2024-07-31 Thread tglozar
From: Tomas Glozar If libcpupower is present, set HAVE_LIBCPUPOWER_SUPPORT macro to allow features depending on libcpupower in rtla. Signed-off-by: Tomas Glozar --- tools/tracing/rtla/Makefile| 2 ++ tools/tracing/rtla/Makefile.config | 10 ++ 2 files changed, 12 insertions(+)

[PATCH v2 4/6] rtla/timerlat: Add --deepest-idle-state for top

2024-07-31 Thread tglozar
From: Tomas Glozar Add option to limit deepest idle state on CPUs where timerlat is running for the duration of the workload. Signed-off-by: Tomas Glozar --- tools/tracing/rtla/src/timerlat_top.c | 46 ++- 1 file changed, 45 insertions(+), 1 deletion(-) diff --git a/to

[PATCH v2 3/6] rtla/utils: Add idle state disabling via libcpupower

2024-07-31 Thread tglozar
From: Tomas Glozar Add functions to utils.c to disable idle states through functions of libcpupower. This will serve as the basis for disabling idle states per cpu when running timerlat. Signed-off-by: Tomas Glozar --- tools/tracing/rtla/src/utils.c | 140 + too

[PATCH v2 6/6] rtla: Documentation: Mention --deepest-idle-state

2024-07-31 Thread tglozar
From: Tomas Glozar Add --deepest-idle-state to manpage and mention libcpupower dependency in README.txt. Signed-off-by: Tomas Glozar --- Documentation/tools/rtla/common_timerlat_options.rst | 8 tools/tracing/rtla/README.txt| 4 2 files changed, 12 inserti

[PATCH v2 5/6] rtla/timerlat: Add --deepest-idle-state for hist

2024-07-31 Thread tglozar
From: Tomas Glozar Support limiting deepest idle state also for timerlat-hist. Signed-off-by: Tomas Glozar --- tools/tracing/rtla/src/timerlat_hist.c | 46 +- 1 file changed, 45 insertions(+), 1 deletion(-) diff --git a/tools/tracing/rtla/src/timerlat_hist.c b/tools/t

Re: [PATCH 0/3] uprobes: simplify _unregister paths

2024-07-31 Thread Google
On Tue, 30 Jul 2024 14:34:21 +0200 Oleg Nesterov wrote: > On top of > > [PATCH v2 0/5] uprobes: misc cleanups/simplifications > https://lore.kernel.org/all/2024072913.ga12...@redhat.com/ > > I sent yesterday. > OK, this series looks good to me. Acked-by: Masami Hiramatsu (Goo

[PATCH] uprobes: Remove redundant spinlock in uprobe_deny_signal

2024-07-31 Thread Liao Chang
Since clearing a bit in thread_info is an atomic operation, the spinlock is redundant and can be removed, reducing lock contention is good for performance. Signed-off-by: Liao Chang --- kernel/events/uprobes.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/kernel/events/uprobes.c b/kernel/

[PATCH] LoongArch: Revert qspinlock to test-and-set on VMs

2024-07-31 Thread Bibo Mao
Similar with x86, when VM is detected, revert to a simple test-and-set lock to avoid the horrors of queue preemption. Tested on 3C5000 Dual-way machine with 32 cores and 2 numa nodes, test case is kcbench on kernel mainline 6.10, the detailed command is "kcbench --src /root/src/linux" Performance

Re: [PATCH v3 02/11] arm64: dts: qcom: sm6115-pro1x: Add PCA9534 IO Expander

2024-07-31 Thread Caleb Connolly
On 31/07/2024 08:18, Dang Huynh wrote: F(x)tec Pro1X comes with PCA9534 IO Expander, it is used for enabling touch screen VDD/VDDIO and keyboard's caps lock LED. Reviewed-by: Konrad Dybcio Signed-off-by: Dang Huynh --- arch/arm64/boot/dts/qcom/sm6115-fxtec-pro1x.dts | 21 +

[PATCH v2 0/2] Support multiple reserved memory regions

2024-07-31 Thread Shun-yi Wang
From: "shun-yi.wang" Besides the reserved memory region for SCP, there are additional reserved memory regions for specific hardware use. Currently, only a single memory region is supported. Modifications are made to support multiple memory regions. Changes in v2: - Modify description of memory

[PATCH v2 1/2] dt-bindings: remoteproc: Support multiple reserved memory regions

2024-07-31 Thread Shun-yi Wang
From: "shun-yi.wang" Remove the maximum number of 1 for memory regions. Instead, add some descriptions to ensure the integrity of the documentation. Signed-off-by: shun-yi.wang --- Documentation/devicetree/bindings/remoteproc/mtk,scp.yaml | 8 ++-- 1 file changed, 6 insertions(+), 2 deleti

[PATCH v2 2/2] remoteproc: mediatek: Support multiple reserved memory regions

2024-07-31 Thread Shun-yi Wang
From: "shun-yi.wang" SCP supports multiple reserved memory regions, intended for specific hardwards. Signed-off-by: shun-yi.wang --- drivers/remoteproc/mtk_scp.c | 27 ++- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/drivers/remoteproc/mtk_scp.c b/driv

Re: [PATCH] x86/cpufeatures: SGX: Adjust the error message when BIOS does not support SGX

2024-07-31 Thread Huang, Kai
On Wed, 2024-07-31 at 11:22 +0800, WangYuli wrote: > On 2024/7/30 19:57, Huang, Kai wrote: > > > +linux-sgx list, Jarkko, Haitao. > > > > This message is only printed when SGX is reported in CPUID but is not > > enabled in the FEAT_CTL MSR. I can only recall this can happen when the > > BIOS act

[PATCH] nvdimm/pmem: Set dax flag for all 'PFN_MAP' cases

2024-07-31 Thread Zhihao Cheng
The dax is only supportted on pfn type pmem devices since commit f467fee48da4 ("block: move the dax flag to queue_limits"), fix it by adding dax flag setting for the missed case. Fixes: f467fee48da4 ("block: move the dax flag to queue_limits") Signed-off-by: Zhihao Cheng --- drivers/nvdimm/pmem.

Re: [PATCH v2 1/2] dt-bindings: remoteproc: Support multiple reserved memory regions

2024-07-31 Thread Krzysztof Kozlowski
On 31/07/2024 14:17, Shun-yi Wang wrote: > From: "shun-yi.wang" > > Remove the maximum number of 1 for memory regions. Why? > Instead, add some descriptions to ensure the integrity > of the documentation. What? How is this related? > > Signed-off-by: shun-yi.wang > --- > Documentation/devi

[PATCH net-next v12 04/14] mm: page_frag: add '_va' suffix to page_frag API

2024-07-31 Thread Yunsheng Lin
Currently the page_frag API is returning 'virtual address' or 'va' when allocing and expecting 'virtual address' or 'va' as input when freeing. As we are about to support new use cases that the caller need to deal with 'struct page' or need to deal with both 'va' and 'struct page'. In order to dif

[PATCH net-next v12 05/14] mm: page_frag: avoid caller accessing 'page_frag_cache' directly

2024-07-31 Thread Yunsheng Lin
Use appropriate frag_page API instead of caller accessing 'page_frag_cache' directly. CC: Alexander Duyck Signed-off-by: Yunsheng Lin Reviewed-by: Alexander Duyck --- drivers/vhost/net.c | 2 +- include/linux/page_frag_cache.h | 10 ++ mm/page_frag_test.c | 2

Re: [PATCH net-next v12 04/14] mm: page_frag: add '_va' suffix to page_frag API

2024-07-31 Thread Chuck Lever
On Wed, Jul 31, 2024 at 08:44:54PM +0800, Yunsheng Lin wrote: > Currently the page_frag API is returning 'virtual address' > or 'va' when allocing and expecting 'virtual address' or > 'va' as input when freeing. > > As we are about to support new use cases that the caller > need to deal with 'stru

Re: [PATCH net-next v12 05/14] mm: page_frag: avoid caller accessing 'page_frag_cache' directly

2024-07-31 Thread Chuck Lever
On Wed, Jul 31, 2024 at 08:44:55PM +0800, Yunsheng Lin wrote: > Use appropriate frag_page API instead of caller accessing > 'page_frag_cache' directly. > > CC: Alexander Duyck > Signed-off-by: Yunsheng Lin > Reviewed-by: Alexander Duyck For the net/sunrpc/svcsock.c hunk: Acked-by: Chuck Lever

Re: [PATCH v2 1/2] dt-bindings: remoteproc: Support multiple reserved memory regions

2024-07-31 Thread 王順億
Hi Krzysztof, Thanks for the reviews. On Wed, 2024-07-31 at 14:40 +0200, Krzysztof Kozlowski wrote: > > External email : Please do not click links or open attachments until > you have verified the sender or the content. > On 31/07/2024 14:17, Shun-yi Wang wrote: > > From: "shun-yi.wang"

Re: [PATCH v2 1/2] dt-bindings: remoteproc: Support multiple reserved memory regions

2024-07-31 Thread Krzysztof Kozlowski
On 31/07/2024 15:41, Shun-Yi Wang (王順億) wrote: > Hi Krzysztof, > > Thanks for the reviews. > > On Wed, 2024-07-31 at 14:40 +0200, Krzysztof Kozlowski wrote: >> >> External email : Please do not click links or open attachments until >> you have verified the sender or the content. >> On 31/

Re: [PATCH] uprobes: Remove redundant spinlock in uprobe_deny_signal

2024-07-31 Thread Oleg Nesterov
On 07/31, Liao Chang wrote: > > --- a/kernel/events/uprobes.c > +++ b/kernel/events/uprobes.c > @@ -1979,9 +1979,7 @@ bool uprobe_deny_signal(void) > WARN_ON_ONCE(utask->state != UTASK_SSTEP); > > if (task_sigpending(t)) { > - spin_lock_irq(&t->sighand->siglock); >

Re: [PATCH v11 00/12] Initial Marvell PXA1908 support

2024-07-31 Thread Rob Herring (Arm)
On Tue, 30 Jul 2024 12:25:08 +0200, Duje Mihanović wrote: > Hello, > > This series adds initial support for the Marvell PXA1908 SoC and > "samsung,coreprimevelte", a smartphone using the SoC. > > USB works and the phone can boot a rootfs from an SD card, but there are > some warnings in the dme

[PATCH v2] x86/cpu: Adjust the error message when BIOS does not support SGX

2024-07-31 Thread WangYuli
When SGX is not supported by the BIOS, the kernel log still output the error 'SGX disabled by BIOS', which can be confusing since there might not be an SGX-related option in the BIOS settings. As a kernel, it's difficult to distinguish between the BIOS not supporting SGX and the BIOS supporting SG

Re: [PATCH v2 3/6] rtla/utils: Add idle state disabling via libcpupower

2024-07-31 Thread Steven Rostedt
On Wed, 31 Jul 2024 10:36:52 +0200 tglo...@redhat.com wrote: > From: Tomas Glozar > > Add functions to utils.c to disable idle states through functions of > libcpupower. This will serve as the basis for disabling idle states > per cpu when running timerlat. > > Signed-off-by: Tomas Glozar > --

Re: [PATCH v2 4/6] rtla/timerlat: Add --deepest-idle-state for top

2024-07-31 Thread Steven Rostedt
On Wed, 31 Jul 2024 10:36:53 +0200 tglo...@redhat.com wrote: > From: Tomas Glozar > > Add option to limit deepest idle state on CPUs where timerlat is running > for the duration of the workload. > > Signed-off-by: Tomas Glozar > --- > tools/tracing/rtla/src/timerlat_top.c | 46 +++

Re: [PATCH] nvdimm/pmem: Set dax flag for all 'PFN_MAP' cases

2024-07-31 Thread Christoph Hellwig
Looks good: Reviewed-by: Christoph Hellwig

Re: [PATCH v4 2/2] rust: add tracepoint support

2024-07-31 Thread Steven Rostedt
On Tue, 30 Jul 2024 11:35:27 +0100 Gary Guo wrote: > > +/* > > + * Declare an exported function that Rust code can call to trigger this > > + * tracepoint. This function does not include the static branch; that is > > done > > + * in Rust to avoid a function call when the tracepoint is disabled.

Re: [PATCH v2 5/5] uprobes: make uprobe_register() return struct uprobe *

2024-07-31 Thread Andrii Nakryiko
On Mon, Jul 29, 2024 at 6:45 AM Oleg Nesterov wrote: > > This way uprobe_unregister() and uprobe_apply() can use "struct uprobe *" > rather than inode + offset. This simplifies the code and allows to avoid > the unnecessary find_uprobe() + put_uprobe() in these functions. > > TODO: uprobe_unregist

Re: [PATCH v2 1/2] dt-bindings: remoteproc: Support multiple reserved memory regions

2024-07-31 Thread Krzysztof Kozlowski
On 31/07/2024 15:54, Krzysztof Kozlowski wrote: > On 31/07/2024 15:41, Shun-Yi Wang (王順億) wrote: >> Hi Krzysztof, >> >> Thanks for the reviews. >> >> On Wed, 2024-07-31 at 14:40 +0200, Krzysztof Kozlowski wrote: >>> >>> External email : Please do not click links or open attachments until >>>

Re: [PATCH v2 5/5] uprobes: make uprobe_register() return struct uprobe *

2024-07-31 Thread Peter Zijlstra
On Wed, Jul 31, 2024 at 09:18:00AM -0700, Andrii Nakryiko wrote: > On Mon, Jul 29, 2024 at 6:45 AM Oleg Nesterov wrote: > > > > This way uprobe_unregister() and uprobe_apply() can use "struct uprobe *" > > rather than inode + offset. This simplifies the code and allows to avoid > > the unnecessary

Re: [PATCH v2 5/5] uprobes: make uprobe_register() return struct uprobe *

2024-07-31 Thread Andrii Nakryiko
On Wed, Jul 31, 2024 at 9:56 AM Peter Zijlstra wrote: > > On Wed, Jul 31, 2024 at 09:18:00AM -0700, Andrii Nakryiko wrote: > > On Mon, Jul 29, 2024 at 6:45 AM Oleg Nesterov wrote: > > > > > > This way uprobe_unregister() and uprobe_apply() can use "struct uprobe *" > > > rather than inode + offse

Re: [PATCH v4 1/2] rust: add static_key_false

2024-07-31 Thread Peter Zijlstra
On Fri, Jun 28, 2024 at 01:23:31PM +, Alice Ryhl wrote: > rust/kernel/arch/arm64/jump_label.rs | 34 > rust/kernel/arch/loongarch/jump_label.rs | 35 + > rust/kernel/arch/mod.rs | 24 > rust/ker

Re: [PATCH v2 5/5] uprobes: make uprobe_register() return struct uprobe *

2024-07-31 Thread Peter Zijlstra
On Wed, Jul 31, 2024 at 10:01:47AM -0700, Andrii Nakryiko wrote: > On Wed, Jul 31, 2024 at 9:56 AM Peter Zijlstra wrote: > > > > On Wed, Jul 31, 2024 at 09:18:00AM -0700, Andrii Nakryiko wrote: > > > On Mon, Jul 29, 2024 at 6:45 AM Oleg Nesterov wrote: > > > > > > > > This way uprobe_unregister()

Re: [PATCH v2 5/5] uprobes: make uprobe_register() return struct uprobe *

2024-07-31 Thread Andrii Nakryiko
On Wed, Jul 31, 2024 at 10:05 AM Peter Zijlstra wrote: > > On Wed, Jul 31, 2024 at 10:01:47AM -0700, Andrii Nakryiko wrote: > > On Wed, Jul 31, 2024 at 9:56 AM Peter Zijlstra wrote: > > > > > > On Wed, Jul 31, 2024 at 09:18:00AM -0700, Andrii Nakryiko wrote: > > > > On Mon, Jul 29, 2024 at 6:45 A

Re: [PATCH v2 5/5] uprobes: make uprobe_register() return struct uprobe *

2024-07-31 Thread Oleg Nesterov
On 07/31, Peter Zijlstra wrote: > > On Wed, Jul 31, 2024 at 10:01:47AM -0700, Andrii Nakryiko wrote: > > > Do I stuff this on top of Oleg's patch or do you want me to fold it in > > > one of them? > > > > Please fold so we have better (potential) bisectability of BPF > > selftests, thanks! > > Fold

Re: [PATCH v2 5/5] uprobes: make uprobe_register() return struct uprobe *

2024-07-31 Thread Oleg Nesterov
On 07/31, Andrii Nakryiko wrote: > > My expectation was that Oleg will > just incorporate that by hand and will send the final v4 patch set. Will do tomorrow, thanks. Oleg.

Re: [PATCH net-next v12 04/14] mm: page_frag: add '_va' suffix to page_frag API

2024-07-31 Thread Alexander Duyck
On Wed, Jul 31, 2024 at 5:50 AM Yunsheng Lin wrote: > > Currently the page_frag API is returning 'virtual address' > or 'va' when allocing and expecting 'virtual address' or > 'va' as input when freeing. > > As we are about to support new use cases that the caller > need to deal with 'struct page'

Re: [PATCH v4 2/2] rust: add tracepoint support

2024-07-31 Thread Benno Lossin
On 28.06.24 15:23, Alice Ryhl wrote: > diff --git a/rust/kernel/tracepoint.rs b/rust/kernel/tracepoint.rs > new file mode 100644 > index ..1005f09e0330 > --- /dev/null > +++ b/rust/kernel/tracepoint.rs > @@ -0,0 +1,47 @@ > +// SPDX-License-Identifier: GPL-2.0 > + > +// Copyright (C) 202

[PATCH] remoteproc: Use of_property_present()

2024-07-31 Thread Rob Herring (Arm)
Use of_property_present() to test for property presence rather than of_(find|get)_property(). This is part of a larger effort to remove callers of of_find_property() and similar functions. of_find_property() leaks the DT struct property and data pointers which is a problem for dynamically allocated

[PATCH] nvdimm: Use of_property_present() and of_property_read_bool()

2024-07-31 Thread Rob Herring (Arm)
Use of_property_present() and of_property_read_bool() to test property presence and read boolean properties rather than of_(find|get)_property(). This is part of a larger effort to remove callers of of_find_property() and similar functions. of_(find|get)_property() leak the DT struct property and d

Re: [PATCH v2] x86/cpu: Adjust the error message when BIOS does not support SGX

2024-07-31 Thread Thomas Gleixner
On Wed, Jul 31 2024 at 23:30, wangy...@uniontech.com wrote: > When SGX is not supported by the BIOS, the kernel log still output > the error 'SGX disabled by BIOS', which can be confusing since > there might not be an SGX-related option in the BIOS settings. > > As a kernel, it's difficult to disti

Re: [PATCH 00/15] Implement MODVERSIONS for Rust

2024-07-31 Thread Neal Gompa
On Friday, July 26, 2024 5:05:22 PM EDT Sami Tolvanen wrote: > Hi Petr, > > On Mon, Jul 22, 2024 at 8:20 AM Petr Pavlu wrote: > > From my perspective, I'm okay if gendwarfksyms doesn't provide > > functionality to compare a new object file with its reference symtypes > > file. > > > > As mention

Re: [PATCH V4 net-next 3/3] virtio-net: synchronize operstate with admin state on up/down

2024-07-31 Thread Michael S. Tsirkin
On Wed, Jul 31, 2024 at 10:59:47AM +0800, Jason Wang wrote: > This patch synchronize operstate with admin state per RFC2863. > > This is done by trying to toggle the carrier upon open/close and > synchronize with the config change work. This allows propagate status > correctly to stacked devices l

Re: [PATCH v4 1/2] rust: add static_key_false

2024-07-31 Thread Alice Ryhl
On Wed, Jul 31, 2024 at 7:05 PM Peter Zijlstra wrote: > > On Fri, Jun 28, 2024 at 01:23:31PM +, Alice Ryhl wrote: > > > rust/kernel/arch/arm64/jump_label.rs | 34 > > rust/kernel/arch/loongarch/jump_label.rs | 35 + > > rust/kernel/

[PATCH 0/8] uprobes: RCU-protected hot path optimizations

2024-07-31 Thread Andrii Nakryiko
This patch set is heavily inspired by Peter Zijlstra's uprobe optimization patches ([0]) and continue that work, albeit trying to keep complexity to the minimum, and attepting to reuse existing primitives as much as possible. The goal here is to optimize obvious uprobe triggering hot path, while ke

[PATCH 1/8] rbtree: provide rb_find_rcu() / rb_find_add_rcu()

2024-07-31 Thread Andrii Nakryiko
From: Peter Zijlstra Much like latch_tree, add two RCU methods for the regular RB-tree, which can be used in conjunction with a seqcount to provide lockless lookups. Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Masami Hiramatsu (Google) --- include/linux/rbtree.h | 67 ++

[PATCH 2/8] uprobes: revamp uprobe refcounting and lifetime management

2024-07-31 Thread Andrii Nakryiko
Revamp how struct uprobe is refcounted, and thus how its lifetime is managed. Right now, there are a few possible "owners" of uprobe refcount: - uprobes_tree RB tree assumes one refcount when uprobe is registered and added to the lookup tree; - while uprobe is triggered and kernel is handl

[PATCH 3/8] uprobes: protected uprobe lifetime with SRCU

2024-07-31 Thread Andrii Nakryiko
To avoid unnecessarily taking a (brief) refcount on uprobe during breakpoint handling in handle_swbp for entry uprobes, make find_uprobe() not take refcount, but protect the lifetime of a uprobe instance with RCU. This improves scalability, as refcount gets quite expensive due to cache line bouncin

[PATCH 4/8] uprobes: get rid of enum uprobe_filter_ctx in uprobe filter callbacks

2024-07-31 Thread Andrii Nakryiko
It serves no purpose beyond adding unnecessray argument passed to the filter callback. Just get rid of it, no one is actually using it. Signed-off-by: Andrii Nakryiko --- include/linux/uprobes.h | 10 +- kernel/events/uprobes.c | 18 +++--- kernel/trace/bpf_trace.c

[PATCH 5/8] uprobes: travers uprobe's consumer list locklessly under SRCU protection

2024-07-31 Thread Andrii Nakryiko
uprobe->register_rwsem is one of a few big bottlenecks to scalability of uprobes, so we need to get rid of it to improve uprobe performance and multi-CPU scalability. First, we turn uprobe's consumer list to a typical doubly-linked list and utilize existing RCU-aware helpers for traversing such li

[PATCH 6/8] perf/uprobe: split uprobe_unregister()

2024-07-31 Thread Andrii Nakryiko
From: Peter Zijlstra With uprobe_unregister() having grown a synchronize_srcu(), it becomes fairly slow to call. Esp. since both users of this API call it in a loop. Peel off the sync_srcu() and do it once, after the loop. With recent uprobe_register()'s error handling reusing full uprobe_unreg

[PATCH 7/8] uprobes: perform lockless SRCU-protected uprobes_tree lookup

2024-07-31 Thread Andrii Nakryiko
Another big bottleneck to scalablity is uprobe_treelock that's taken in a very hot path in handle_swbp(). Now that uprobes are SRCU-protected, take advantage of that and make uprobes_tree RB-tree look up lockless. To make RB-tree RCU-protected lockless lookup correct, we need to take into account

[PATCH 8/8] uprobes: switch to RCU Tasks Trace flavor for better performance

2024-07-31 Thread Andrii Nakryiko
This patch switches uprobes SRCU usage to RCU Tasks Trace flavor, which is optimized for more lightweight and quick readers (at the expense of slower writers, which for uprobes is a fine tradeof) and has better performance and scalability with number of CPUs. Similarly to baseline vs SRCU, we've b

Re: [PATCH v2 2/5] dt-bindings: soc: qcom: smd-rpm: add generic compatibles

2024-07-31 Thread Stephen Boyd
Quoting Dmitry Baryshkov (2024-07-29 12:52:15) > Add two generic compatibles to all smd-rpm devices, they follow the same > RPMSG protocol and are either accessed through the smd-edge or through > the glink-edge. > > Signed-off-by: Dmitry Baryshkov > --- Acked-by: Stephen Boyd

[PATCH AUTOSEL 6.10 057/121] remoteproc: mediatek: Zero out only remaining bytes of IPI buffer

2024-07-31 Thread Sasha Levin
From: AngeloGioacchino Del Regno [ Upstream commit 9dbd9962cfe56d210be5232349851420b5f9c8f6 ] In scp_ipi_handler(), instead of zeroing out the entire shared buffer, which may be as large as 600 bytes, overwrite it with the received data, then zero out only the remaining bytes. Signed-off-by: An

[PATCH AUTOSEL 6.10 061/121] remoteproc: qcom_q6v5_pas: Add hwspinlock bust on stop

2024-07-31 Thread Sasha Levin
From: Richard Maina [ Upstream commit 568b13b65078e2b557ccf47674a354cecd1db641 ] When remoteproc goes down unexpectedly this results in a state where any acquired hwspinlocks will remain locked possibly resulting in deadlock. In order to ensure all locks are freed we include a call to qcom_smem_

[PATCH AUTOSEL 6.10 111/121] virtio_ring: fix KMSAN error for premapped mode

2024-07-31 Thread Sasha Levin
From: Xuan Zhuo [ Upstream commit 840b2d39a2dc1b96deb3f5c7fef76c9b24f08f51 ] Add kmsan for virtqueue_dma_map_single_attrs to fix: BUG: KMSAN: uninit-value in receive_buf+0x45ca/0x6990 receive_buf+0x45ca/0x6990 virtnet_poll+0x17e0/0x3130 net_rx_action+0x832/0x26e0 handle_softirqs+0x330/0x10f

[PATCH AUTOSEL 6.6 75/83] virtio_ring: fix KMSAN error for premapped mode

2024-07-31 Thread Sasha Levin
From: Xuan Zhuo [ Upstream commit 840b2d39a2dc1b96deb3f5c7fef76c9b24f08f51 ] Add kmsan for virtqueue_dma_map_single_attrs to fix: BUG: KMSAN: uninit-value in receive_buf+0x45ca/0x6990 receive_buf+0x45ca/0x6990 virtnet_poll+0x17e0/0x3130 net_rx_action+0x832/0x26e0 handle_softirqs+0x330/0x10f

Re: [PATCH V4 net-next 3/3] virtio-net: synchronize operstate with admin state on up/down

2024-07-31 Thread Jason Wang
On Thu, Aug 1, 2024 at 5:26 AM Michael S. Tsirkin wrote: > > On Wed, Jul 31, 2024 at 10:59:47AM +0800, Jason Wang wrote: > > This patch synchronize operstate with admin state per RFC2863. > > > > This is done by trying to toggle the carrier upon open/close and > > synchronize with the config chang

RE: [PATCH] remoteproc: Use of_property_present()

2024-07-31 Thread Peng Fan
> Subject: [PATCH] remoteproc: Use of_property_present() > > Use of_property_present() to test for property presence rather than > of_(find|get)_property(). This is part of a larger effort to remove callers > of of_find_property() and similar functions. of_find_property() leaks the > DT struct pro

Re: [PATCH v3 00/11] F(x)tec Pro1X feature expansion

2024-07-31 Thread Bjorn Andersson
On Wed, 31 Jul 2024 13:18:41 +0700, Dang Huynh wrote: > This patch series expand F(x)tec Pro1X (QX1050) device tree to support > various components of the device. > > Most notably: > + SD Card slot > + Touchscreen > + MDSS, DRM display panel > + WLAN (ATH10K) > + Hall sensor and camera button >

Re: [PATCH] arm64: dts: qcom: msm8916-samsung-fortuna: Add touch keys

2024-07-31 Thread Bjorn Andersson
On Wed, 24 Jul 2024 14:32:51 +, Raymond Hackley wrote: > Touch keys feature on fortuna phones are provided by Zinitix touchscreen. > Add property linux,keycodes to enable touch keys. > > Applied, thanks! [1/1] arm64: dts: qcom: msm8916-samsung-fortuna: Add touch keys commit: ccf683f

[PATCH v4 0/4] Add SBAF test to IFS

2024-07-31 Thread Kuppuswamy Sathyanarayanan
This patch series adds support for Structural Based Functional Test at Field (SBAF) in the IFS driver. SBAF is a new type of testing that provides comprehensive core test coverage, complementing existing IFS tests like Scan at Field (SAF) and ArrayBist. Granite Rapids (GNR) is the first platform th

[PATCH v4 1/4] platform/x86/intel/ifs: Refactor MSR usage in IFS test code

2024-07-31 Thread Kuppuswamy Sathyanarayanan
IFS tests such as Scan at Field (SAF) or Structural Based Functional Test at Field (SBAF), require the user to load a test image. The image loading process is similar across these tests, with the only difference being MSR addresses used. To reuse the code between these tests, remove the hard coding

[PATCH v4 2/4] platform/x86/intel/ifs: Add SBAF test image loading support

2024-07-31 Thread Kuppuswamy Sathyanarayanan
From: Jithu Joseph Structural Based Functional Test at Field (SBAF) is a new type of testing that provides comprehensive core test coverage complementing existing IFS tests like Scan at Field (SAF) or ArrayBist. SBAF device will appear as a new device instance (intel_ifs_2) under /sys/devices/vi

[PATCH v4 3/4] platform/x86/intel/ifs: Add SBAF test support

2024-07-31 Thread Kuppuswamy Sathyanarayanan
From: Jithu Joseph In a core, the SBAF test engine is shared between sibling CPUs. An SBAF test image contains multiple bundles. Each bundle is further composed of subunits called programs. When a SBAF test (for a particular core) is triggered by the user, each SBAF bundle from the loaded test i

[PATCH v4 4/4] trace: platform/x86/intel/ifs: Add SBAF trace support

2024-07-31 Thread Kuppuswamy Sathyanarayanan
From: Jithu Joseph Add tracing support for the SBAF IFS tests, which may be useful for debugging systems that fail these tests. Log details like test content batch number, SBAF bundle ID, program index and the exact errors or warnings encountered by each HT thread during the test. Reviewed-by: A

Re: [PATCH V4 net-next 3/3] virtio-net: synchronize operstate with admin state on up/down

2024-07-31 Thread Michael S. Tsirkin
On Thu, Aug 01, 2024 at 10:16:00AM +0800, Jason Wang wrote: > > > @@ -2885,6 +2886,25 @@ static void virtnet_cancel_dim(struct virtnet_info > > > *vi, struct dim *dim) > > > net_dim_work_cancel(dim); > > > } > > > > > > +static void virtnet_update_settings(struct virtnet_info *vi) > > > +{

Re: [PATCH V4 net-next 3/3] virtio-net: synchronize operstate with admin state on up/down

2024-07-31 Thread Michael S. Tsirkin
On Wed, Jul 31, 2024 at 10:59:47AM +0800, Jason Wang wrote: > This patch synchronize operstate with admin state per RFC2863. > > This is done by trying to toggle the carrier upon open/close and > synchronize with the config change work. This allows propagate status > correctly to stacked devices l

Re: [PATCH V4 net-next 3/3] virtio-net: synchronize operstate with admin state on up/down

2024-07-31 Thread Jason Wang
On Thu, Aug 1, 2024 at 1:58 PM Michael S. Tsirkin wrote: > > On Thu, Aug 01, 2024 at 10:16:00AM +0800, Jason Wang wrote: > > > > @@ -2885,6 +2886,25 @@ static void virtnet_cancel_dim(struct > > > > virtnet_info *vi, struct dim *dim) > > > > net_dim_work_cancel(dim); > > > > } > > > > > > >

Re: [PATCH V4 net-next 3/3] virtio-net: synchronize operstate with admin state on up/down

2024-07-31 Thread Jason Wang
On Thu, Aug 1, 2024 at 2:06 PM Michael S. Tsirkin wrote: > > On Wed, Jul 31, 2024 at 10:59:47AM +0800, Jason Wang wrote: > > This patch synchronize operstate with admin state per RFC2863. > > > > This is done by trying to toggle the carrier upon open/close and > > synchronize with the config chang

Re: [PATCH V4 net-next 3/3] virtio-net: synchronize operstate with admin state on up/down

2024-07-31 Thread Michael S. Tsirkin
On Thu, Aug 01, 2024 at 02:13:18PM +0800, Jason Wang wrote: > On Thu, Aug 1, 2024 at 1:58 PM Michael S. Tsirkin wrote: > > > > On Thu, Aug 01, 2024 at 10:16:00AM +0800, Jason Wang wrote: > > > > > @@ -2885,6 +2886,25 @@ static void virtnet_cancel_dim(struct > > > > > virtnet_info *vi, struct dim

Re: [PATCH V4 net-next 3/3] virtio-net: synchronize operstate with admin state on up/down

2024-07-31 Thread Michael S. Tsirkin
On Thu, Aug 01, 2024 at 02:13:49PM +0800, Jason Wang wrote: > On Thu, Aug 1, 2024 at 2:06 PM Michael S. Tsirkin wrote: > > > > On Wed, Jul 31, 2024 at 10:59:47AM +0800, Jason Wang wrote: > > > This patch synchronize operstate with admin state per RFC2863. > > > > > > This is done by trying to togg

Re: [PATCH V4 net-next 3/3] virtio-net: synchronize operstate with admin state on up/down

2024-07-31 Thread Jason Wang
On Thu, Aug 1, 2024 at 2:42 PM Michael S. Tsirkin wrote: > > On Thu, Aug 01, 2024 at 02:13:18PM +0800, Jason Wang wrote: > > On Thu, Aug 1, 2024 at 1:58 PM Michael S. Tsirkin wrote: > > > > > > On Thu, Aug 01, 2024 at 10:16:00AM +0800, Jason Wang wrote: > > > > > > @@ -2885,6 +2886,25 @@ static v

Re: [PATCH V4 net-next 3/3] virtio-net: synchronize operstate with admin state on up/down

2024-07-31 Thread Jason Wang
On Thu, Aug 1, 2024 at 2:43 PM Michael S. Tsirkin wrote: > > On Thu, Aug 01, 2024 at 02:13:49PM +0800, Jason Wang wrote: > > On Thu, Aug 1, 2024 at 2:06 PM Michael S. Tsirkin wrote: > > > > > > On Wed, Jul 31, 2024 at 10:59:47AM +0800, Jason Wang wrote: > > > > This patch synchronize operstate wi