Re: [PATCH V4 6/8] io_uring: switch to kernel_worker

2021-10-07 Thread kernel test robot
Hi Mike, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on next-20211007] [cannot apply to mst-vhost/linux-next vgupta-arc/for-next arm64/for-next/core uclinux-h8/h8300-next geert-m68k/for-next openrisc/for-next deller-parisc/for-next powerpc/next s390/features

[PATCH V4 7/8] vhost: move worker thread fields to new struct

2021-10-07 Thread Mike Christie
This is just a prep patch. It moves the worker related fields to a new vhost_worker struct and moves the code around to create some helpers that will be used in the next patches. Signed-off-by: Mike Christie Reviewed-by: Stefan Hajnoczi Acked-by: Michael S. Tsirkin --- drivers/vhost/vhost.c |

[PATCH V4 8/8] vhost: use kernel_worker to check RLIMITs and inherit v2 cgroups

2021-10-07 Thread Mike Christie
For vhost workers we use the kthread API which inherit's its values from and checks against the kthreadd thread. This results in cgroups v2 not working and the wrong RLIMITs being checked. This patch has us use the kernel_copy_process function which will inherit its values/checks from the thread th

[PATCH V4 6/8] io_uring: switch to kernel_worker

2021-10-07 Thread Mike Christie
Convert io_uring and io-wq to use kernel_worker. Signed-off-by: Mike Christie Reviewed-by: Christian Brauner Reviewed-by: Jens Axboe --- Note: To avoid patch application conflicts this patch was made over linux-next which has Jens Axboe's block tree's for-next branch and Paul Moore's selinux t

[PATCH V4 2/8] fork: move PF_IO_WORKER's kernel frame setup to new flag

2021-10-07 Thread Mike Christie
The vhost worker threads need the same frame setup as io_uring's worker threads, but handle signals differently and do not need the same scheduling behavior. This patch separate's the frame setup parts of PF_IO_WORKER into a new PF flag PF_USER_WORKER. Signed-off-by: Mike Christie --- arch/alpha

[PATCH V4 4/8] fork: Add KERNEL_WORKER flag to ignore signals

2021-10-07 Thread Mike Christie
From: Christian Brauner Since this is mirroring kthread's sig ignore api introduced in commit 10ab825bdef8 ("change kernel threads to ignore signals instead of blocking them") this patch adds an option flag, KERNEL_WORKER_SIG_IGN, handled in copy_process() after copy_sighand() and copy_signals(

[PATCH V4 3/8] fork: add option to not clone or dup files

2021-10-07 Thread Mike Christie
Each vhost device gets a thread that is used to perform IO and management operations. Instead of a thread that is accessing a device, the thread is part of the device, so when it calls the kernel_worker() function added in the next patch we can't dup or clone the parent's files/FDS because it would

[PATCH V4 5/8] fork: add helper to clone a process

2021-10-07 Thread Mike Christie
The vhost layer has similar requirements as io_uring where its worker threads need to access the userspace thread's memory, want to inherit the parents's cgroups and namespaces, and be checked against the parent's RLIMITs. Right now, the vhost layer uses the kthread API which has kthread_use_mm for

[PATCH V4 1/8] fork: Make IO worker options flag based

2021-10-07 Thread Mike Christie
This patchset adds a couple new options to kernel_clone_args for IO thread like/related users. Instead of adding new fields to kernel_clone_args for each option, this moves us to a flags based approach by first converting io_thread. Signed-off-by: Mike Christie Suggested-by: Christian Brauner Ac

[PATCH V4 0/8] Use copy_process/create_io_thread in vhost layer

2021-10-07 Thread Mike Christie
The following patches apply over Linus's, Jens's or mst's trees, but were made over linux-next because patch 6: io_uring: switch to kernel_worker has merge conflicts with Jens Axboe's for-next branch and Paul Moore's selinux tree's next branch. This is V4 of the patchset. It should handle all th

Re: [PATCH 1/1] virtio: write back F_VERSION_1 before validate

2021-10-07 Thread Cornelia Huck
On Thu, Oct 07 2021, Halil Pasic wrote: > On Thu, 07 Oct 2021 17:25:52 +0200 > Cornelia Huck wrote: > >> On Thu, Oct 07 2021, Halil Pasic wrote: >> >> > On Thu, 07 Oct 2021 13:52:24 +0200 >> > Cornelia Huck wrote: >> > >> >> On Wed, Oct 06 2021, Halil Pasic wrote: >> >> >> >> > The virt

Re: virtio-net: kernel panic in virtio_net.c

2021-10-07 Thread Xuan Zhuo
On Thu, 7 Oct 2021 17:25:02 +0200, Greg KH wrote: > On Thu, Oct 07, 2021 at 11:06:12PM +0800, Xuan Zhuo wrote: > > On Thu, 07 Oct 2021 14:04:22 +0200, Corentin Noël > > wrote: > > > I've been experiencing crashes with 5.14-rc1 and above that do not > > > occur with 5.13, > > > > I should have fi

Re: [PATCH 1/1] virtio: write back F_VERSION_1 before validate

2021-10-07 Thread Halil Pasic
On Thu, 07 Oct 2021 17:25:52 +0200 Cornelia Huck wrote: > On Thu, Oct 07 2021, Halil Pasic wrote: > > > On Thu, 07 Oct 2021 13:52:24 +0200 > > Cornelia Huck wrote: > > > >> On Wed, Oct 06 2021, Halil Pasic wrote: > >> > >> > The virtio specification virtio-v1.1-cs01 states: "Transitional

Re: [PATCH 1/1] virtio: write back F_VERSION_1 before validate

2021-10-07 Thread Cornelia Huck
On Thu, Oct 07 2021, Halil Pasic wrote: > On Thu, 07 Oct 2021 13:52:24 +0200 > Cornelia Huck wrote: > >> On Wed, Oct 06 2021, Halil Pasic wrote: >> >> > The virtio specification virtio-v1.1-cs01 states: Transitional devices >> > MUST detect Legacy drivers by detecting that VIRTIO_F_VERSION_1 h

Re: virtio-net: kernel panic in virtio_net.c

2021-10-07 Thread Greg KH
On Thu, Oct 07, 2021 at 11:06:12PM +0800, Xuan Zhuo wrote: > On Thu, 07 Oct 2021 14:04:22 +0200, Corentin Noël > wrote: > > I've been experiencing crashes with 5.14-rc1 and above that do not > > occur with 5.13, > > I should have fixed this problem before. I don't know why, I just looked at > t

Re: virtio-net: kernel panic in virtio_net.c

2021-10-07 Thread Xuan Zhuo
On Thu, 07 Oct 2021 14:04:22 +0200, Corentin Noël wrote: > I've been experiencing crashes with 5.14-rc1 and above that do not > occur with 5.13, I should have fixed this problem before. I don't know why, I just looked at the latest net code, and this commit seems to be lost. 1a8024239dacf5

Re: [PATCH 1/1] virtio: write back F_VERSION_1 before validate

2021-10-07 Thread Halil Pasic
On Thu, 07 Oct 2021 13:52:24 +0200 Cornelia Huck wrote: > On Wed, Oct 06 2021, Halil Pasic wrote: > > > The virtio specification virtio-v1.1-cs01 states: Transitional devices > > MUST detect Legacy drivers by detecting that VIRTIO_F_VERSION_1 has not > > been acknowledged by the driver. This i

Re: virtio-net: kernel panic in virtio_net.c

2021-10-07 Thread Greg KH
On Thu, Oct 07, 2021 at 04:02:10PM +0200, Corentin Noël wrote: > Le jeudi 07 octobre 2021 à 06:51 -0700, Eric Dumazet a écrit : > > On Thu, Oct 7, 2021 at 6:11 AM Michael S. Tsirkin > > wrote: > > > On Thu, Oct 07, 2021 at 02:04:22PM +0200, Corentin Noël wrote: > > > > I've been experiencing crash

Re: virtio-net: kernel panic in virtio_net.c

2021-10-07 Thread Michael S. Tsirkin
On Thu, Oct 07, 2021 at 02:04:22PM +0200, Corentin Noël wrote: > I've been experiencing crashes with 5.14-rc1 and above that do not > occur with 5.13, > > here is the crash trace: > > [ 61.346677] skbuff: skb_over_panic: text:881ae2c7 len:3762 > put:3762 head:8a5ec8c22000 data:8

Re: [PATCH 1/1] virtio: write back F_VERSION_1 before validate

2021-10-07 Thread Cornelia Huck
On Wed, Oct 06 2021, Halil Pasic wrote: > The virtio specification virtio-v1.1-cs01 states: Transitional devices > MUST detect Legacy drivers by detecting that VIRTIO_F_VERSION_1 has not > been acknowledged by the driver. This is exactly what QEMU as of 6.1 > has done relying solely on VIRTIO_F_

Re: [PATCH v1 6/6] x86: remove memory hotplug support on X86_32

2021-10-07 Thread David Hildenbrand
On 07.10.21 11:15, Oscar Salvador wrote: On Wed, Sep 29, 2021 at 04:36:00PM +0200, David Hildenbrand wrote: CONFIG_MEMORY_HOTPLUG was marked BROKEN over one year and we just restricted it to 64 bit. Let's remove the unused x86 32bit implementation and simplify the Kconfig. Signed-off-by: David