From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 98124C433EF for ; Wed, 22 Sep 2021 12:39:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 725C960555 for ; Wed, 22 Sep 2021 12:39:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236007AbhIVMlW (ORCPT ); Wed, 22 Sep 2021 08:41:22 -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!