mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Radu Rendec <rrendec@redhat.com>
To: Jon Hunter <jonathanh@nvidia.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Manivannan Sadhasivam	 <mani@kernel.org>
Cc: "Daniel Tsai" <danielsftsai@google.com>,
	"Marek Behún" <kabel@kernel.org>,
	"Krishna Chaitanya Chundru" <quic_krichai@quicinc.com>,
	"Bjorn Helgaas" <bhelgaas@google.com>,
	"Rob Herring" <robh@kernel.org>,
	"Krzysztof Wilczyński" <kwilczynski@kernel.org>,
	"Lorenzo Pieralisi" <lpieralisi@kernel.org>,
	"Jingoo Han" <jingoohan1@gmail.com>,
	"Brian Masney" <bmasney@redhat.com>,
	"Eric Chanudet" <echanude@redhat.com>,
	"Alessandro Carminati" <acarmina@redhat.com>,
	"Jared Kangas" <jkangas@redhat.com>,
	linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org,
	"linux-tegra@vger.kernel.org" <linux-tegra@vger.kernel.org>
Subject: Re: [PATCH v3 3/3] PCI: dwc: Enable MSI affinity support
Date: Thu, 22 Jan 2026 18:31:01 -0500	[thread overview]
Message-ID: <96c9d483f67be02fa1dba736fea465216d0c3269.camel@redhat.com> (raw)
In-Reply-To: <cfe44924-3419-4f31-8ab3-87b769d21a5b@nvidia.com>

Hi Jon,

On Wed, 2026-01-21 at 14:00 +0000, Jon Hunter wrote:
> 
> On 20/01/2026 22:30, Radu Rendec wrote:
> 
> ...
> 
> > > So it looks like it is hanging when disabling the non-boot CPUs. So far
> > > it only appears to happen on Tegra194.
> > > 
> > > Let me know if you have any suggestions.
> > 
> > Ouch. I'm afraid this is going to be much harder to figure out than the
> > previous one, especially since I can't get access easily to a board to
> > test on. I will try to reserve a board and reproduce the bug.
> > 
> > Meanwhile, if you (or someone else in your team) can spare a few cycles,
> > could you please try to reproduce the bug again with the debug patch
> > below applied, and a few other changes:
> >   * enable debug messages in kernel/irq/cpuhotplug.c;
> >   * save the contents of /proc/interrupts to a file before suspending;
> >   * add "no_console_suspend" to the kernel command line (although it
> >     looks like you already have it).
> > 
> > It will be much more verbose during suspend but hopefully we can at
> > least figure out how far along it goes and how it's related to the MSI
> > affinity configuration.
> 
> 
> Thanks. I have dumped the boot log with the prints here:
> 
> https://pastebin.com/G8c2ssdt
> 
> And the dump of /proc/interrupts here:
> 
> https://pastebin.com/Wqzxw3r6
> 
> Looks like the last thing I see entering suspend is ...
> 
>   irq_chip_redirect_set_affinity: irq 162 mask 0x7f
> 
> That appears to be a PCIe interrupt. Let me know if there are more tests 
> I can run.

Thanks very much for running the test and for the logs. The good news
is good ol' printk debugging seems to be working, and the last message
in the log is indeed related to dw-pci irq affinity control, which is
what the patch touches. So we're on to something. The bad news is I
can't yet figure out what's wrong.

The CPUs are taken offline one by one, starting with CPU 7. The code in
question runs on the dying CPU, and with hardware interrupts disabled
on all CPUs. The (simplified) call stack looks like this:

irq_migrate_all_off_this_cpu
  for_each_active_irq
    migrate_one_irq
      irq_do_set_affinity
        irq_chip_redirect_set_affinity (via chip->irq_set_affinity)

The debug patch I gave you adds:
 * a printk to irq_chip_redirect_set_affinity (which is very small)
 * a printk at the beginning of migrate_one_irq

Also, the call to irq_do_set_affinity is almost the last thing that
happens in migrate_one_irq, and that for_each_active_irq loop is quite
small too. So, there isn't much happening between the printk in
irq_chip_redirect_set_affinity for the msi irq (which we do see in the
log) and the printk in migrate_one_irq for the next irq (which we don't
see).

My first thought is to add more printk's between those two and narrow
down the spot where it gets stuck.

I think the fastest way to debug it is if I can test myself. I tried to
reproduce the issue on a Jetson AGX Orin, and I couldn't. By the way,
how often does it hang? e.g., out of say 10 suspend attempts, how many
fail?

I do have access to a Jetson Xavier NX (in theory) but it looks like
there's a lab issue with that board, which hopefully gets sorted out
tomorrow. If I can't get a hold of that board (or can't reproduce the
problem on it), I may ask you to try a few other things. In any case,
I'll update this thread again either tomorrow or (more likely) early
next week.

-- 
Thanks,
Radu


  reply	other threads:[~2026-01-22 23:31 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-28 21:20 [PATCH v3 0/3] Enable MSI affinity support for dwc PCI Radu Rendec
2025-11-28 21:20 ` [PATCH v3 1/3] genirq: Add interrupt redirection infrastructure Radu Rendec
2025-12-15 21:34   ` [tip: irq/msi] " tip-bot2 for Radu Rendec
2025-11-28 21:20 ` [PATCH v3 2/3] PCI: dwc: Code cleanup Radu Rendec
2025-12-15 21:34   ` [tip: irq/msi] " tip-bot2 for Radu Rendec
2025-11-28 21:20 ` [PATCH v3 3/3] PCI: dwc: Enable MSI affinity support Radu Rendec
2025-12-15 21:34   ` [tip: irq/msi] " tip-bot2 for Radu Rendec
2026-01-06  9:53     ` Jon Hunter
2026-01-06 15:07       ` Radu Rendec
2026-01-07  1:13         ` Radu Rendec
2026-01-20 18:01   ` [PATCH v3 3/3] " Jon Hunter
2026-01-20 22:30     ` Radu Rendec
2026-01-21 14:00       ` Jon Hunter
2026-01-22 23:31         ` Radu Rendec [this message]
2026-01-23 13:25           ` Jon Hunter
2026-01-26  7:59           ` Thomas Gleixner
2026-01-26 22:07             ` Jon Hunter
2026-01-26 22:26               ` Radu Rendec
2026-01-27 10:30                 ` Thomas Gleixner
2026-01-27 13:34                   ` Thomas Gleixner
2026-01-27 17:09                     ` Jon Hunter
2026-01-27 21:30                       ` [PATCH] genirq/redirect: Prevent writing MSI message on affinity change Thomas Gleixner
2026-01-29 22:51                         ` [tip: irq/msi] " tip-bot2 for Thomas Gleixner
2026-03-26  3:48                       ` [PATCH v3 3/3] PCI: dwc: Enable MSI affinity support Tsai Sung-Fu
2026-03-26 12:52                         ` Thomas Gleixner
2026-05-22 20:27   ` Brian Norris
2026-05-23  0:07     ` Brian Norris
2026-05-25 16:48       ` Radu Rendec
2026-05-30  0:35         ` Brian Norris
2026-06-01  8:20           ` Niklas Cassel
2026-06-01 19:02             ` Brian Norris
2026-06-01 19:09               ` Brian Norris

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=96c9d483f67be02fa1dba736fea465216d0c3269.camel@redhat.com \
    --to=rrendec@redhat.com \
    --cc=acarmina@redhat.com \
    --cc=bhelgaas@google.com \
    --cc=bmasney@redhat.com \
    --cc=danielsftsai@google.com \
    --cc=echanude@redhat.com \
    --cc=jingoohan1@gmail.com \
    --cc=jkangas@redhat.com \
    --cc=jonathanh@nvidia.com \
    --cc=kabel@kernel.org \
    --cc=kwilczynski@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=lpieralisi@kernel.org \
    --cc=mani@kernel.org \
    --cc=quic_krichai@quicinc.com \
    --cc=robh@kernel.org \
    --cc=tglx@linutronix.de \
    /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

all inboxes | Powered by JetHome®