Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2256551rwd; Mon, 15 May 2023 09:10:17 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6ENQo9FflGRjAHAdpnlb0DZnBMcXYIh8ZJWTk9RA1GC7vKzhcQIvxiVpcF09uSTlnabcuq X-Received: by 2002:a05:6a00:1681:b0:639:c88b:c3e0 with SMTP id k1-20020a056a00168100b00639c88bc3e0mr47439984pfc.22.1684167016845; Mon, 15 May 2023 09:10:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684167016; cv=none; d=google.com; s=arc-20160816; b=BFMCJFOjV65ywR8FbaNSpLxbW90Qsw0oB3Bn655me5bSHTLuAV1q5tcvksY+Vb4Se4 7+kqVv1+d3VLq/sRKQlozpPXKgzzjG3pinuQRigZcz83vRIQ7nMdnATkzdvF5LmY/kMs XkrgwprNHNml3tRUynFD7Lgq/vMLc+HuSt52K/WG68Ti4dDmC6nwqNpxEJSl+p71Lb45 xw0aaH9wpp80jOUKSNL8Wx2SUhoNLCZ80juhozGK7hyhLfqmA7k3m282ZXkv0Gbii6uV +YtCvsoZj5y/V3iwCpgdvrom6fb6qZlzvXVWlD7ujhCB8+hmFXirOJ5GkWoqLNiE7DQk 6//A== 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=WgkXNey1qqkRYDn0ndFfina8YyIW2oFgV1/nBHyisSM=; b=b35gjSBfR7gY0QraXA5PRfR5tE0JEVxyDNJxOQt8oCzH9x3KP9j7+r5teODAkopn3x ETcRst4pgyVBtKWaE3PPiqn7J1OjBTawonBNtKQoR13jqpZ/o61Bpk+0omIe/41AC8x0 HNKuJaV2bDj+t5kjiVxYh7enTZg5Bya+SgON24yPNVpNBEnoZxTvFii5uw9w2EO8ByhI cNrOSi01dkupDQomf5F/dYW8Ql/A/xD5p7a1rpTmi3p+HNzrpAbCep1DFMw+pjd/VSwB JvbijYAd9eM2+7omEFfkIffT6gR3Ince5zwoOEFT6KHFgAIfenVseFLFrHwoyhcALtpx udbw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=L0mzWjPI; 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 z6-20020aa79586000000b006432e218a1csi17200618pfj.152.2023.05.15.09.10.00; Mon, 15 May 2023 09:10:16 -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=L0mzWjPI; 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 S241894AbjEOQCQ (ORCPT + 99 others); Mon, 15 May 2023 12:02:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33928 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241655AbjEOQCL (ORCPT ); Mon, 15 May 2023 12:02:11 -0400 Received: from mail-lf1-x12c.google.com (mail-lf1-x12c.google.com [IPv6:2a00:1450:4864:20::12c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0C698F9 for ; Mon, 15 May 2023 09:02:10 -0700 (PDT) Received: by mail-lf1-x12c.google.com with SMTP id 2adb3069b0e04-4f139de8cefso66182697e87.0 for ; Mon, 15 May 2023 09:02:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; t=1684166528; x=1686758528; 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=WgkXNey1qqkRYDn0ndFfina8YyIW2oFgV1/nBHyisSM=; b=L0mzWjPIfIXM4lY9pDFM6KcSPIwfsMmZiDUA8szt3u6/o0JzcAxopC9UPGIOU6jY0A ZXrfX2RvrYXwmAZV4U+lQc7JImALy/RifvwIPBcS4DoVwoqxF7dnXMwyKptjvB8NY41I MRXjxGr1Tlptfs8ZlSNOeKddWFX7GOyEOrrkQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684166528; x=1686758528; 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=WgkXNey1qqkRYDn0ndFfina8YyIW2oFgV1/nBHyisSM=; b=Li/tIW6LExYiqlq+nExzojO5nCPPu1p/POzLNCcJgClEgFKvewkHmla/8iwjccHLDl StiggJFLAluQCDLfaP/fcUxDit71xRlHrzKhilZc3OQ4EEI9pkwCVOmCN2I9jeVquVxj vrRYRphn9JDBRQ128Ifnc+1IiPr/MEkMbg1XneKmvxtIwzELyDm/qba8uj/PlYRBpUVU 6VkGc4Zv3ykMrOZoOQ1x2WQkMcP0uvuP4riXwiFy3jUaDKZGLlDNSPg7lkZdINLYfg81 Vj1pGE8KlsVRgd+RKENn4rFtZkOhLl8xV/aOnSplCz9hskDeDc+aY8ckCBUbDZh7H00G N8yA== X-Gm-Message-State: AC+VfDwMHEgMpZWIAqS/eB73qDRJZ8+vStNH93vd0L/K7TmV5jH0vB07 cG5xFHP/PH7wLQ4jWvyK3R2ZEQCs6QNcY+1CcCi3EA== X-Received: by 2002:ac2:5fee:0:b0:4f1:4898:d183 with SMTP id s14-20020ac25fee000000b004f14898d183mr6189515lfg.25.1684166527967; Mon, 15 May 2023 09:02:07 -0700 (PDT) Received: from mail-lf1-f54.google.com (mail-lf1-f54.google.com. [209.85.167.54]) by smtp.gmail.com with ESMTPSA id t27-20020ac243bb000000b004f27d033994sm1251964lfl.267.2023.05.15.09.02.07 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 15 May 2023 09:02:07 -0700 (PDT) Received: by mail-lf1-f54.google.com with SMTP id 2adb3069b0e04-4f139de8cefso66182535e87.0 for ; Mon, 15 May 2023 09:02:07 -0700 (PDT) X-Received: by 2002:a17:907:97c4:b0:966:4669:7e8d with SMTP id js4-20020a17090797c400b0096646697e8dmr27235914ejc.16.1684166217079; Mon, 15 May 2023 08:56:57 -0700 (PDT) MIME-Version: 1.0 References: <20230202232517.8695-1-michael.christie@oracle.com> <20230202232517.8695-9-michael.christie@oracle.com> <78c5e150-26cf-7724-74ee-4a0b16b944b1@oracle.com> <48842e92-835e-bc3f-7118-48b8f415f532@leemhuis.info> <20230515-vollrausch-liebgeworden-2765f3ca3540@brauner> <33b84605-1d0c-1b0e-7927-7ffa96b3c308@kernel.dk> In-Reply-To: <33b84605-1d0c-1b0e-7927-7ffa96b3c308@kernel.dk> From: Linus Torvalds Date: Mon, 15 May 2023 08:56:39 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v11 8/8] vhost: use vhost_tasks for worker threads To: Jens Axboe Cc: Christian Brauner , Thorsten Leemhuis , Mike Christie , nicolas.dichtel@6wind.com, Linux kernel regressions list , 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 Mon, May 15, 2023 at 8:52=E2=80=AFAM Jens Axboe wrote: > > Only potential downside is that it does make file references more > expensive for other syscalls, since you now have a shared file table. > But probably not something to worry about here? Would the vhost user worker user processes ever be otherwise single-threade= d? I'd *assume* that a vhost user is already doing its own threads. But maybe that's a completely bogus assumption. I don't actually use any of this, so... Because you are obviously 100% right that if you're otherwise single-threaded, then a CLONE_FILES kernel helper thread will cause the extra cost for file descriptor lookup/free due to all the race prevention. Linus