[PATCH v4 1/1] vringh: IOMEM support

2023-06-01 Thread Shunsuke Mie
Introduce a new memory accessor for vringh. It is able to use vringh to virtio rings located on io-memory region. Signed-off-by: Shunsuke Mie --- drivers/vhost/vringh.c | 201 + include/linux/vringh.h | 32 +++ 2 files changed, 233 insertions(+)

[PATCH v4 0/1] Introduce a vringh accessor for IO memory

2023-06-01 Thread Shunsuke Mie
Vringh is a host-side implementation of virtio rings, and supports the vring located on three kinds of memories, userspace, kernel space and a space translated iotlb. This patch introduces a new accessor for the vring on IO memory regions. The accessor is used by the proposed PCIe endpoint

Re: [PATCH 3/3] fork, vhost: Use CLONE_THREAD to fix freezer/ps regression

2023-06-01 Thread Jason Wang
On Thu, Jun 1, 2023 at 3:43 PM Oleg Nesterov wrote: > > On 06/01, Jason Wang wrote: > > > > On Wed, May 31, 2023 at 5:14 PM Oleg Nesterov wrote: > > > > > > > > I don't understand you. OK, to simplify, suppose we have 2 global vars > > > > > > > > > > void *PTR = something_non_null; > >

Re: [PATCH 1/1] fork, vhost: Use CLONE_THREAD to fix freezer/ps regression

2023-06-01 Thread Eric W. Biederman
Mike Christie writes: > When switching from kthreads to vhost_tasks two bugs were added: > 1. The vhost worker tasks's now show up as processes so scripts doing > ps or ps a would not incorrectly detect the vhost task as another > process. 2. kthreads disabled freeze by setting PF_NOFREEZE, but

Re: [PATCH 1/1] fork, vhost: Use CLONE_THREAD to fix freezer/ps regression

2023-06-01 Thread Michael S. Tsirkin
On Thu, Jun 01, 2023 at 01:32:32PM -0500, Mike Christie wrote: > When switching from kthreads to vhost_tasks two bugs were added: > 1. The vhost worker tasks's now show up as processes so scripts doing > ps or ps a would not incorrectly detect the vhost task as another > process. 2. kthreads

Re: [PATCH V2] virtio-fs: Improved request latencies when Virtio queue is full

2023-06-01 Thread Vivek Goyal
On Thu, Jun 01, 2023 at 10:08:50AM -0400, Stefan Hajnoczi wrote: > On Wed, May 31, 2023 at 04:49:39PM -0400, Vivek Goyal wrote: > > On Wed, May 31, 2023 at 10:34:15PM +0200, Peter-Jan Gootzen wrote: > > > On 31/05/2023 21:18, Vivek Goyal wrote: > > > > On Wed, May 31, 2023 at 07:10:32PM +0200,

[PATCH 1/1] fork, vhost: Use CLONE_THREAD to fix freezer/ps regression

2023-06-01 Thread Mike Christie
When switching from kthreads to vhost_tasks two bugs were added: 1. The vhost worker tasks's now show up as processes so scripts doing ps or ps a would not incorrectly detect the vhost task as another process. 2. kthreads disabled freeze by setting PF_NOFREEZE, but vhost tasks's didn't disable or

Re: [PATCH V2] virtio-fs: Improved request latencies when Virtio queue is full

2023-06-01 Thread Stefan Hajnoczi
On Thu, Jun 01, 2023 at 04:49:06PM +0200, Peter-Jan Gootzen wrote: > On 01/06/2023 16:08, Stefan Hajnoczi wrote: > > On Wed, May 31, 2023 at 04:49:39PM -0400, Vivek Goyal wrote: > >> On Wed, May 31, 2023 at 10:34:15PM +0200, Peter-Jan Gootzen wrote: > >>> On 31/05/2023 21:18, Vivek Goyal wrote: >

Re: [syzbot] [kvm?] [net?] [virt?] general protection fault in vhost_work_queue

2023-06-01 Thread Mike Christie
On 6/1/23 2:47 AM, Stefano Garzarella wrote: >> >> static void vhost_worker_free(struct vhost_dev *dev) >> { >> -    struct vhost_worker *worker = dev->worker; >> +    struct vhost_task *vtsk = READ_ONCE(dev->worker.vtsk); >> >> -    if (!worker) >> +    if (!vtsk) >>     return; >> >> -   

Re: [RFC PATCH 0/8] vhost_tasks: Use CLONE_THREAD/SIGHAND

2023-06-01 Thread Mike Christie
On 6/1/23 5:47 AM, Christian Brauner wrote: > On Thu, Jun 01, 2023 at 09:58:38AM +0200, Thorsten Leemhuis wrote: >> On 19.05.23 14:15, Christian Brauner wrote: >>> On Thu, May 18, 2023 at 10:25:11AM +0200, Christian Brauner wrote: On Wed, May 17, 2023 at 07:09:12PM -0500, Mike Christie wrote:

Re: [PATCH V2] virtio-fs: Improved request latencies when Virtio queue is full

2023-06-01 Thread Peter-Jan Gootzen via Virtualization
On 01/06/2023 16:08, Stefan Hajnoczi wrote: > On Wed, May 31, 2023 at 04:49:39PM -0400, Vivek Goyal wrote: >> On Wed, May 31, 2023 at 10:34:15PM +0200, Peter-Jan Gootzen wrote: >>> On 31/05/2023 21:18, Vivek Goyal wrote: On Wed, May 31, 2023 at 07:10:32PM +0200, Peter-Jan Gootzen wrote: >

Re: [PATCH V2] virtio-fs: Improved request latencies when Virtio queue is full

2023-06-01 Thread Stefan Hajnoczi
On Wed, May 31, 2023 at 04:49:39PM -0400, Vivek Goyal wrote: > On Wed, May 31, 2023 at 10:34:15PM +0200, Peter-Jan Gootzen wrote: > > On 31/05/2023 21:18, Vivek Goyal wrote: > > > On Wed, May 31, 2023 at 07:10:32PM +0200, Peter-Jan Gootzen wrote: > > >> When the Virtio queue is full, a work item

Re: [RFC PATCH 0/8] vhost_tasks: Use CLONE_THREAD/SIGHAND

2023-06-01 Thread Linus Torvalds
On Thu, Jun 1, 2023 at 6:47 AM Christian Brauner wrote: > > @Mike, do you want to prepare an updated version of the temporary fix. > If @Linus prefers to just apply it directly he can just grab it from the > list rather than delaying it. Make sure to grab a Co-developed-by line > on this, @Mike.

Re: [RFC PATCH 0/8] vhost_tasks: Use CLONE_THREAD/SIGHAND

2023-06-01 Thread Thorsten Leemhuis
On 01.06.23 12:47, Christian Brauner wrote: > On Thu, Jun 01, 2023 at 09:58:38AM +0200, Thorsten Leemhuis wrote: >> On 19.05.23 14:15, Christian Brauner wrote: >>> On Thu, May 18, 2023 at 10:25:11AM +0200, Christian Brauner wrote: On Wed, May 17, 2023 at 07:09:12PM -0500, Mike Christie wrote:

Re: [PATCH RFC 13/43] x86/paravirt: Use relative reference for original instruction

2023-06-01 Thread Juergen Gross via Virtualization
On 28.04.23 11:50, Hou Wenlong wrote: Similar to the alternative patching, use relative reference for original instruction rather than absolute one, which saves 8 bytes for one entry on x86_64. And it could generate R_X86_64_PC32 relocation instead of R_X86_64_64 relocation, which also reduces

Re: [PATCH net] virtio/vsock: fix sock refcnt bug on owner set failure

2023-06-01 Thread Stefano Garzarella
On Wed, May 31, 2023 at 07:47:32PM +, Bobby Eshleman wrote: Previous to setting the owner the socket is found via vsock_find_connected_socket(), which returns sk after a call to sock_hold(). If setting the owner fails, then sock_put() needs to be called. Fixes: f9d2b1e146e0 ("virtio/vsock:

Re: [RFC PATCH 0/8] vhost_tasks: Use CLONE_THREAD/SIGHAND

2023-06-01 Thread Thorsten Leemhuis
On 19.05.23 14:15, Christian Brauner wrote: > On Thu, May 18, 2023 at 10:25:11AM +0200, Christian Brauner wrote: >> On Wed, May 17, 2023 at 07:09:12PM -0500, Mike Christie wrote: >>> This patch allows the vhost and vhost_task code to use CLONE_THREAD, >>> CLONE_SIGHAND and CLONE_FILES. It's a RFC

Re: [syzbot] [kvm?] [net?] [virt?] general protection fault in vhost_work_queue

2023-06-01 Thread Stefano Garzarella
On Wed, May 31, 2023 at 11:27:12AM -0500, Mike Christie wrote: On 5/31/23 10:15 AM, Mike Christie wrote: rcu would work for your case and for what Jason had requested. Yeah, so you already have some patches? Do you want to send it to solve this problem? Yeah, I'll break them out and send

Re: [PATCH 3/3] fork, vhost: Use CLONE_THREAD to fix freezer/ps regression

2023-06-01 Thread Oleg Nesterov
On 06/01, Jason Wang wrote: > > On Wed, May 31, 2023 at 5:14 PM Oleg Nesterov wrote: > > > > > > I don't understand you. OK, to simplify, suppose we have 2 global vars > > > > > > > > void *PTR = something_non_null; > > > > unsigned long FLAGS = -1ul; > > > > > > > > Now I think