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 92BCEC433EF for ; Wed, 22 Sep 2021 12:32:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 776CC60F9D for ; Wed, 22 Sep 2021 12:32:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236013AbhIVMeV (ORCPT ); Wed, 22 Sep 2021 08:34:21 -0400 Received: from mail-vk1-f171.google.com ([209.85.221.171]:36783 "EHLO mail-vk1-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235834AbhIVMeT (ORCPT ); Wed, 22 Sep 2021 08:34:19 -0400 Received: by mail-vk1-f171.google.com with SMTP id t186so1077273vkd.3 for ; Wed, 22 Sep 2021 05:32:49 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=R/nhv1c3kfB+8GUpcbKdwWWl/t1iJqUbmVf63u/XqWY=; b=fHP/xYtCuLN+tA4vsSqFwHgav0TX/QXdNOER72wqr7opICZ7U+h/04Hwwm9+qPjn4V IiLQmotEf6J8eLofy5i9ynsyyKshWE12W9pNVpuxOsOupUEcTCJzsp+LhJClH41P+ssD 6cCXdWPtNkFy+VteHdO8wOSTt7lRPA0rRP+ElGE9FpEHsICyrGkqOnoUIJAFyX2N4ldK j3P6VB+voU1kK/cU0MO+MSbT08aWleReGkbU2VxDcnwJq6K8UvoQRgIHr1qrOf/08RO7 d8kKJ/ujM9CH6ZShLrGBWvNw58iWLSzHaXvcFKiK60rv3ERyTl3Moq1rffhmPxbx53KJ KtIw== X-Gm-Message-State: AOAM532mkMecTdXOGV8cjlOnhNlBFUjmoQWa8PtIQ6XBQvni+DJo+9hG +MwWh+yOOiU3xwV5syDSbyTapmLsLnxTPoteyF0= X-Google-Smtp-Source: ABdhPJxth2FYG46f0S5OWGAuSsEkUNQOSjbi8d7mL7ridoO4xhKND97RZqrl1VQPIyKGRp4zN7o8NWtJxjo0/BMvl6c= X-Received: by 2002:a1f:5e14:: with SMTP id s20mr23127866vkb.7.1632313969468; Wed, 22 Sep 2021 05:32:49 -0700 (PDT) MIME-Version: 1.0 References: <20210921215218.89844-1-michael.christie@oracle.com> <20210921215218.89844-4-michael.christie@oracle.com> In-Reply-To: <20210921215218.89844-4-michael.christie@oracle.com> From: Geert Uytterhoeven Date: Wed, 22 Sep 2021 14:32:37 +0200 Message-ID: Subject: Re: [PATCH V2 3/9] fork: move PF_IO_WORKER's kernel frame setup to new flag To: Mike Christie Cc: 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, Christian Brauner , Jens Axboe , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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))) { > /* kernel thread */ > memset(frame, 0, sizeof(struct fork_frame)); > frame->regs.sr = PS_S; With the above fixed, for m68k: Acked-by: Geert Uytterhoeven Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds