Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp440584pxb; Wed, 22 Sep 2021 05:45:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwJ/08yynuBWHu2ckoCUY9pqL+Vtg8BmsOi2Mge9i6k4haq4Apg1GMBx0M9wKZrdGZkAX9Q X-Received: by 2002:a17:906:7d83:: with SMTP id v3mr41618485ejo.216.1632314709679; Wed, 22 Sep 2021 05:45:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632314709; cv=none; d=google.com; s=arc-20160816; b=xiTZDklz5ZqcAELvqJ/KQr/DMKhnDIMDHtp0G0BBpOm91UYO+kWr9i+4/41a+I8a0w UO0+yo38ZwzpNkRolqwgJKhAbV3r5QwRnoQmo72gPhNLDx7INz0NCc7dooIFU27nocUM 7UM8SDpwBl0Q3FdPsVVqzTZoJFt+Rb3+TKFFPdDNnNxbZNxBdIWXgjkfY0t339xeI9cV aoC5grsGBo7JH36rQMAnNpo0osGLOtUdBeYNPoXdCZw09tiUY+xi9HHjYNWXUuot8vdW MJFFlCzW1SO06WkPxo+14HZXm3YVP5jTs8KwIW8A8kB60c+EG9lfpsOf8O/zr1OyhHr5 3HFg== 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=bt8JcWT9087A7Kzxz055fF7yCqwJ65FBM7o5mkMDM94=; b=VVLsOZJdrT76YSpuyBvBa286oOu7fk9DdOBtqKMmwc+3X/ZUrTygRWCPTdiNv4KwcG /BjyPtaelER8lsMhenvz0r5qWsRkvIcqFtLS9CVy7hlrz7ta4khGih/VNN9k0gfm1kVA x+8gLOXhYg4VwfX0wurDoQG0cT5sYbQs2r4zLFQF5mdWNY4xl/uWzgVCdRBg65kfR5IM 3o6VE+jUfaTwE/T4+5rGdtrbaTYDyrp24VEqruDv8fJuePATFwaVGxGiQtnQZ6+wpQPB 7ctPhKNNTph9uHFaS5Gma132bnCW2ByBZ2eLkgNSAEESvdq2LoiKiX5T3F7Md3H831js vyqg== 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 a64si2626771edf.128.2021.09.22.05.44.45; Wed, 22 Sep 2021 05:45:09 -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 S235914AbhIVMoU (ORCPT + 99 others); Wed, 22 Sep 2021 08:44:20 -0400 Received: from mail.kernel.org ([198.145.29.99]:49034 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235781AbhIVMoT (ORCPT ); Wed, 22 Sep 2021 08:44:19 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 8CD69610A0; Wed, 22 Sep 2021 12:42:47 +0000 (UTC) Date: Wed, 22 Sep 2021 14:42:45 +0200 From: Christian Brauner To: Mike Christie Cc: hdanton@sina.com, hch@infradead.org, stefanha@redhat.com, jasowang@redhat.com, mst@redhat.com, sgarzare@redhat.com, virtualization@lists.linux-foundation.org, axboe@kernel.dk, linux-kernel@vger.kernel.org Subject: Re: [PATCH V2 2/9] fork: pass worker_flags to copy_thread Message-ID: <20210922124245.m4gucclabgyijqei@wittgenstein> References: <20210921215218.89844-1-michael.christie@oracle.com> <20210921215218.89844-3-michael.christie@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20210921215218.89844-3-michael.christie@oracle.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Sep 21, 2021 at 04:52:11PM -0500, Mike Christie wrote: > We need to break up PF_IO_WORKER into the parts that are used for > scheduling and signal handling and the part that tells copy_thread to > treat it as a special type of thread during setup. This patch passes the > worker_flags to copy_thread, so in the next patch we can add new worker > flags that function can see. > > Signed-off-by: Mike Christie > --- > arch/alpha/kernel/process.c | 2 +- > arch/arc/kernel/process.c | 2 +- > arch/arm/kernel/process.c | 3 ++- > arch/arm64/kernel/process.c | 3 ++- > arch/csky/kernel/process.c | 3 ++- > arch/h8300/kernel/process.c | 3 ++- > arch/hexagon/kernel/process.c | 2 +- > arch/ia64/kernel/process.c | 3 ++- > arch/m68k/kernel/process.c | 2 +- > arch/microblaze/kernel/process.c | 2 +- > arch/mips/kernel/process.c | 2 +- > arch/nds32/kernel/process.c | 3 ++- > arch/nios2/kernel/process.c | 2 +- > arch/openrisc/kernel/process.c | 3 ++- > arch/parisc/kernel/process.c | 3 ++- > arch/powerpc/kernel/process.c | 2 +- > arch/riscv/kernel/process.c | 2 +- > arch/s390/kernel/process.c | 3 ++- > arch/sh/kernel/process_32.c | 2 +- > arch/sparc/kernel/process_32.c | 2 +- > arch/sparc/kernel/process_64.c | 2 +- > arch/um/kernel/process.c | 3 ++- > arch/x86/kernel/process.c | 2 +- > arch/xtensa/kernel/process.c | 2 +- > include/linux/sched/task.h | 2 +- > kernel/fork.c | 3 ++- > 26 files changed, 37 insertions(+), 26 deletions(-) > > diff --git a/arch/alpha/kernel/process.c b/arch/alpha/kernel/process.c > index a5123ea426ce..6005b0dfe7e2 100644 > --- a/arch/alpha/kernel/process.c > +++ b/arch/alpha/kernel/process.c > @@ -235,7 +235,7 @@ release_thread(struct task_struct *dead_task) > */ > int copy_thread(unsigned long clone_flags, unsigned long usp, > unsigned long kthread_arg, struct task_struct *p, > - unsigned long tls) > + unsigned long tls, u32 worker_flags) After I unified all of those calls across all arches I think we should start thinking about a way to maybe have a substruct struct copy_thread or something to encompass this information that gets passed to copy_thread() instead of individual arguments. struct copy_thread would just contain the information all the arches need and nothing more. That's better than passing all of struct kernel_clone_args imho. But that's a separate cleanup I had in mind for a while and is unrelated to your patch. I think it's fine to do it this way for now. Acked-by: Christian Brauner