Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp438182pxb; Wed, 22 Sep 2021 05:41:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzps/lIWqSHJSKPR0y/33yQRm8CFiqladJ6vKW3YE7M/yuI7jbR/tQWsqT9b83LceRbVGE3 X-Received: by 2002:a17:906:25d4:: with SMTP id n20mr40684058ejb.399.1632314506230; Wed, 22 Sep 2021 05:41:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632314506; cv=none; d=google.com; s=arc-20160816; b=no1G7yECRXIUJ2NPC6XYgW/ALfpiBnzcWGM+Fq1ibisg13eRrKgnB4ogvb7QXxrDSK 2mY1hkIumgcXB6GWLU/4H9JMRCoZ7wYp0DV/SKAnstM7joOkZ1xPXj/274Dt8lDSyBgs nNEnv3zMxHDMwy4HvHlVM8OJR10wpNoyk0Ff41ymQukaQ+lvknJNLLI1/hUHP0Zf4N9s 5d5Bbz8mPtSI2T9ctNwCFhQHit0D0dj3xfGB8pJW3QJ7XBEutXOc9kXvL54feqKLi9hD yFMUGM4wBxH476TTUG8kgJSxOzU+iR+7vXuQORNjx4DTc79n6UHGHN9Hms65O5QWPETH Ek9g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=5152Tk1Suu7vhUf/ZuLn4PoUTSNpbzT6DnwqzrHP4oo=; b=DX27OoSnwgyYOBtNyAuXNh7xg3x+0jFLxoMbXN3TIcte9XKez25dQxiLooMbfnNQIz Dvz1pH+riW1tyKoxkrhp+wFJCxBzVETF9pLzYFyLCXd/awl567TXxARdtgBF05snzqLL SoRbFi0GbBrpGCXoUL+g1XtfgZMa3Q/9e7i1JJRXaJ7NsQ+vkVz+FdYxlwBjSs5p9erD jsKtWoB+QKq2SKOMGfnRGutx1m1+EXDlvTROzVxZbDdF4IhYYzDiEQALVb1EjyS36gd2 Mn24KyuW0tD7oaC0hsX1usN4nJCMZmpM4XZtoa/IfUfW7IzEGf5x3kkDdhgEl5ENJQ9l Q/Eg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s15si2536580ejc.168.2021.09.22.05.41.22; Wed, 22 Sep 2021 05:41:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236010AbhIVMlU (ORCPT + 99 others); Wed, 22 Sep 2021 08:41:20 -0400 Received: from mail.kernel.org ([198.145.29.99]:47776 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235947AbhIVMlS (ORCPT ); Wed, 22 Sep 2021 08:41:18 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 5DC6560F9D; Wed, 22 Sep 2021 12:39:46 +0000 (UTC) Date: Wed, 22 Sep 2021 14:39:44 +0200 From: Christian Brauner To: Geert Uytterhoeven Cc: Mike Christie , hdanton@sina.com, Christoph Hellwig , Stefan Hajnoczi , Jason Wang , "Michael S. Tsirkin" , "Stefano Garzarella --cc virtualization @ lists . linux-foundation . org" , virtualization@lists.linux-foundation.org, Jens Axboe , Linux Kernel Mailing List Subject: Re: [PATCH V2 3/9] fork: move PF_IO_WORKER's kernel frame setup to new flag Message-ID: <20210922123944.qo3quonmrz2fv2bb@wittgenstein> References: <20210921215218.89844-1-michael.christie@oracle.com> <20210921215218.89844-4-michael.christie@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > 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 > > 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))) { Yep, I stumbled over the same thing!