From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9AB4CC6369E for ; Thu, 19 Nov 2020 14:47:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 45A4722261 for ; Thu, 19 Nov 2020 14:47:01 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="HHuiH1Sc" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728354AbgKSOql (ORCPT ); Thu, 19 Nov 2020 09:46:41 -0500 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:51955 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728036AbgKSOqj (ORCPT ); Thu, 19 Nov 2020 09:46:39 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1605797196; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=nBU9vCty/xUTtvWiRTKM3SNaAnXZsWQI+V6F25yzTt8=; b=HHuiH1Scv3UBL9+E32Ir9/c4HGjesuLFONctPpegf5X6X+V15E4WtC5YWn8Wz7MxABCy9+ tVGwfQtY7yTqqzcT6nfoL6Gz5I6ok4NVUdtckTOSECyJs2hWh7SlUW5z+3/MaRhmgTAVOg IpsATjdLtfW7dqh6/CFESUPQLhRv0rw= Received: from mail-wr1-f70.google.com (mail-wr1-f70.google.com [209.85.221.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-189--k-fgY6XM5G2xh66h4pWVg-1; Thu, 19 Nov 2020 09:46:34 -0500 X-MC-Unique: -k-fgY6XM5G2xh66h4pWVg-1 Received: by mail-wr1-f70.google.com with SMTP id x16so2113804wrn.9 for ; Thu, 19 Nov 2020 06:46:34 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=nBU9vCty/xUTtvWiRTKM3SNaAnXZsWQI+V6F25yzTt8=; b=jNRvW3jfEU8OnJ8Ge7IF1S4GsA4Kllib5124u/PVZuA745cmzyrm1oJ32dhDH1dBDE dAb8DSD1vuwn+X7/2SQMx7h2El+iLzAHrKIwvLnIdzsPuNX/6tH1SJ6pwE4xx9L72+uU WpzCMuiDyPdi6TedmvvAkGGIMSfaYyhN0sD8VDUtR87Pw9hA2hwC0GFaNeg+cb0zlFJH W6Ew/loi9B6sO42hyrobwrhIOpuetg612OpJ2/V9rI1KrqHtGwoIRns+tDK43nkCp8O2 PV4SoqI5KBuQ3z7fXel6p0h8YCiLGi6KD6FI8Ki8v022A/B7WTJsnx80Cq/PCB6VsnXZ Ql7g== X-Gm-Message-State: AOAM530UtnCj6ioJ4LnK4Xt76S5beKS4yCqOkKdFpKal4jxOee2jRFg7 Q1H84A+GMAht3KypeI5ynb7PdaYwGyUWglqwKEPJKHEgwn0/vBO0+HnN/3r05LWajEcJSz3VtDl mfRnCNfu6wBD9maWEY5PCeg== X-Received: by 2002:a1c:e0c3:: with SMTP id x186mr4948931wmg.21.1605797193263; Thu, 19 Nov 2020 06:46:33 -0800 (PST) X-Google-Smtp-Source: ABdhPJwvmGgl1ENR3sYN4BkxpKKT1u0hPsLZxxmf1t2xm1+WIEcjQ7FNbjFySAZs3x19GfjQiwVI5Q== X-Received: by 2002:a1c:e0c3:: with SMTP id x186mr4948910wmg.21.1605797193047; Thu, 19 Nov 2020 06:46:33 -0800 (PST) Received: from redhat.com (bzq-109-64-91-49.red.bezeqint.net. [109.64.91.49]) by smtp.gmail.com with ESMTPSA id l13sm41378138wrm.24.2020.11.19.06.46.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Nov 2020 06:46:31 -0800 (PST) Date: Thu, 19 Nov 2020 09:46:26 -0500 From: "Michael S. Tsirkin" To: Stefan Hajnoczi Cc: Mike Christie , qemu-devel@nongnu.org, fam@euphon.net, linux-scsi@vger.kernel.org, target-devel@vger.kernel.org, jasowang@redhat.com, pbonzini@redhat.com, virtualization@lists.linux-foundation.org Subject: Re: [PATCH 00/10] vhost/qemu: thread per IO SCSI vq Message-ID: <20201119094315-mutt-send-email-mst@kernel.org> References: <1605223150-10888-1-git-send-email-michael.christie@oracle.com> <20201117164043.GS131917@stefanha-x1.localdomain> <20201118113117.GF182763@stefanha-x1.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201118113117.GF182763@stefanha-x1.localdomain> Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org On Wed, Nov 18, 2020 at 11:31:17AM +0000, Stefan Hajnoczi wrote: > > My preference has been: > > > > 1. If we were to ditch cgroups, then add a new interface that would allow > > us to bind threads to a specific CPU, so that it lines up with the guest's > > mq to CPU mapping. > > A 1:1 vCPU/vq->CPU mapping isn't desirable in all cases. > > The CPU affinity is a userspace policy decision. The host kernel should > provide a mechanism but not the policy. That way userspace can decide > which workers are shared by multiple vqs and on which physical CPUs they > should run. So if we let userspace dictate the threading policy then I think binding vqs to userspace threads and running there makes the most sense, no need to create the threads. -- MST From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 08A08C63697 for ; Thu, 19 Nov 2020 14:46:45 +0000 (UTC) Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 4713B22253 for ; Thu, 19 Nov 2020 14:46:44 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="HHuiH1Sc" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4713B22253 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=virtualization-bounces@lists.linux-foundation.org Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id C028E273B5; Thu, 19 Nov 2020 14:46:43 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 7eBhPLLwWlNN; Thu, 19 Nov 2020 14:46:41 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by silver.osuosl.org (Postfix) with ESMTP id 9D8E22043B; Thu, 19 Nov 2020 14:46:41 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 8FBFDC1825; Thu, 19 Nov 2020 14:46:41 +0000 (UTC) Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by lists.linuxfoundation.org (Postfix) with ESMTP id E390DC0891 for ; Thu, 19 Nov 2020 14:46:39 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id CF1E186727 for ; Thu, 19 Nov 2020 14:46:39 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id GSlNdsT-ALOn for ; Thu, 19 Nov 2020 14:46:37 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by hemlock.osuosl.org (Postfix) with ESMTPS id 978FE865CD for ; Thu, 19 Nov 2020 14:46:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1605797196; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=nBU9vCty/xUTtvWiRTKM3SNaAnXZsWQI+V6F25yzTt8=; b=HHuiH1Scv3UBL9+E32Ir9/c4HGjesuLFONctPpegf5X6X+V15E4WtC5YWn8Wz7MxABCy9+ tVGwfQtY7yTqqzcT6nfoL6Gz5I6ok4NVUdtckTOSECyJs2hWh7SlUW5z+3/MaRhmgTAVOg IpsATjdLtfW7dqh6/CFESUPQLhRv0rw= Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-62-256PEQHZMOGUB5H0BHWZjA-1; Thu, 19 Nov 2020 09:46:34 -0500 X-MC-Unique: 256PEQHZMOGUB5H0BHWZjA-1 Received: by mail-wm1-f70.google.com with SMTP id a134so2422205wmd.8 for ; Thu, 19 Nov 2020 06:46:34 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=nBU9vCty/xUTtvWiRTKM3SNaAnXZsWQI+V6F25yzTt8=; b=mNViopRQU2zzioQ4phmMqLDtdy0IWB9zqW1Bo6PHwSvWdRikCP6qy1hIzGgdzQdYby U5EogaxNChpOs/TlRNB8btBQmMyWdIPvJBr+7Itqft5oU3h9N+qVdgHTW7GWMwuoj3aK X1inWc7H1SsAdqQaLNhwPnVKqKNJfWgJEgc0H7cpdkX5TD+goF6ZT037JA3fJDaivFml RcIEKA7yDb/sa6T7uRGIHUxjy1+RjnZkJUOSZSX3KkkXFF+a3kGWTngA520aoSkAyKag OH/VhEp42iCA1Fs0yiZiLritr1d6vesV93CLvrZNwc3kbbX6KtLnklSaBfnF8eOv9h1x Fq+Q== X-Gm-Message-State: AOAM532Q0wbu3qn/0Ekw0fj3PRljBXCzAM/91ELObkUc49ESbFqk5XDE fUsdgH1XkHfyrn+gwzSb+/sNrLX3i45mxHmaAf/RqUHkfBUo2AsmjhlfbcQNVLbR0jWOeYugXPj H5rMrp7Sq/4OBXiic3JRCUFnIBzlxjCFeB7QePPT27Q== X-Received: by 2002:a1c:e0c3:: with SMTP id x186mr4948926wmg.21.1605797193263; Thu, 19 Nov 2020 06:46:33 -0800 (PST) X-Google-Smtp-Source: ABdhPJwvmGgl1ENR3sYN4BkxpKKT1u0hPsLZxxmf1t2xm1+WIEcjQ7FNbjFySAZs3x19GfjQiwVI5Q== X-Received: by 2002:a1c:e0c3:: with SMTP id x186mr4948910wmg.21.1605797193047; Thu, 19 Nov 2020 06:46:33 -0800 (PST) Received: from redhat.com (bzq-109-64-91-49.red.bezeqint.net. [109.64.91.49]) by smtp.gmail.com with ESMTPSA id l13sm41378138wrm.24.2020.11.19.06.46.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Nov 2020 06:46:31 -0800 (PST) Date: Thu, 19 Nov 2020 09:46:26 -0500 From: "Michael S. Tsirkin" To: Stefan Hajnoczi Subject: Re: [PATCH 00/10] vhost/qemu: thread per IO SCSI vq Message-ID: <20201119094315-mutt-send-email-mst@kernel.org> References: <1605223150-10888-1-git-send-email-michael.christie@oracle.com> <20201117164043.GS131917@stefanha-x1.localdomain> <20201118113117.GF182763@stefanha-x1.localdomain> MIME-Version: 1.0 In-Reply-To: <20201118113117.GF182763@stefanha-x1.localdomain> Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=mst@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline Cc: fam@euphon.net, linux-scsi@vger.kernel.org, qemu-devel@nongnu.org, virtualization@lists.linux-foundation.org, target-devel@vger.kernel.org, pbonzini@redhat.com, Mike Christie X-BeenThere: virtualization@lists.linux-foundation.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Linux virtualization List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: virtualization-bounces@lists.linux-foundation.org Sender: "Virtualization" On Wed, Nov 18, 2020 at 11:31:17AM +0000, Stefan Hajnoczi wrote: > > My preference has been: > > > > 1. If we were to ditch cgroups, then add a new interface that would allow > > us to bind threads to a specific CPU, so that it lines up with the guest's > > mq to CPU mapping. > > A 1:1 vCPU/vq->CPU mapping isn't desirable in all cases. > > The CPU affinity is a userspace policy decision. The host kernel should > provide a mechanism but not the policy. That way userspace can decide > which workers are shared by multiple vqs and on which physical CPUs they > should run. So if we let userspace dictate the threading policy then I think binding vqs to userspace threads and running there makes the most sense, no need to create the threads. -- MST _______________________________________________ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/virtualization From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C5572C63697 for ; Thu, 19 Nov 2020 14:52:26 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D59D022253 for ; Thu, 19 Nov 2020 14:52:25 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="iJuu0Gy8" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D59D022253 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:47152 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kflIO-0005L7-CA for qemu-devel@archiver.kernel.org; Thu, 19 Nov 2020 09:52:24 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:52428) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kflCs-0007lg-IR for qemu-devel@nongnu.org; Thu, 19 Nov 2020 09:46:43 -0500 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:44726) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kflCq-0005Wf-Lh for qemu-devel@nongnu.org; Thu, 19 Nov 2020 09:46:41 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1605797198; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=nBU9vCty/xUTtvWiRTKM3SNaAnXZsWQI+V6F25yzTt8=; b=iJuu0Gy8dmv3n58FCRdKZUa3alplE+joOIjsBy1ehpNcMnP/EL+/+3XZF1S4hEcvBBx0Yx 6ai2rDZl3Z/o47IHgw6/KgsbLSk36SOSz5/5ZKgStlA9xVwts8uVNJeIcIjnEC7nwd3wAv BXiqsKJ41SwORbrTXI+BKEcYJTn4188= Received: from mail-wr1-f70.google.com (mail-wr1-f70.google.com [209.85.221.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-507-U3sUP7BWNmujxRBD9M-Cfw-1; Thu, 19 Nov 2020 09:46:34 -0500 X-MC-Unique: U3sUP7BWNmujxRBD9M-Cfw-1 Received: by mail-wr1-f70.google.com with SMTP id z13so2105601wrm.19 for ; Thu, 19 Nov 2020 06:46:34 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=nBU9vCty/xUTtvWiRTKM3SNaAnXZsWQI+V6F25yzTt8=; b=nGosDEJVjyTL4/4HB9wUxe+R2dK0YI/xWTK4EpZ2dwYXpPzKmHSIzBeSwf7QdSLP4n XaN43B4eRKGyPBtFXolVC/auwl7daVO3b0rFvDdYypjxjbj4YZWQbgH64Aqp9y38R2/e gYBM7Imn9ejV4eQRXIMVuJ8Jz+3G69tDoEpXiZQNgN2iRzcQBiOkGqN5mH3Jg/WSdn2x Ewa2reeofNfGx66GAdPGwDxtcVMnY2C5FdMCRDeelQwY6Gc2BdeTQRaLpBhDGbcmD0Pd ykdmRFjmbMohTnBdGIgzzvtb7Vn8qEHOuHlj3dGi9YvIlmYXGgWJ/RBJe33oTyrdvJ1h AYdQ== X-Gm-Message-State: AOAM5332ZTI8CwdExAfnw3Jv9NaHeoofltdzlECx//hiXpbFI5TbREt8 f1eV5h/ctveU3w3rcPfKLs/A4Cr0VIOlPaUGR8dERe18TjnkIWyVFMlHZ3mOgzcVQJBaIKgIGkb CpRrXcGsBB/scero= X-Received: by 2002:a1c:e0c3:: with SMTP id x186mr4948928wmg.21.1605797193263; Thu, 19 Nov 2020 06:46:33 -0800 (PST) X-Google-Smtp-Source: ABdhPJwvmGgl1ENR3sYN4BkxpKKT1u0hPsLZxxmf1t2xm1+WIEcjQ7FNbjFySAZs3x19GfjQiwVI5Q== X-Received: by 2002:a1c:e0c3:: with SMTP id x186mr4948910wmg.21.1605797193047; Thu, 19 Nov 2020 06:46:33 -0800 (PST) Received: from redhat.com (bzq-109-64-91-49.red.bezeqint.net. [109.64.91.49]) by smtp.gmail.com with ESMTPSA id l13sm41378138wrm.24.2020.11.19.06.46.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Nov 2020 06:46:31 -0800 (PST) Date: Thu, 19 Nov 2020 09:46:26 -0500 From: "Michael S. Tsirkin" To: Stefan Hajnoczi Subject: Re: [PATCH 00/10] vhost/qemu: thread per IO SCSI vq Message-ID: <20201119094315-mutt-send-email-mst@kernel.org> References: <1605223150-10888-1-git-send-email-michael.christie@oracle.com> <20201117164043.GS131917@stefanha-x1.localdomain> <20201118113117.GF182763@stefanha-x1.localdomain> MIME-Version: 1.0 In-Reply-To: <20201118113117.GF182763@stefanha-x1.localdomain> Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=mst@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Received-SPF: pass client-ip=216.205.24.124; envelope-from=mst@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/11/19 03:44:58 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: 12 X-Spam_score: 1.2 X-Spam_bar: + X-Spam_report: (1.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_SBL_CSS=3.335, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: fam@euphon.net, linux-scsi@vger.kernel.org, jasowang@redhat.com, qemu-devel@nongnu.org, virtualization@lists.linux-foundation.org, target-devel@vger.kernel.org, pbonzini@redhat.com, Mike Christie Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" On Wed, Nov 18, 2020 at 11:31:17AM +0000, Stefan Hajnoczi wrote: > > My preference has been: > > > > 1. If we were to ditch cgroups, then add a new interface that would allow > > us to bind threads to a specific CPU, so that it lines up with the guest's > > mq to CPU mapping. > > A 1:1 vCPU/vq->CPU mapping isn't desirable in all cases. > > The CPU affinity is a userspace policy decision. The host kernel should > provide a mechanism but not the policy. That way userspace can decide > which workers are shared by multiple vqs and on which physical CPUs they > should run. So if we let userspace dictate the threading policy then I think binding vqs to userspace threads and running there makes the most sense, no need to create the threads. -- MST