Re: [RFC 7/7] vhost: Add new UAPI to support changing Kthread mode

2024-08-26 Thread Jason Wang
On Mon, Aug 19, 2024 at 5:29 PM Cindy Lu wrote: > > Add a new UAPI to support setting the vhost device to > use kthread mode. The user space application needs to use > VHOST_SET_USE_KTHREAD to set the mode. This setting must > be set before VHOST_SET_OWNER is set. > > Signed-off-by: Cindy Lu > --

Re: [RFC 2/7] vhost: Add kthread support in function vhost_worker_queue()

2024-08-26 Thread Jason Wang
On Mon, Aug 19, 2024 at 5:29 PM Cindy Lu wrote: > > Added back the previously removed function vhost_worker_queue() and > renamed it to vhost_worker_queue_khtread(). The new vhost_worker_queue() > will select the different mode based on the value of the parameter. > > Signed-off-by: Cindy Lu It

Re: [RFC 0/7] vhost: Add support of kthread API

2024-08-26 Thread Jason Wang
On Mon, Aug 19, 2024 at 5:29 PM Cindy Lu wrote: > > In commit 6e890c5d5021 ("vhost: use vhost_tasks for worker threads"), > vhost removed the support for the kthread API. However, there are > still situations where there is a request to use kthread. I think we need some tweak here. For example, w

Re: [RFC 7/7] vhost: Add new UAPI to support changing Kthread mode

2024-08-26 Thread Jason Wang
On Mon, Aug 19, 2024 at 5:29 PM Cindy Lu wrote: > > Add a new UAPI to support setting the vhost device to > use kthread mode. The user space application needs to use > VHOST_SET_USE_KTHREAD to set the mode. This setting must > be set before VHOST_SET_OWNER is set. > > Signed-off-by: Cindy Lu > --

Re: [RFC 7/7] vhost: Add new UAPI to support changing Kthread mode

2024-08-26 Thread Jason Wang
On Tue, Aug 27, 2024 at 10:09 AM Jason Wang wrote: > > On Mon, Aug 26, 2024 at 2:31 PM Christoph Hellwig wrote: > > > > On Mon, Aug 26, 2024 at 02:21:52PM +0800, Jason Wang wrote: > > > > What is the application visible behavior that the API use is the proxy > > > > for? > > > > > > Vhost used to

Re: [RFC 7/7] vhost: Add new UAPI to support changing Kthread mode

2024-08-26 Thread Jason Wang
On Mon, Aug 26, 2024 at 2:31 PM Christoph Hellwig wrote: > > On Mon, Aug 26, 2024 at 02:21:52PM +0800, Jason Wang wrote: > > > What is the application visible behavior that the API use is the proxy > > > for? > > > > Vhost used to be created by kthreadd but some recent patches change it > > to beh

Re: [RFC] Why is set_config not supported in mlx5_vnet?

2024-08-26 Thread Jason Wang
On Tue, Aug 27, 2024 at 3:23 AM Carlos Bilbao wrote: > > Hello, > > On 8/26/24 10:53 AM, Dragos Tatulea wrote: > > > > On 26.08.24 16:26, Carlos Bilbao wrote: > >> Hello Dragos, > >> > >> On 8/26/24 4:06 AM, Dragos Tatulea wrote: > >>> On 23.08.24 18:54, Carlos Bilbao wrote: > Hello, > >

Re: [RFC] Why is set_config not supported in mlx5_vnet?

2024-08-26 Thread Jason Wang
On Tue, Aug 27, 2024 at 12:11 AM Dragos Tatulea wrote: > > > On 26.08.24 16:24, Andrew Lunn wrote: > > On Mon, Aug 26, 2024 at 11:06:09AM +0200, Dragos Tatulea wrote: > >> > >> > >> On 23.08.24 18:54, Carlos Bilbao wrote: > >>> Hello, > >>> > >>> I'm debugging my vDPA setup, and when using ioctl t

Re: [PATCH] tracing: Mitigate possible softlockup in __tracing_open()

2024-08-26 Thread Zheng Yejian
On 2024/8/26 22:35, Steven Rostedt wrote: On Sat, 24 Aug 2024 11:03:43 +0800 Zheng Yejian wrote: In __tracing_open(), when max latency tracers took place on the cpu, the time start of its buffer would be updated, then event entries with timestamps being earlier than start of the buffer would b

[PATCH v3] virtio_pmem: Check device status before requesting flush

2024-08-26 Thread Philip Chen
If a pmem device is in a bad status, the driver side could wait for host ack forever in virtio_pmem_flush(), causing the system to hang. So add a status check in the beginning of virtio_pmem_flush() to return early if the device is not activated. Signed-off-by: Philip Chen --- v3: - Fix a typo i

Re: [PATCH] device-dax: map dax memory as decrypted in CoCo guests

2024-08-26 Thread Kevin Loughlin
> How can I test this? Can I test it with virtio-pmem device? Correct. Assuming the CoCo guest accesses some virtio-pmem device in devdax mode, mmapping() this virtio-pmem device's memory region results in the guest and host reading the same (plaintext) values from the region. > > Thanks, > Pan

Re: [RFC] Why is set_config not supported in mlx5_vnet?

2024-08-26 Thread Carlos Bilbao
Hello, On 8/26/24 10:53 AM, Dragos Tatulea wrote: > > On 26.08.24 16:26, Carlos Bilbao wrote: >> Hello Dragos, >> >> On 8/26/24 4:06 AM, Dragos Tatulea wrote: >>> On 23.08.24 18:54, Carlos Bilbao wrote: Hello, I'm debugging my vDPA setup, and when using ioctl to retrieve the co

Re: [PATCH v2 01/19] tools: Add gendwarfksyms

2024-08-26 Thread Sami Tolvanen
Hi Petr, On Mon, Aug 26, 2024 at 10:42 AM Petr Pavlu wrote: > > On 8/15/24 19:39, Sami Tolvanen wrote: > > +static int parse_options(int argc, const char **argv) > > +{ > > + for (int i = 1; i < argc; i++) { > > + bool flag = false; > > + > > + for (int j = 0; j < ARRA

Re: [PATCH v5 0/4] tracing: improve symbolic printing

2024-08-26 Thread Johannes Berg
Hi Steven, > I finally got around to testing your patches. > > I did the following: > > # cat /sys/kernel/tracing/events/*/*/format > > and hit this: > > BUG: unable to handle page fault for address: 8e6333d0 Ugh. That's ... unfortunate. I couldn't reproduce this so far, do you happ

Re: [PATCH v2 01/19] tools: Add gendwarfksyms

2024-08-26 Thread Petr Pavlu
On 8/15/24 19:39, Sami Tolvanen wrote: > Add a basic DWARF parser, which uses libdw to traverse the debugging > information in an object file and looks for functions and variables. > In follow-up patches, this will be expanded to produce symbol versions > for CONFIG_MODVERSIONS from DWARF. > > Sig

Re: [PATCH] tracing/timerlat: Check tlat_var for NULL in timerlat_fd_release

2024-08-26 Thread Steven Rostedt
On Mon, 26 Aug 2024 15:01:24 +0200 Tomas Glozar wrote: > > Before the reset, all but one of the tlat->kthread is NULL. Then it dawned > > on me that this is a global per CPU variable. It gets initialized when the > > tracer starts. If another program is has the timerlat fd open when the > > trace

Re: [PATCH] hwspinlock: improve locking safety by using raw_spinlock_t

2024-08-26 Thread Bjorn Andersson
On Sat, Aug 24, 2024 at 10:38:47PM GMT, Wen Yang wrote: > Both __hwspin_trylock and __hwspin_unlock use hwlock->lock, and require > running in atomic context, with a special annotation: > function will never sleep. > However, this requirement is not fulfilled on PREEMPT_RT. > > To address it, use

Re: [PATCH v4] remoteproc: xlnx: add sram support

2024-08-26 Thread Mathieu Poirier
Good morning, First and foremost the overall structure of your code has improved immensely and I commend you for that. On Mon, Aug 19, 2024 at 10:09:38AM -0700, Tanmay Shah wrote: > AMD-Xilinx zynqmp platform contains on-chip sram memory (OCM). > R5 cores can access OCM and access is faster than

Re: [PATCH v2] uprobes: make trace_uprobe->nhit counter a per-CPU one

2024-08-26 Thread Andrii Nakryiko
On Sun, Aug 25, 2024 at 3:15 AM Masami Hiramatsu wrote: > > On Tue, 13 Aug 2024 17:41:04 +0200 > Oleg Nesterov wrote: > > > On 08/13, Masami Hiramatsu wrote: > > > > > > > @@ -62,7 +63,7 @@ struct trace_uprobe { > > > > struct uprobe *uprobe; > > > > > > BTW, what is this chan

Re: [RFC] Why is set_config not supported in mlx5_vnet?

2024-08-26 Thread Dragos Tatulea
On 26.08.24 16:24, Andrew Lunn wrote: > On Mon, Aug 26, 2024 at 11:06:09AM +0200, Dragos Tatulea wrote: >> >> >> On 23.08.24 18:54, Carlos Bilbao wrote: >>> Hello, >>> >>> I'm debugging my vDPA setup, and when using ioctl to retrieve the >>> configuration, I noticed that it's running in half dupl

Re: [RFC] Why is set_config not supported in mlx5_vnet?

2024-08-26 Thread Dragos Tatulea
On 26.08.24 16:26, Carlos Bilbao wrote: > Hello Dragos, > > On 8/26/24 4:06 AM, Dragos Tatulea wrote: >> >> On 23.08.24 18:54, Carlos Bilbao wrote: >>> Hello, >>> >>> I'm debugging my vDPA setup, and when using ioctl to retrieve the >>> configuration, I noticed that it's running in half duplex

Re: [PATCH v3 0/2] remoteproc: imx_rproc: support non-blocking tx for i.MX7ULP

2024-08-26 Thread Mathieu Poirier
On Thu, Aug 22, 2024 at 09:48:48PM +0800, Peng Fan (OSS) wrote: > The i.MX7ULP Cortex-A7 is under control of Cortex-M4. The i.MX7ULP Linux > poweroff and restart rely on rpmsg driver to send a message to Cortex-M4 > firmware. Then Cortex-A7 could poweroff or restart by Cortex-M4 to > configure the

Re: [PATCH] tracing: Mitigate possible softlockup in __tracing_open()

2024-08-26 Thread Steven Rostedt
On Sat, 24 Aug 2024 11:03:43 +0800 Zheng Yejian wrote: > In __tracing_open(), when max latency tracers took place on the cpu, > the time start of its buffer would be updated, then event entries with > timestamps being earlier than start of the buffer would be skipped > (see tracing_iter_reset()).

Re: [RFC] Why is set_config not supported in mlx5_vnet?

2024-08-26 Thread Carlos Bilbao
Hello Dragos, On 8/26/24 4:06 AM, Dragos Tatulea wrote: > > On 23.08.24 18:54, Carlos Bilbao wrote: >> Hello, >> >> I'm debugging my vDPA setup, and when using ioctl to retrieve the >> configuration, I noticed that it's running in half duplex mode: >> >> Configuration data (24 bytes): >> MAC add

Re: [RFC] Why is set_config not supported in mlx5_vnet?

2024-08-26 Thread Andrew Lunn
On Mon, Aug 26, 2024 at 11:06:09AM +0200, Dragos Tatulea wrote: > > > On 23.08.24 18:54, Carlos Bilbao wrote: > > Hello, > > > > I'm debugging my vDPA setup, and when using ioctl to retrieve the > > configuration, I noticed that it's running in half duplex mode: > > > > Configuration data (24 b

Re: [PATCH v3] uprobes: turn trace_uprobe's nhit counter to be per-CPU one

2024-08-26 Thread Jiri Olsa
On Tue, Aug 13, 2024 at 01:34:09PM -0700, Andrii Nakryiko wrote: > trace_uprobe->nhit counter is not incremented atomically, so its value > is questionable in when uprobe is hit on multiple CPUs simultaneously. > > Also, doing this shared counter increment across many CPUs causes heavy > cache lin

Re: [PATCH] tracing/timerlat: Check tlat_var for NULL in timerlat_fd_release

2024-08-26 Thread Tomas Glozar
pá 23. 8. 2024 v 20:51 odesílatel Steven Rostedt napsal: > > Egad, I don't think this is even good enough. I noticed this in the trace > (adding kthread to the memset trace_printk): > ><...>-916 [003] . 134.227044: osnoise_workload_start: > memset 88823c435b28 for 00

[syzbot] [bpf?] [trace?] WARNING in bpf_get_stack_raw_tp

2024-08-26 Thread syzbot
Hello, syzbot found the following issue on: HEAD commit:872cf28b8df9 Merge tag 'platform-drivers-x86-v6.11-4' of g.. git tree: bpf console output: https://syzkaller.appspot.com/x/log.txt?x=1628ae0998 kernel config: https://syzkaller.appspot.com/x/.config?x=df2f0ed7e30a639d dashboar

Re: [PATCH v16 00/16] Add Cgroup support for SGX EPC memory

2024-08-26 Thread Mikko Ylinen
On Tue, Aug 20, 2024 at 06:53:48PM -0700, Haitao Huang wrote: > SGX Enclave Page Cache (EPC) memory allocations are separate from normal > RAM allocations, and are managed solely by the SGX subsystem. The existing > cgroup memory controller cannot be used to limit or account for SGX EPC > memory, w

Re: [RFC] Why is set_config not supported in mlx5_vnet?

2024-08-26 Thread Dragos Tatulea
On 23.08.24 18:54, Carlos Bilbao wrote: > Hello, > > I'm debugging my vDPA setup, and when using ioctl to retrieve the > configuration, I noticed that it's running in half duplex mode: > > Configuration data (24 bytes): > MAC address: (Mac address) > Status: 0x0001 > Max virtqueue pairs: