Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp1278769rwr; Fri, 5 May 2023 11:35:03 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5IaGtXTMa1Ypv/EfCogx9iNeOhdSbDXlMdHotJJdpVxYPaHBIftpxvtmEzotvHnaG1VOfM X-Received: by 2002:a17:90b:3685:b0:247:9456:6e13 with SMTP id mj5-20020a17090b368500b0024794566e13mr8113432pjb.11.1683311703509; Fri, 05 May 2023 11:35:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683311703; cv=none; d=google.com; s=arc-20160816; b=MJ++VVZ4n1ZMXVgXX/LTVerHa4rj9VsHsngXN/pAcdbSSBwOlXmSEOR6Y0SoCzfxmI vVvXSfNmvLfgyiBTQIR0v+5D7J9zzYAuQs8npg0HQ1ikuEI4O31BXPoC3OzX3QIpI0pz BGtM7JKOeTU+BxoigpREZLwmg6xLW1HJnovxLQZVHtBgAXnqOy9X0WMsaISm7baflwDG K3dxIyPUbj4QAM3FycbJjeq1Ry2uOt8mXweiyE8Qn2ONLlEb+ICGjHU24quZYKoChBli Udd3qLK3slGp52Gqox4u7OjgRu0iHQgzO+SUN9S1QBkc4gJ72Ny9Km/P76h7G/yi5wbN sBqQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=niEyfzemTkaSRMh1nlyeJEnYlz7/sxOKWncwH1LouFI=; b=NkKcAZKddcep0EZtxnZAT5j9C5ZwK5RwGsJLnLEFaUMInBm7KjrgEmr4CQhTuVcJbt 6JVSPf1jPmyE87ES/Mfcj3WuPUzZkSh45o+0nOtpICpCCJG+V1qVpZ7mO/Qx5/R+Hbvj MfMXly6d7AMtUa0etjS+pOufli8MCNKBgqTgZpR9kH7gL8vUeUrQDNTCHZs6LxU0Haev NT23MIkVk47rp+8z7XJkGpaqj0j/mBZBFV2CPyX+EmxP2pfaihR9Hy1RbzqWlzfIUZxj TUtuAKCBfpgXPQedXfuihBrUGU5gQadO61Ix8fSti+o/QQU4XIxAj0Y+m8C6wGyNd3re rtGw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=NCnL5UD8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i188-20020a636dc5000000b005215235fbd7si2439313pgc.365.2023.05.05.11.34.50; Fri, 05 May 2023 11:35:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=NCnL5UD8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232347AbjEESWd (ORCPT + 99 others); Fri, 5 May 2023 14:22:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42692 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230473AbjEESWb (ORCPT ); Fri, 5 May 2023 14:22:31 -0400 Received: from mail-ej1-x635.google.com (mail-ej1-x635.google.com [IPv6:2a00:1450:4864:20::635]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0064A1385C for ; Fri, 5 May 2023 11:22:29 -0700 (PDT) Received: by mail-ej1-x635.google.com with SMTP id a640c23a62f3a-965fc25f009so77950166b.3 for ; Fri, 05 May 2023 11:22:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; t=1683310948; x=1685902948; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=niEyfzemTkaSRMh1nlyeJEnYlz7/sxOKWncwH1LouFI=; b=NCnL5UD8Ga+om3tqFsVPg6ntFsZvE6IBTNqNT1MC05W5bdcn0gpY0bxjeL8h5PNOev C8HeLGjnhc1gzl4qFzyBU/T05lsuUo+Xj1Ujx2PeM/9umb/y12tFEIhoDkXaBeGWP9JX Esl+5lmeG6LO/kaWq1SLEX4gA2c089nnTNfd8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683310948; x=1685902948; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=niEyfzemTkaSRMh1nlyeJEnYlz7/sxOKWncwH1LouFI=; b=J3dW3Fczd32nxGY3LLmodIC0ViWDtiHOf+ylJ/q5Jd6F6e3b1xoA/f06LnpB1nQD5q 1N/UcaboPfOdce1nH8Y7lh2FObxRcp7/5OaCd51Ar0DD1LUAS+9MNj5a/xvRY4WESsGX A7pqV4VtsRhl1OsMVcj1n9b5D6DenU7XIgQso/nvjse/u3+xmL1qcaI9LRfm/28qeW/P dwPB/rTG+6jXuN9HrPYRvbbiltQbl4kdKpaJ53EwySGX/HbcW61c2/qanQipogftF4UA CjN1rVm4e08EoiIWr5mQrK3Dz7KXN6JfH1tRUajzvQM31AkiS/uyBJEqrKG54D4iGC67 xxjQ== X-Gm-Message-State: AC+VfDzED2jIsyWG9Q4VYvL5yTNTPzsxrEDCPChLwV4Ef2rWVOGyZT3J 63KlDKvJFaql9TDmX++d7h7/aCLk7aJWggJ++P83/w== X-Received: by 2002:a17:907:3f17:b0:94a:474a:4dd7 with SMTP id hq23-20020a1709073f1700b0094a474a4dd7mr2316586ejc.60.1683310948251; Fri, 05 May 2023 11:22:28 -0700 (PDT) Received: from mail-ej1-f53.google.com (mail-ej1-f53.google.com. [209.85.218.53]) by smtp.gmail.com with ESMTPSA id n19-20020a17090625d300b0094a82a236cbsm1234868ejb.129.2023.05.05.11.22.26 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 05 May 2023 11:22:26 -0700 (PDT) Received: by mail-ej1-f53.google.com with SMTP id a640c23a62f3a-95f4c5cb755so372817566b.0 for ; Fri, 05 May 2023 11:22:26 -0700 (PDT) X-Received: by 2002:a17:907:720f:b0:933:1134:be1e with SMTP id dr15-20020a170907720f00b009331134be1emr2160145ejc.53.1683310946183; Fri, 05 May 2023 11:22:26 -0700 (PDT) MIME-Version: 1.0 References: <20230202232517.8695-1-michael.christie@oracle.com> <20230202232517.8695-9-michael.christie@oracle.com> In-Reply-To: From: Linus Torvalds Date: Fri, 5 May 2023 11:22:09 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v11 8/8] vhost: use vhost_tasks for worker threads To: nicolas.dichtel@6wind.com, Christian Brauner Cc: Mike Christie , hch@infradead.org, stefanha@redhat.com, jasowang@redhat.com, mst@redhat.com, sgarzare@redhat.com, virtualization@lists.linux-foundation.org, ebiederm@xmission.com, konrad.wilk@oracle.com, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, May 5, 2023 at 6:40=E2=80=AFAM Nicolas Dichtel wrote: > > Is this an intended behavior? > This breaks some of our scripts. It doesn't just break your scripts (which counts as a regression), I think it's really wrong. The worker threads should show up as threads of the thing that started them, not as processes. So they should show up in 'ps' only when one of the "show threads" flag is = set. But I suspect the fix is trivial: the virtio code should likely use CLONE_THREAD for the copy_process() it does. It should look more like "create_io_thread()" than "copy_process()", I thin= k. For example, do virtio worker threads really want their own signals and files? That sounds wrong. create_io_thread() uses all of CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_IO to share much more of the context with the process it is actually run withi= n. Christian? Mike? Linus