Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp7615248rwb; Tue, 15 Nov 2022 15:15:05 -0800 (PST) X-Google-Smtp-Source: AA0mqf6ddn6sB/Z+XPRySItBY/Oz/LiyvXTpNKUoM210LbtTgO4ogpxgEtQZHlF1sGYPptzpoYbL X-Received: by 2002:a17:90b:2354:b0:210:f1f7:575e with SMTP id ms20-20020a17090b235400b00210f1f7575emr731738pjb.47.1668554105220; Tue, 15 Nov 2022 15:15:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668554105; cv=none; d=google.com; s=arc-20160816; b=VJhMlcixP6YnbELJPF4sdtud7k9ODDsmvoNRKvtTezRU1237Eu25t2YW7Bj+mNpQTx aMTXtSx1ZrgkVCXUhXX8W8w/k5VlC3y8Jxneg8h5YR9RtG2ESKuIdGmj30d4rGM9Rl0F HyRnO6GqRBHgVY7eoLEk3b0kNK0hqaWqcg4pxQ6cmTLG8BFwMrlXbj3aVuWdMhnRIaI8 CU2PtgxkIRXvhbsHaFnaFWKpBAyfvVFAgKYeRdiabah/8Li8o26p4+GuihfjD6kEhClP rDH72MrLu0W0Uzl+yd78/zgbnJpuBvaQ12B7SeNbaI4v+79kQxPcmLIDM22LntAFi3ok XoJw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :in-reply-to:subject:cc:to:dkim-signature:dkim-signature:from; bh=WyLOjll9PSFTh2089EjVD8JZTparrCm5C62nsd9MCGA=; b=xpy3clc/b6AK2ShrHga1Lw3kuwwamsqNhwKfAW6yZkAsDxTGcu8rx0XHSA8jOyWg1s IzyiCIsT+9EmxfcNlI3Rqw7wf5wx//J6lnoOrOOaD0wHtjvBFhypUxVvpJwkxRseE30c KOOCbzW3xTMMh8I53zAdrbVSDhHc8oJQKKeaWEZvaTjBV6yR8t2Ukeu5qwak1Or+pOA+ wwZhNj4LTo4PwUOSCMh7ygseGJ5xJu8UL5inRaNwku2Tn5MPPtR0WjaCiFkdr6FeLKPL yvxqoc8ZwheUzUrR74+xBLREceGXfb8g7aZu2mL46dckXHYG0orvAAdp4JQIY+udBDB7 ZUsg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=ihqlrFO1; dkim=neutral (no key) header.i=@linutronix.de; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n27-20020aa7985b000000b0056353f0bd40si12571431pfq.29.2022.11.15.15.14.52; Tue, 15 Nov 2022 15:15:05 -0800 (PST) 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=@linutronix.de header.s=2020 header.b=ihqlrFO1; dkim=neutral (no key) header.i=@linutronix.de; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231829AbiKOXEZ (ORCPT + 90 others); Tue, 15 Nov 2022 18:04:25 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54036 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231862AbiKOXEX (ORCPT ); Tue, 15 Nov 2022 18:04:23 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A3F9E1BEAE for ; Tue, 15 Nov 2022 15:04:21 -0800 (PST) From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1668553459; 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=WyLOjll9PSFTh2089EjVD8JZTparrCm5C62nsd9MCGA=; b=ihqlrFO1XG48hTyhT9ZexveVtp4JZkVopSVAlGE0hG326C0xwaNRTbwBp6VQIegjBlrh2g 2/vu/arckFlJB9HpLXUUFR07+57XPUzrBKThd60G1mJzTpytqTDFcNxYIZuVYJmHXxpFne xEMx0eVTxD4K2CSokmkx4SZyYEvr43eyrgyms1UWNvrCqkeCFbzqZeYP74c3VvvsQE5Xwa kVvKOnPJiZl6vKveozNELzVJOy1OC8SMejc4yvJihF4/vGxQkfiMmqHOjGkolgjPmFJPop 0SZIMiS2o5gOthwiyqIsyrMcjDa1jIG3Yk6wh1idbd7423RcYxalM/sMipGqkg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1668553459; 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=WyLOjll9PSFTh2089EjVD8JZTparrCm5C62nsd9MCGA=; b=LXdvJKrEt1FmFfN8uhiLD/25lOHUbuAP0Ldb0LW0lJ6a6Iz2gIGgMt3M7ikGkvonPatz7S pQRbe9SHwo8cfnCQ== To: "Michael S. Tsirkin" Cc: Angus Chen , "linux-kernel@vger.kernel.org" , Ming Lei , Jason Wang Subject: Re: IRQ affinity problem from virtio_blk In-Reply-To: <20221115174152-mutt-send-email-mst@kernel.org> References: <87v8nfrhbw.ffs@tglx> <20221115174152-mutt-send-email-mst@kernel.org> Date: Wed, 16 Nov 2022 00:04:19 +0100 Message-ID: <87sfijrf9o.ffs@tglx> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS autolearn=ham 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 Tue, Nov 15 2022 at 17:44, Michael S. Tsirkin wrote: > On Tue, Nov 15, 2022 at 11:19:47PM +0100, Thomas Gleixner wrote: >> > We can see global_available drop from 15354 to 15273, is 81. >> > And the total_allocated increase from 411 to 413. One config irq,and >> > one vq irq. >> >> Right. That's perfectly fine. At the point where you looking at it, the >> matrix allocator has given out 2 vectors as can be seen via >> total_allocated. >> >> But then it also has another 79 vectors put aside for the other queues, > > What makes it put these vectors aside? pci_alloc_irq_vectors_affinity ? init_vq() -> virtio_find_vqs() -> vp_find_vqs() -> vp_request_msix_vectors() -> pci_alloc_irq_vectors_affinity() init_vq() hands in a struct irq_affinity which means that pci_alloc_irq_vectors_affinity() will spread out interrupts and have one for config and one per queue if vp_request_msix_vectors() is invoked with per_vq_vectors == true, which is what the first invocation in vp_find_vqs() does. Thanks, tglx