virtualization.lists.linux-foundation.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: axboe@kernel.dk, linux-kernel@vger.kernel.org,
	Liming Wu <liming.wu@jaguarmicro.com>,
	virtualization@lists.linux-foundation.org,
	linux-block@vger.kernel.org, stefanha@redhat.com,
	Angus Chen <angus.chen@jaguarmicro.com>,
	pbonzini@redhat.com, tglx@linutronix.de
Subject: Re: [PATCH v1] virtio_blk: should not use IRQD_AFFINITY_MANAGED in init_rq
Date: Wed, 28 Sep 2022 11:45:45 +0200	[thread overview]
Message-ID: <20220928094545.GA19646@lst.de> (raw)
In-Reply-To: <20220927163723-mutt-send-email-mst@kernel.org>

On Tue, Sep 27, 2022 at 04:47:20PM -0400, Michael S. Tsirkin wrote:
> > The log :
> > "genirq: Flags mismatch irq 0. 00000080 (virtio418) vs. 00015a00 (timer)"
> > was print because of the irq 0 is used by timer exclusive,and when
> > vp_find_vqs called vp_find_vqs_msix and return false twice,then it will
> > call vp_find_vqs_intx for the last try.
> > Because vp_dev->pci_dev->irq is zero,so it will be request irq 0 with
> > flag IRQF_SHARED.
> 
> First this is a bug. We can fix that so it will fail more cleanly.
> 
> We should check pci_dev->pin and if 0 do not try to use INT#x
> at all.
> It will still fail, just with a nicer backtrace.

How do we end up with a pci_dev without a valid PIN?  Btw, that whole
vp_find_* code looks extremely fucked up to me.  The whole point of
pci_alloc_irq_vectors* API is that it keeps drivers from poling into
details of MSI-X v MSI vs INTX.

> - because of auto affinity, we try to reserve an interrupt on all CPUs
> - as there are 512 devices with a single vector per VQ we would
>   have no issue as they would be spread between CPUs,
>   but allocating on all CPUs fails.
> 
> 
> I don't think the issue should be fixed at blk level - it is not
> blk specifix - but yes this looks like a problem.
> Christoph, any idea?

I think this goes into the low-level interrupt vector allocator.  I think
Thomas is still the expert on it.
_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

  reply	other threads:[~2022-09-28  9:55 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20220924034854.323-1-angus.chen@jaguarmicro.com>
2022-09-26  8:20 ` [PATCH v1] virtio_blk: should not use IRQD_AFFINITY_MANAGED in init_rq Christoph Hellwig
2022-09-27 20:47 ` Michael S. Tsirkin
2022-09-28  9:45   ` Christoph Hellwig [this message]
2022-09-28 10:03     ` Michael S. Tsirkin
     [not found]   ` <TY2PR06MB3424C2AD8F7AC77DA83FB4C685549@TY2PR06MB3424.apcprd06.prod.outlook.com>
     [not found]     ` <TY2PR06MB34249F3D2DE2C30BB324E5A385039@TY2PR06MB3424.apcprd06.prod.outlook.com>
2022-11-13 12:59       ` Michael S. Tsirkin
2022-09-28  6:17 ` Ming Lei

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220928094545.GA19646@lst.de \
    --to=hch@lst.de \
    --cc=angus.chen@jaguarmicro.com \
    --cc=axboe@kernel.dk \
    --cc=liming.wu@jaguarmicro.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=stefanha@redhat.com \
    --cc=tglx@linutronix.de \
    --cc=virtualization@lists.linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).