All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christian Brauner <christian.brauner@ubuntu.com>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Mike Christie <michael.christie@oracle.com>,
	hdanton@sina.com, Christoph Hellwig <hch@infradead.org>,
	Stefan Hajnoczi <stefanha@redhat.com>,
	Jason Wang <jasowang@redhat.com>,
	"Michael S. Tsirkin" <mst@redhat.com>,
	"Stefano Garzarella --cc virtualization @ lists .
	linux-foundation . org"  <sgarzare@redhat.com>,
	virtualization@lists.linux-foundation.org,
	Jens Axboe <axboe@kernel.dk>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH V2 3/9] fork: move PF_IO_WORKER's kernel frame setup to new flag
Date: Wed, 22 Sep 2021 14:45:19 +0200	[thread overview]
Message-ID: <20210922124519.rynz5uec7wpozbtf@wittgenstein> (raw)
In-Reply-To: <CAMuHMdXhtq-6vcU_1qYfT_ChPGsnhLAA_yZwPz7ERJgxJERK7Q@mail.gmail.com>

On Wed, Sep 22, 2021 at 02:32:37PM +0200, Geert Uytterhoeven wrote:
> Hi Mike,
> 
> On Tue, Sep 21, 2021 at 11:55 PM Mike Christie
> <michael.christie@oracle.com> wrote:
> > 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 kernel_clone_args flag, KERN_WORKER_USER.
> >
> > Signed-off-by: Mike Christie <michael.christie@oracle.com>
> 
> Thanks for your patch!
> 
> > --- a/arch/m68k/kernel/process.c
> > +++ b/arch/m68k/kernel/process.c
> > @@ -157,7 +157,8 @@ int copy_thread(unsigned long clone_flags, unsigned long usp, unsigned long arg,
> >          */
> >         p->thread.fs = get_fs().seg;
> >
> > -       if (unlikely(p->flags & (PF_KTHREAD | PF_IO_WORKER))) {
> > +       if (unlikely(p->flags & (PF_KTHREAD) ||
> > +                    worker_flags & KERN_WORKER_USER)) {
> 
> I guess it wouldn't hurt to add parentheses to improve
> readability:
> 
>     if (unlikely((p->flags & (PF_KTHREAD)) ||
>                  (worker_flags & KERN_WORKER_USER))) {
> 
> >                 /* kernel thread */
> >                 memset(frame, 0, sizeof(struct fork_frame));
> >                 frame->regs.sr = PS_S;
> 
> With the above fixed, for m68k:
> Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>

Acked-by: Christian Brauner <christian.brauner@ubuntu.com>

  parent reply	other threads:[~2021-09-22 12:45 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-21 21:52 [PATCH V2 0/9] Use copy_process/create_io_thread in vhost layer Mike Christie
2021-09-21 21:52 ` Mike Christie
2021-09-21 21:52 ` [PATCH V2 1/9] fork: Make IO worker options flag based Mike Christie
2021-09-21 21:52   ` Mike Christie
2021-09-22 12:44   ` Christian Brauner
2021-09-21 21:52 ` [PATCH V2 2/9] fork: pass worker_flags to copy_thread Mike Christie
2021-09-21 21:52   ` Mike Christie
2021-09-22 12:42   ` Christian Brauner
2021-09-22 14:18   ` Geert Uytterhoeven
2021-09-22 14:18     ` Geert Uytterhoeven
2021-09-21 21:52 ` [PATCH V2 3/9] fork: move PF_IO_WORKER's kernel frame setup to new flag Mike Christie
2021-09-21 21:52   ` Mike Christie
2021-09-22 12:32   ` Geert Uytterhoeven
2021-09-22 12:32     ` Geert Uytterhoeven
2021-09-22 12:39     ` Christian Brauner
2021-09-22 12:45     ` Christian Brauner [this message]
2021-09-21 21:52 ` [PATCH V2 4/9] fork: add option to not clone or dup files Mike Christie
2021-09-21 21:52   ` Mike Christie
2021-09-22 12:46   ` Christian Brauner
2021-09-21 21:52 ` [PATCH V2 5/9] fork: add helper to clone a process Mike Christie
2021-09-21 21:52   ` Mike Christie
2021-09-22 12:50   ` Christian Brauner
2021-09-21 21:52 ` [PATCH V2 6/9] io_uring: switch to kernel_worker Mike Christie
2021-09-21 21:52   ` Mike Christie
2021-09-22 12:53   ` Christian Brauner
2021-09-21 21:52 ` [PATCH V2 7/9] fork: Add worker flag to ignore signals Mike Christie
2021-09-21 21:52   ` Mike Christie
2021-09-22 12:52   ` Christian Brauner
2021-09-21 21:52 ` [PATCH V2 8/9] vhost: move worker thread fields to new struct Mike Christie
2021-09-21 21:52   ` Mike Christie
2021-10-04 13:12   ` Michael S. Tsirkin
2021-10-04 13:12     ` Michael S. Tsirkin
2021-09-21 21:52 ` [PATCH V2 9/9] vhost: use kernel_worker to check RLIMITs and inherit v2 cgroups Mike Christie
2021-09-21 21:52   ` Mike Christie
2021-10-04 13:12   ` Michael S. Tsirkin
2021-10-04 13:12     ` Michael S. Tsirkin

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=20210922124519.rynz5uec7wpozbtf@wittgenstein \
    --to=christian.brauner@ubuntu.com \
    --cc=axboe@kernel.dk \
    --cc=geert@linux-m68k.org \
    --cc=hch@infradead.org \
    --cc=hdanton@sina.com \
    --cc=jasowang@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=michael.christie@oracle.com \
    --cc=mst@redhat.com \
    --cc=sgarzare@redhat.com \
    --cc=stefanha@redhat.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.