Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp442182pxb; Wed, 22 Sep 2021 05:47:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzPtZz3kIPnnQIYIWcaHcnFmC9uAJWp5dH4+QnEyC3an8TkrB0rUPOVt6sGcfRN+9rVZDJZ X-Received: by 2002:a05:6402:694:: with SMTP id f20mr41876689edy.100.1632314837644; Wed, 22 Sep 2021 05:47:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632314837; cv=none; d=google.com; s=arc-20160816; b=wnFzJC4UeU0XysLJr6m5SfoCVqVkLErLneiI1Vt4LqpnAoNxrjjgntZOQ15aY4GEIG e9+Fu0yfovwYXhzIVBOU1rCAdCJ8IpXgpUd9PM0BGKMZYJnMYq+0UWLjuAzgxSRHMSZN uw1sfGwhhkEMC+oI67ix54VAOlP3XyeiaESsX8is/rOWJExxC1j5yyO5kR3scla7SHJF IXjR43o9O3zJ7yf8P1vaGHFN2vqIMUOo0oz6R60ddtOk4BDVNEgHuzkudOlzMC2y46ae xU+Tp2/2eAlzT2nc9K/tX/DR9SoOXu1PWAF7kZEmG37C2vGbYvhPB8nZqmYQEHs6ICpF kDDg== 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=ZlASCwmQgAgS2azlpIJI8f0GFKoD0hHbzofUobIZjuY=; b=zG+yRJ9xA5ZhfLMrvhgdSgbqxQb0cGNkyvb/j4ZPBRO3ge2j0wBAfH5WtRQ8oWInvi etXyZW1yOB7vpUuV2U7sBbmSkghG7zoz7f0Q79kRPG7UeVSqYfpCBkvSCqnw7dGdtxM5 qouJKFsQWpc6ySakFAU0bTsnOpo3dZ4iVwp3qE4S4kqjij5wWmE529xZ4tgno4tyRXeG 4BmD9PT01PZiwrjiYcA8Wrise8ngRmiwGg4dQ8gyOZqOwltTs4wfqSTwrguDg74WW38S XGmboRXEX4lFahGbGPu2yAFjQ+AWijqVG8LBj07c7EE25PajQnlMTnGAyCuy6ohdnYD/ mnsg== 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.46.50; Wed, 22 Sep 2021 05:47:17 -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 S235995AbhIVMqy (ORCPT + 99 others); Wed, 22 Sep 2021 08:46:54 -0400 Received: from mail.kernel.org ([198.145.29.99]:49988 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235227AbhIVMqx (ORCPT ); Wed, 22 Sep 2021 08:46:53 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 46DA5610A0; Wed, 22 Sep 2021 12:45:21 +0000 (UTC) Date: Wed, 22 Sep 2021 14:45:19 +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: <20210922124519.rynz5uec7wpozbtf@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))) { > > > /* kernel thread */ > > memset(frame, 0, sizeof(struct fork_frame)); > > frame->regs.sr = PS_S; > > With the above fixed, for m68k: > Acked-by: Geert Uytterhoeven Acked-by: Christian Brauner