Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp435184pxb; Wed, 22 Sep 2021 05:37:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxtbqdKfK0emjFLkI0NhJDe5hmejBFDqMlRFU6Oo4Y49aEs7al4JwhrK1adbSbx2QhLa9Yt X-Received: by 2002:a17:906:1945:: with SMTP id b5mr39944867eje.347.1632314263656; Wed, 22 Sep 2021 05:37:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632314263; cv=none; d=google.com; s=arc-20160816; b=RuUFkpFOXqiaZ+XrslAmvefchF3hkD2boIIG+ASPJKF870H1FY1rKCLaXIQJsZYvIs NeY2lwZWEglyCfhSVxv9SMN54OZy8aooE6FF4aZ5S6Q6Pcol8vvZfIhLmt7kzsg8ALbi AugfGQ/hLVOFi5qE6k8mPjWGae1PkLCZu8iX1mdbzTiP4vaKG0rJLNmndrDJTtNuL6JU b3MynPxDAiqcRBaA34xt2MnAjx2eip3Yn3tLTe3gX5XsBPy3GvecCLcVX2RLLfndILsU NF0o4VLYB1ecfjEi0ZJTGKTU5gD3x2ktShr+/ny/285VqkwWQ6l2DR8Ke83sca/TkwDy /VbQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version; bh=R/nhv1c3kfB+8GUpcbKdwWWl/t1iJqUbmVf63u/XqWY=; b=z20eiPcoR1JyVneN/xXJ/wA1aCyzDWKXIaW/PYpuxco/7ddB+V76ShiLhsgZxbvBfP koh17bDgRkzn6lC5c4OKrO3pyQDi5iXL628gBZ76VA7OgSw2bccEkcq5sxrpOTHOKff/ fgJSsn2QpGUVTXb2R+4Yj+8ek3aJp6lXVeRpr6EtGtOm78zmc5mVR8TkVY8s3r3/B92i vtGnf5JBZ1YNrnXiXRw1720Ma+AnHBBbnewu8as4BMn8d6WPxygX093WCC0tvni3oG6A 6m2aN6i38ic43V5PgOf854nDuu5x+dovMn8quz+j1KqA1qSnm4fN2emLnQ/liiSd/3Fw drig== 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 nd15si2552346ejc.463.2021.09.22.05.37.18; Wed, 22 Sep 2021 05:37:43 -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 S236002AbhIVMeU (ORCPT + 99 others); Wed, 22 Sep 2021 08:34:20 -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-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