* Conference listed in CORE Ranking
** Google Scholar H5-Index = 23
*** Best papers selected for SCI/SSCI journals
--
WorldCIST'22 - 10th World Conference on Information Systems and Technol
This adds a new flag, PF_USER_WORKER, that's used for behavior common to
to both PF_IO_WORKER and users like vhost which will use the new
kernel_worker helpers that will use the flag and are added later in this
patchset.
The common behavior PF_USER_WORKER covers is the initial frame and fpu
setup
Userspace doesn't know about PF_USER_WORKER threads, so it can't do wait
to clean them up. For cases like where qemu will do dynamic/hot add/remove
of vhost devices, then we need to auto reap the thread like was done for
the kthread case, because qemu does not know what API the kernel/vhost
layer i
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(
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
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
For vhost workers we use the kthread API which inherit's its values from
and checks against the kthreadd thread. This results in the wrong RLIMITs
being checked. This patch has us use the kernel_copy_process function
which will inherit its values/checks from the thread that owns the device.
Signed
create_io_thread is not used anymore so remove it.
Signed-off-by: Mike Christie
---
include/linux/sched/task.h | 1 -
kernel/fork.c | 22 --
2 files changed, 23 deletions(-)
diff --git a/include/linux/sched/task.h b/include/linux/sched/task.h
index 2188be3a3142
Convert io_uring and io-wq to use kernel_worker.
Signed-off-by: Mike Christie
Reviewed-by: Christian Brauner
Reviewed-by: Jens Axboe
Reviewed-by: Christoph Hellwig
---
fs/io-wq.c| 15 ---
fs/io_uring.c | 11 +--
2 files changed, 13 insertions(+), 13 deletions(-)
diff
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
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 patch.
Signed-off-by: Mike Christie
Reviewed-by: Stefan Hajnoczi
Acked-by: Michael S. Tsirkin
Reviewed-by: Christoph Hellwig
The following patches made over Linus's tree, allow the vhost layer to do
a copy_process on the thread that does the VHOST_SET_OWNER ioctl like how
io_uring does a copy_process against its userspace app. This allows the
vhost layer's worker threads to inherit cgroups, namespaces, address
space, etc
On 11/21/21 10:49 AM, Mike Christie wrote:
> Convert io_uring and io-wq to use kernel_worker.
I don't like the kernel_worker name, that implies it's always giving you
a kernel thread or kthread. That's not the io_uring use case, it's
really just a thread off the original task that just happens to
On Fri, Nov 19, 2021 at 11:09 AM Parav Pandit wrote:
>
>
>
> > From: Jason Wang
> > Sent: Friday, November 19, 2021 8:12 AM
> >
> > On Thu, Nov 18, 2021 at 1:58 PM Eli Cohen wrote:
> > >
> > > Add support for querying virtqueue statistics. Supported statistics are:
> > >
> > > Received_desc - nu
On Fri, Nov 19, 2021 at 7:31 PM Andrey Ryabinin wrote:
>
>
>
> On 11/16/21 8:00 AM, Jason Wang wrote:
> > On Mon, Nov 15, 2021 at 11:32 PM Andrey Ryabinin
> > wrote:
> >>
> >> Currently vhost_net_release() uses synchronize_rcu() to synchronize
> >> freeing with vhost_zerocopy_callback(). However
On Fri, Nov 19, 2021 at 11:10 PM Halil Pasic wrote:
>
> On Wed, 27 Oct 2021 10:21:04 +0800
> Jason Wang wrote:
>
> > This patch validate the used buffer length provided by the device
> > before trying to use it. This is done by record the in buffer length
> > in a new field in desc_state structur
On Mon, 22 Nov 2021 11:51:09 +0800
Jason Wang wrote:
> On Fri, Nov 19, 2021 at 11:10 PM Halil Pasic wrote:
> >
> > On Wed, 27 Oct 2021 10:21:04 +0800
> > Jason Wang wrote:
> >
> > > This patch validate the used buffer length provided by the device
> > > before trying to use it. This is done b
On Mon, 22 Nov 2021 06:35:18 +0100
Halil Pasic wrote:
> > I think it should be a common issue, looking at
> > vhost_vsock_handle_tx_kick(), it did:
> >
> > len += sizeof(pkt->hdr);
> > vhost_add_used(vq, head, len);
> >
> > which looks like a violation of the spec since it's TX.
>
> I'm not
On Mon, Nov 22, 2021 at 1:49 PM Halil Pasic wrote:
>
> On Mon, 22 Nov 2021 06:35:18 +0100
> Halil Pasic wrote:
>
> > > I think it should be a common issue, looking at
> > > vhost_vsock_handle_tx_kick(), it did:
> > >
> > > len += sizeof(pkt->hdr);
> > > vhost_add_used(vq, head, len);
> > >
> > >
On Mon, Nov 22, 2021 at 11:51:09AM +0800, Jason Wang wrote:
On Fri, Nov 19, 2021 at 11:10 PM Halil Pasic wrote:
On Wed, 27 Oct 2021 10:21:04 +0800
Jason Wang wrote:
> This patch validate the used buffer length provided by the device
> before trying to use it. This is done by record the in bu
On Mon, Nov 22, 2021 at 02:25:26PM +0800, Jason Wang wrote:
On Mon, Nov 22, 2021 at 1:49 PM Halil Pasic wrote:
On Mon, 22 Nov 2021 06:35:18 +0100
Halil Pasic wrote:
> > I think it should be a common issue, looking at
> > vhost_vsock_handle_tx_kick(), it did:
> >
> > len += sizeof(pkt->hdr);
21 matches
Mail list logo