mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mike Christie <michael.christie@oracle.com>
To: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Oleg Nesterov <oleg@redhat.com>,
	linux@leemhuis.info, nicolas.dichtel@6wind.com, axboe@kernel.dk,
	torvalds@linux-foundation.org, linux-kernel@vger.kernel.org,
	virtualization@lists.linux-foundation.org, mst@redhat.com,
	sgarzare@redhat.com, jasowang@redhat.com, stefanha@redhat.com,
	brauner@kernel.org
Subject: Re: Can vhost translate to io_uring?
Date: Wed, 14 Jun 2023 12:59:07 -0500	[thread overview]
Message-ID: <53991bdf-bff8-6d94-77dc-c8aba70eeba5@oracle.com> (raw)
In-Reply-To: <f65f9809-7f52-5bb1-7e78-f22b813500c2@oracle.com>

On 6/14/23 1:25 AM, michael.christie@oracle.com wrote:
> It would be nice if the vhost layer could use the io-wq code as sort of
> generic worker. I can look into what that would take if Jens is ok
> with that type of thing.

We could use the io-wq code, but we hit the same problems as before:

1. We still need to modify the vhost drivers like I mentioned below so when
the task gets SIGKILL the drivers fail instead of running the work like
normal.

2. We still need some code like the patch below so when the worker task
exits and is freed the vhost drivers stop calling io_wq_enqueue and
don't access the io_wq anymore.

3. There's some other small things which seem easy to change like we need
to create the worker thread/task_struct when io_wq_create is run instead of
io_wq_enqueue. The problem is that we can queue work from threads that
have different mms than we want to use.


I've done #2 in the patch below. I'm almost done with #1. Just testing it
now. When that's done, we can remove the signal hacks and then decide if we
want to go further and switch to io-wq.


> 
> For vhost, I just submitted a patch to the vhost layer that allow us to
> switch out the vhost worker thread when IO is running:
> 
> https://lists.linuxfoundation.org/pipermail/virtualization/2023-June/067246.html
> 
> After that patch, I just need to modify vhost_worker/vhost_task_fn so
> when get_signal returns true we set the worker to NULL and do a synchronize_rcu.
> Then I just need to modify vhost-scsi so it detects when the worker is NULL
> and modify the flush code so it handles work that didn't get to run.
> 
> 
> 


  parent reply	other threads:[~2023-06-14 17:59 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-01 18:32 [PATCH 1/1] fork, vhost: Use CLONE_THREAD to fix freezer/ps regression Mike Christie
2023-06-01 19:11 ` Michael S. Tsirkin
2023-06-02  0:43 ` Eric W. Biederman
2023-06-02 14:34 ` Nicolas Dichtel
2023-06-02 19:22 ` Oleg Nesterov
2023-06-03  3:44   ` Eric W. Biederman
2023-06-05 13:26     ` Oleg Nesterov
2023-06-03  4:15   ` [CFT][PATCH v3] " Eric W. Biederman
2023-06-04  3:28     ` michael.christie
2023-06-05 15:10       ` Oleg Nesterov
2023-06-05 15:46         ` Mike Christie
2023-06-06 12:16           ` Oleg Nesterov
2023-06-06 15:57             ` Mike Christie
2023-06-06 19:39               ` Oleg Nesterov
2023-06-06 20:38                 ` Mike Christie
2023-06-14  6:02                   ` Can vhost translate to io_uring? Eric W. Biederman
2023-06-14  6:25                     ` michael.christie
2023-06-14 14:30                       ` Jens Axboe
2023-06-14 17:59                       ` Mike Christie [this message]
2023-06-14 14:20                     ` Michael S. Tsirkin
2023-06-14 15:02                     ` Michael S. Tsirkin
2023-06-11 20:27                 ` [CFT][PATCH v3] fork, vhost: Use CLONE_THREAD to fix freezer/ps regression Eric W. Biederman
2023-06-14 17:08                   ` Oleg Nesterov
2023-06-05 12:38     ` Oleg Nesterov
2023-06-05 13:48 ` [PATCH 1/1] " Oleg Nesterov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=53991bdf-bff8-6d94-77dc-c8aba70eeba5@oracle.com \
    --to=michael.christie@oracle.com \
    --cc=axboe@kernel.dk \
    --cc=brauner@kernel.org \
    --cc=ebiederm@xmission.com \
    --cc=jasowang@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@leemhuis.info \
    --cc=mst@redhat.com \
    --cc=nicolas.dichtel@6wind.com \
    --cc=oleg@redhat.com \
    --cc=sgarzare@redhat.com \
    --cc=stefanha@redhat.com \
    --cc=torvalds@linux-foundation.org \
    --cc=virtualization@lists.linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®