Re: [PATCH 2/3] kallsyms: Add APIs to match symbol without .llmv. suffix.

2024-08-01 Thread Leizhen (ThunderTown)
On 2024/8/2 11:45, Song Liu wrote: > > >> On Aug 1, 2024, at 6:18 PM, Leizhen (ThunderTown) >> wrote: >> >> On 2024/7/31 9:00, Song Liu wrote: >>> Hi Masami, >>> On Jul 30, 2024, at 6:03 AM, Masami Hiramatsu wrote: On Mon, 29 Jul 2024 17:54:32 -0700 Song Liu wrote: >>>

Re: [RFC PATCH vhost] vhost-vdpa: Fix invalid irq bypass unregister

2024-08-01 Thread Dragos Tatulea
On Fri, 2024-08-02 at 11:29 +0800, Jason Wang wrote: > On Thu, Aug 1, 2024 at 11:38 PM Dragos Tatulea wrote: > > > > The following workflow triggers the crash referenced below: > > > > 1) vhost_vdpa_unsetup_vq_irq() unregisters the irq bypass producer > >but the producer->token is still vali

RE: [PATCH v2 2/2] remoteproc: imx_rproc: handle system off for i.MX7ULP

2024-08-01 Thread Peng Fan
> Subject: Re: [PATCH v2 2/2] remoteproc: imx_rproc: handle system off > for i.MX7ULP > > On Tue, Jul 30, 2024 at 08:06:22AM +, Peng Fan wrote: > > > Subject: Re: [PATCH v2 2/2] remoteproc: imx_rproc: handle system > off > > > for i.MX7ULP > > > > > > On Fri, Jul 19, 2024 at 04:49:04PM +0800,

Re: [PATCH 2/3] kallsyms: Add APIs to match symbol without .llmv. suffix.

2024-08-01 Thread Song Liu
> On Aug 1, 2024, at 6:18 PM, Leizhen (ThunderTown) > wrote: > > On 2024/7/31 9:00, Song Liu wrote: >> Hi Masami, >> >>> On Jul 30, 2024, at 6:03 AM, Masami Hiramatsu wrote: >>> >>> On Mon, 29 Jul 2024 17:54:32 -0700 >>> Song Liu wrote: >>> With CONFIG_LTO_CLANG=y, the compiler may

Re: [RFC PATCH vhost] vhost-vdpa: Fix invalid irq bypass unregister

2024-08-01 Thread Jason Wang
On Thu, Aug 1, 2024 at 11:38 PM Dragos Tatulea wrote: > > The following workflow triggers the crash referenced below: > > 1) vhost_vdpa_unsetup_vq_irq() unregisters the irq bypass producer >but the producer->token is still valid. > 2) vq context gets released and reassigned to another vq. Jus

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

2024-08-01 Thread Jason Wang
On Thu, Aug 1, 2024 at 3:00 PM Michael S. Tsirkin wrote: > > On Thu, Aug 01, 2024 at 02:55:10PM +0800, Jason Wang wrote: > > 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 Mich

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

2024-08-01 Thread Liao, Chang
在 2024/8/1 5:42, 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 up

Re: [PATCH] uprobes: Improve scalability by reducing the contention on siglock

2024-08-01 Thread Liao, Chang
在 2024/8/1 22:06, Oleg Nesterov 写道: > On 08/01, Liao Chang wrote: >> >> @@ -2276,22 +2277,25 @@ static void handle_singlestep(struct uprobe_task >> *utask, struct pt_regs *regs) >> int err = 0; >> >> uprobe = utask->active_uprobe; >> -if (utask->state == UTASK_SSTEP_ACK) >> +

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

2024-08-01 Thread Liao, Chang
在 2024/8/2 0:49, Andrii Nakryiko 写道: > On Thu, Aug 1, 2024 at 5:23 AM Liao, Chang wrote: >> >> >> >> 在 2024/8/1 5:42, Andrii Nakryiko 写道: >>> To avoid unnecessarily taking a (brief) refcount on uprobe during >>> breakpoint handling in handle_swbp for entry uprobes, make find_uprobe() >>> not ta

Re: [PATCH v4] x86/paravirt: Disable virt spinlock on bare metal

2024-08-01 Thread maobibo
Hi Chenyu, On 2024/8/1 下午10:40, Chen Yu wrote: Hi Bibo, On 2024-08-01 at 16:00:19 +0800, maobibo wrote: Chenyu, I do not know much about x86, just give some comments(probably incorrected) from the code. On 2024/7/29 下午2:52, Chen Yu wrote: X86_FEATURE_HYPERVISOR YYY N CON

Re: [PATCH 2/3] kallsyms: Add APIs to match symbol without .llmv. suffix.

2024-08-01 Thread Leizhen (ThunderTown)
On 2024/7/31 9:00, Song Liu wrote: > Hi Masami, > >> On Jul 30, 2024, at 6:03 AM, Masami Hiramatsu wrote: >> >> On Mon, 29 Jul 2024 17:54:32 -0700 >> Song Liu wrote: >> >>> With CONFIG_LTO_CLANG=y, the compiler may add suffix to function names >>> to avoid duplication. This causes confusion

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

2024-08-01 Thread Andrii Nakryiko
On Wed, Jul 31, 2024 at 2:43 PM Andrii Nakryiko wrote: > > 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

Re: [PATCH v4 0/9] uprobes: misc cleanups/simplifications

2024-08-01 Thread Andrii Nakryiko
On Thu, Aug 1, 2024 at 11:58 AM Andrii Nakryiko wrote: > > + bpf > > On Thu, Aug 1, 2024 at 6:36 AM Peter Zijlstra wrote: > > > > On Thu, Aug 01, 2024 at 03:26:38PM +0200, Oleg Nesterov wrote: > > > (Andrii, I'll try to look at your new series on Weekend). > > > > OK, I dropped all your previous

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

2024-08-01 Thread Sami Tolvanen
Hi Petr, On Thu, Aug 1, 2024 at 4:22 AM Petr Pavlu wrote: > > STG is an interesting tool. I've played with it a bit last year. To be > frank, I was surprised to see a new tool being proposed by Google to > generate modversion CRCs from DWARF instead of potentially extending > your STG project for

Re: [PATCH] rust: add `module_params` macro

2024-08-01 Thread Benno Lossin
On 01.08.24 17:11, Andreas Hindborg wrote: > "Benno Lossin" writes: >> On 01.08.24 15:40, Andreas Hindborg wrote: >>> "Benno Lossin" writes: On 01.08.24 13:29, Andreas Hindborg wrote: > "Benno Lossin" writes: >> On 05.07.24 13:15, Andreas Hindborg wrote: >>> + >>> +/// Types

Re: [PATCH v4 0/9] uprobes: misc cleanups/simplifications

2024-08-01 Thread Andrii Nakryiko
+ bpf On Thu, Aug 1, 2024 at 6:36 AM Peter Zijlstra wrote: > > On Thu, Aug 01, 2024 at 03:26:38PM +0200, Oleg Nesterov wrote: > > (Andrii, I'll try to look at your new series on Weekend). > > OK, I dropped all your previous patches and stuffed these in. > > They should all be visible in queue/per

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

2024-08-01 Thread Alice Ryhl
On Thu, Aug 1, 2024 at 12:28 PM Peter Zijlstra wrote: > > On Wed, Jul 31, 2024 at 11:34:13PM +0200, Alice Ryhl wrote: > > > > Please work harder to not have to duplicate stuff like this. > > > > I really didn't want to duplicate it, but it's very hard to find a > > performant alternative. Is there

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

2024-08-01 Thread Paul E. McKenney
On Thu, Aug 01, 2024 at 11:35:05AM +0200, Peter Zijlstra wrote: > On Wed, Jul 31, 2024 at 02:42:56PM -0700, Andrii Nakryiko wrote: > > 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 writer

[ANNOUNCE] 5.10.222-rt114

2024-08-01 Thread Luis Claudio R. Goncalves
Hello RT-list! I'm pleased to announce the 5.10.222-rt114 stable release. This release is just an update to the new stable 5.10.222 version and no RT specific changes have been made. You can get this release via the git tree at: git://git.kernel.org/pub/scm/linux/kernel/git/rt/linux-stable-rt

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

2024-08-01 Thread Andrii Nakryiko
On Thu, Aug 1, 2024 at 7:27 AM Jiri Olsa wrote: > > On Wed, Jul 31, 2024 at 02:42:53PM -0700, Andrii Nakryiko wrote: > > SNIP > > > static int __copy_insn(struct address_space *mapping, struct file *filp, > > void *insn, int nbytes, loff_t offset) > > { > > @@ -924,7 +901,8

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

2024-08-01 Thread Andrii Nakryiko
On Thu, Aug 1, 2024 at 5:23 AM Liao, Chang wrote: > > > > 在 2024/8/1 5:42, 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 upr

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

2024-08-01 Thread Andrii Nakryiko
On Thu, Aug 1, 2024 at 4:09 AM Jiri Olsa wrote: > > On Wed, Jul 31, 2024 at 02:42:50PM -0700, Andrii Nakryiko wrote: > > SNIP > > > static void put_uprobe(struct uprobe *uprobe) > > { > > - if (refcount_dec_and_test(&uprobe->ref)) { > > - /* > > - * If application mu

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

2024-08-01 Thread Andrii Nakryiko
On Thu, Aug 1, 2024 at 2:35 AM Peter Zijlstra wrote: > > On Wed, Jul 31, 2024 at 02:42:56PM -0700, Andrii Nakryiko wrote: > > 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

Re: [PATCH net-next v4 0/3] ioctl support for AF_VSOCK and virtio-based transports

2024-08-01 Thread Cong Wang
On Tue, Jul 30, 2024 at 09:43:05PM +0200, Luigi Leonardi via B4 Relay wrote: > This patch series introduce the support for ioctl(s) in AF_VSOCK. > The only ioctl currently available is SIOCOUTQ, which returns > the number of unsent or unacked packets. It is available for > SOCK_STREAM, SOCK_SEQPACK

[RFC PATCH vhost] vhost-vdpa: Fix invalid irq bypass unregister

2024-08-01 Thread Dragos Tatulea
The following workflow triggers the crash referenced below: 1) vhost_vdpa_unsetup_vq_irq() unregisters the irq bypass producer but the producer->token is still valid. 2) vq context gets released and reassigned to another vq. 3) That other vq registers it's producer with the same vq context p

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

2024-08-01 Thread Alexander Duyck
On Thu, Aug 1, 2024 at 6:01 AM Yunsheng Lin wrote: > > On 2024/8/1 2:13, Alexander Duyck wrote: > > 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 i

Re: [PATCH] rust: add `module_params` macro

2024-08-01 Thread Andreas Hindborg
"Benno Lossin" writes: > On 01.08.24 15:40, Andreas Hindborg wrote: >> "Benno Lossin" writes: >>> On 01.08.24 13:29, Andreas Hindborg wrote: "Benno Lossin" writes: > On 05.07.24 13:15, Andreas Hindborg wrote: >> + >> +/// Types that can be used for module parameters. >> +//

Re: [PATCH v4] x86/paravirt: Disable virt spinlock on bare metal

2024-08-01 Thread Chen Yu
Hi Bibo, On 2024-08-01 at 16:00:19 +0800, maobibo wrote: > Chenyu, > > I do not know much about x86, just give some comments(probably incorrected) > from the code. > > On 2024/7/29 下午2:52, Chen Yu wrote: > > X86_FEATURE_HYPERVISOR YYY N > > CONFIG_PARAVIRT_SPINLOCKS Y

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

2024-08-01 Thread Jiri Olsa
On Wed, Jul 31, 2024 at 02:42:53PM -0700, Andrii Nakryiko wrote: SNIP > static int __copy_insn(struct address_space *mapping, struct file *filp, > void *insn, int nbytes, loff_t offset) > { > @@ -924,7 +901,8 @@ static bool filter_chain(struct uprobe *uprobe, struct > mm_

Re: [PATCH] rust: add `module_params` macro

2024-08-01 Thread Benno Lossin
On 01.08.24 15:40, Andreas Hindborg wrote: > "Benno Lossin" writes: >> On 01.08.24 13:29, Andreas Hindborg wrote: >>> "Benno Lossin" writes: On 05.07.24 13:15, Andreas Hindborg wrote: > + > +/// Types that can be used for module parameters. > +/// > +/// Note that displaying

Re: [PATCH] uprobes: Improve scalability by reducing the contention on siglock

2024-08-01 Thread Oleg Nesterov
On 08/01, Liao Chang wrote: > > @@ -2276,22 +2277,25 @@ static void handle_singlestep(struct uprobe_task > *utask, struct pt_regs *regs) > int err = 0; > > uprobe = utask->active_uprobe; > - if (utask->state == UTASK_SSTEP_ACK) > + switch (utask->state) { > + case UTASK_S

Re: [PATCH] rust: add `module_params` macro

2024-08-01 Thread Andreas Hindborg
"Benno Lossin" writes: > On 01.08.24 13:29, Andreas Hindborg wrote: >> >> Hi Benno, >> >> Thanks for the comments! >> >> "Benno Lossin" writes: >> >>> On 05.07.24 13:15, Andreas Hindborg wrote: >> >> [...] >> + +/// Types that can be used for module parameters. +/// +//

Re: [PATCH v4 0/9] uprobes: misc cleanups/simplifications

2024-08-01 Thread Peter Zijlstra
On Thu, Aug 01, 2024 at 03:26:38PM +0200, Oleg Nesterov wrote: > (Andrii, I'll try to look at your new series on Weekend). OK, I dropped all your previous patches and stuffed these in. They should all be visible in queue/perf/core, and provided the robot doesn't scream, I'll push them into tip/pe

[PATCH v4 9/9] uprobes: shift put_uprobe() from delete_uprobe() to uprobe_unregister()

2024-08-01 Thread Oleg Nesterov
Kill the extra get_uprobe() + put_uprobe() in uprobe_unregister() and move the possibly final put_uprobe() from delete_uprobe() to its only caller, uprobe_unregister(). Signed-off-by: Oleg Nesterov Acked-by: Andrii Nakryiko Acked-by: Masami Hiramatsu (Google) Reviewed-by: Jiri Olsa --- kernel

[PATCH v4 8/9] uprobes: fold __uprobe_unregister() into uprobe_unregister()

2024-08-01 Thread Oleg Nesterov
Fold __uprobe_unregister() into its single caller, uprobe_unregister(). A separate patch to simplify the next change. Signed-off-by: Oleg Nesterov Acked-by: Andrii Nakryiko Acked-by: Masami Hiramatsu (Google) Reviewed-by: Jiri Olsa --- kernel/events/uprobes.c | 25 ++--- 1

[PATCH v4 7/9] uprobes: change uprobe_register() to use uprobe_unregister() instead of __uprobe_unregister()

2024-08-01 Thread Oleg Nesterov
If register_for_each_vma() fails uprobe_register() can safely drop uprobe->register_rwsem and use uprobe_unregister(). There is no worry about the races with another register/unregister, consumer_add() was already called so this case doesn't differ from _unregister() right after the successful _reg

[PATCH v4 6/9] uprobes: make uprobe_register() return struct uprobe *

2024-08-01 Thread Oleg Nesterov
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_unregister() still needs get_uprobe/put_uprobe to ensure that this uprobe

[PATCH v4 5/9] uprobes: kill uprobe_register_refctr()

2024-08-01 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 v4 4/9] selftests/bpf: fix uprobe.path leak in bpf_testmod

2024-08-01 Thread Oleg Nesterov
From: Jiri Olsa testmod_unregister_uprobe() forgets to path_put(&uprobe.path). Signed-off-by: Jiri Olsa Signed-off-by: Oleg Nesterov --- tools/testing/selftests/bpf/bpf_testmod/bpf_testmod.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/testing/selftests/bpf/bpf_testmod/bpf_testmo

[PATCH v4 3/9] uprobes: simplify error handling for alloc_uprobe()

2024-08-01 Thread Oleg Nesterov
From: Andrii Nakryiko Return -ENOMEM instead of NULL, which makes caller's error handling just a touch simpler. Signed-off-by: Andrii Nakryiko Signed-off-by: Oleg Nesterov Reviewed-by: Masami Hiramatsu (Google) Reviewed-by: Jiri Olsa --- kernel/events/uprobes.c | 4 +--- 1 file changed, 1 i

[PATCH v4 2/9] uprobes: is_trap_at_addr: don't use get_user_pages_remote()

2024-08-01 Thread Oleg Nesterov
get_user_pages_remote() and the comment above it make no sense. There is no task_struct passed into get_user_pages_remote() anymore, and nowadays mm_account_fault() increments the current->min/maj_flt counters regardless of FAULT_FLAG_REMOTE. Reported-by: Andrii Nakryiko Signed-off-by: Oleg Nest

[PATCH v4 1/9] uprobes: document the usage of mm->mmap_lock

2024-08-01 Thread Oleg Nesterov
The comment above uprobe_write_opcode() is wrong, unapply_uprobe() calls it under mmap_read_lock() and this is correct. And it is completely unclear why register_for_each_vma() takes mmap_lock for writing, add a comment to explain that mmap_write_lock() is needed to avoid the following race:

[PATCH v4 0/9] uprobes: misc cleanups/simplifications

2024-08-01 Thread Oleg Nesterov
(Andrii, I'll try to look at your new series on Weekend). Changes: - added the acks I got from Andrii, Masami, and Jiri - new 4/9 patch from Jiri, fixes the unrelated bug in bpf_testmod - adapt tools/testing/selftests/bpf/bpf_testmod/bpf_testmod.c to the API chan

Re: [PATCH v2 2/2] remoteproc: imx_rproc: handle system off for i.MX7ULP

2024-08-01 Thread Mathieu Poirier
On Tue, Jul 30, 2024 at 08:06:22AM +, Peng Fan wrote: > > Subject: Re: [PATCH v2 2/2] remoteproc: imx_rproc: handle system off > > for i.MX7ULP > > > > On Fri, Jul 19, 2024 at 04:49:04PM +0800, Peng Fan (OSS) wrote: > > > From: Peng Fan > > > > > > The i.MX7ULP Cortex-A7 is under control of C

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

2024-08-01 Thread Peter Zijlstra
On Wed, Jul 31, 2024 at 07:17:33PM +0200, Oleg Nesterov wrote: > 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

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

2024-08-01 Thread Jiri Olsa
On Thu, Aug 01, 2024 at 02:26:45PM +0200, Oleg Nesterov wrote: > On 08/01, Jiri Olsa wrote: > > > > > Note the additional path_put() in testmod_unregister_uprobe(). Does it > > > need > > > a separate patch or can it come with 5/5 ? > > > > I think it'd be better to have it separately, the test is

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

2024-08-01 Thread Yunsheng Lin
On 2024/8/1 2:13, Alexander Duyck wrote: > 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

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

2024-08-01 Thread Oleg Nesterov
On 08/01, Jiri Olsa wrote: > > > Note the additional path_put() in testmod_unregister_uprobe(). Does it need > > a separate patch or can it come with 5/5 ? > > I think it'd be better to have it separately, the test is already > released.. so people might want to backport just the fix OK, I'll reba

Re: [PATCH] rust: add `module_params` macro

2024-08-01 Thread Benno Lossin
On 01.08.24 13:29, Andreas Hindborg wrote: > > Hi Benno, > > Thanks for the comments! > > "Benno Lossin" writes: > >> On 05.07.24 13:15, Andreas Hindborg wrote: > > [...] > >>> + >>> +/// Types that can be used for module parameters. >>> +/// >>> +/// Note that displaying the type in `sysfs`

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

2024-08-01 Thread Liao, Chang
在 2024/8/1 5:42, 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 refcoun

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

2024-08-01 Thread Jiri Olsa
On Thu, Aug 01, 2024 at 02:00:18PM +0200, Oleg Nesterov wrote: > On 08/01, Jiri Olsa wrote: > > > > > @@ -474,10 +477,10 @@ static void testmod_unregister_uprobe(void) > > > { > > > mutex_lock(&testmod_uprobe_mutex); > > > > > > - if (uprobe.offset) { > > > - uprobe_unr

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

2024-08-01 Thread Oleg Nesterov
On 08/01, Jiri Olsa wrote: > > > @@ -474,10 +477,10 @@ static void testmod_unregister_uprobe(void) > > { > > mutex_lock(&testmod_uprobe_mutex); > > > > - if (uprobe.offset) { > > - uprobe_unregister(d_real_inode(uprobe.path.dentry), > > -

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

2024-08-01 Thread Jiri Olsa
On Wed, Jul 31, 2024 at 09:18:00AM -0700, Andrii Nakryiko wrote: SNIP > diff --git a/tools/testing/selftests/bpf/bpf_testmod/bpf_testmod.c > b/tools/testing/selftests/bpf/bpf_testmod/bpf_testmod.c > index 5f152afdec2f..73a6b041bcce 100644 > --- a/tools/testing/selftests/bpf/bpf_testmod/bpf_testmo

Re: [PATCH] rust: add `module_params` macro

2024-08-01 Thread Andreas Hindborg
Hi Benno, Thanks for the comments! "Benno Lossin" writes: > On 05.07.24 13:15, Andreas Hindborg wrote: [...] >> + >> +/// Types that can be used for module parameters. >> +/// >> +/// Note that displaying the type in `sysfs` will fail if >> +/// [`core::str::from_utf8`] (as implemented thro

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

2024-08-01 Thread Petr Pavlu
On 7/26/24 23:05, Sami Tolvanen wrote: > 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 mentioned, genksyms has this functionality but

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

2024-08-01 Thread Jiri Olsa
On Wed, Jul 31, 2024 at 02:42:50PM -0700, Andrii Nakryiko wrote: SNIP > static void put_uprobe(struct uprobe *uprobe) > { > - if (refcount_dec_and_test(&uprobe->ref)) { > - /* > - * If application munmap(exec_vma) before uprobe_unregister() > - * gets c

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

2024-08-01 Thread Peter Zijlstra
On Wed, Jul 31, 2024 at 11:34:13PM +0200, Alice Ryhl wrote: > > Please work harder to not have to duplicate stuff like this. > > I really didn't want to duplicate it, but it's very hard to find a > performant alternative. Is there any way we could accept duplication > only in the cases where an '

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

2024-08-01 Thread Tomas Glozar
> > Could probably do: > > #ifdef HAVE_LIBCPUPOWER_SUPPORT > > + "--deepest-idle-state n: only go down to idle > > state n on cpus used by timerlat to reduce exit from idle latency", > #else > + "--deepest-idle-state n: [rtla built without > libcp

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

2024-08-01 Thread Tomas Glozar
> > Need to check if the calloc failed and return an error if it did. > Definitely, I completely missed that. > > Hmm, should this warn if state is not zero and disabled is negative. > rtla timerlat hist/top will error out if save_cpu_idle_disable_state returns a negative value, so I don't think

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

2024-08-01 Thread Peter Zijlstra
On Wed, Jul 31, 2024 at 02:42:56PM -0700, Andrii Nakryiko wrote: > 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

[PATCH] uprobes: Improve scalability by reducing the contention on siglock

2024-08-01 Thread Liao Chang
The profiling result of BPF selftest on ARM64 platform reveals the significant contention on the current->sighand->siglock within the handle_singlestep() is the scalability bottleneck. The reason is also very straightforward that all producer threads of benchmark have to contend the spinlock mentio

Re: [PATCH v4] x86/paravirt: Disable virt spinlock on bare metal

2024-08-01 Thread maobibo
Chenyu, I do not know much about x86, just give some comments(probably incorrected) from the code. On 2024/7/29 下午2:52, Chen Yu wrote: The kernel can change spinlock behavior when running as a guest. But this guest-friendly behavior causes performance problems on bare metal. So there's a 'vir

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

2024-08-01 Thread Michael S. Tsirkin
On Thu, Aug 01, 2024 at 02:55:10PM +0800, Jason Wang wrote: > 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:0