From: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
To: Maciej Grochowski <Maciej.Grochowski@sony.com>
Cc: "Nikolas Joshua Britton" <nbritton@exabit.io>,
"Geramy Loveless" <gloveless@jqluv.com>,
"Eric Auger" <eauger@redhat.com>,
"Alexey Fomenko" <alexey.fomenko@intel.com>,
"Bjorn Helgaas" <bhelgaas@google.com>,
linux-pci@vger.kernel.org,
"Lorenzo Pieralisi" <lorenzo.pieralisi@arm.com>,
"Rob Herring" <robh@kernel.org>,
"Krzysztof Wilczyński" <kw@linux.com>,
"Mesih Kilinc" <Mesih.Kilinc@sony.com>
Subject: Re: [PATCH v4 0/7] PCI: Resource placement algorithm fixe
Date: Mon, 26 Oct 2026 12:19:58 +0200 (EET) [thread overview]
Message-ID: <b20cffba-3515-b8a8-1b6f-6483facac5af@linux.intel.com> (raw)
In-Reply-To: <20261023224518.80653-1-Maciej.Grochowski@sony.com>
On Fri, 23 Oct 2026, Maciej Grochowski wrote:
> Hi Ilpo,
>
> Thank you for the v4 patches, and sorry for the delayed feedback on v2.
> Mesih (CC'd) tested your full v2 seven-patch series on our
> Switchtec-based platform, with positive results.
>
> The test used a backport to our Linux 6.18.20 platform tree, with
> additional allocator prerequisites included and our local
> max() -> ALIGN() workaround reverted. This is therefore feedback
> on the backported series rather than a test on its upstream base.
Hi,
Okay, thanks for the test.
> The kernel boots successfully, all eight endpoints have
> BAR0, BAR2 and BAR4 assigned, and switchtec detects all nine
> switches. No BAR assignment failures were observed in the boot log.
>
> One difference from my original report is that BAR4 is enabled in
> this test; the earlier report described a configuration with BAR4
> suppressed. The total BAR allocation across the eight endpoints
> is now 288 MiB.
>
> We also compared /proc/iomem against the earlier kernel carrying
> our ALIGN() workaround. The enclosing prefetchable bridge window
> is 387 MiB with the backported v2 series, versus 384 MiB with the
> workaround, while the total endpoint BAR allocation is unchanged.
> So this test shows successful assignment, but no address-space
> reduction for this configuration. I do not yet have the detailed
> placement traces needed to explain the 3 MiB difference.
You want to look at the place where the window is sized and work
backwards why pbus_size_mem() calculated that size. In the printouts
(for non-assigned bridge window), the start address is the alignment
and size is end-start+1. If the window has an optional part, the add_size
printout is there but otherwise the prints are a bit scarse.
When trying to debug pci resource issues, dyndbg might be helpful here and
there so I always add this to kernel's cmdline myself:
dyndbg="file drivers/pci/*.c +p"
It will give a bit more information about resource decisions in dmesg and
their basis (things could be better in many areas still but most of the
missing details are inferrable, e.g., what resources are considered
optional, etc.).
> We will now also test v4 and report back. Could the changes since v2
> affect this window-size result, or is this amount of padding expected
> for this topology? Please let us know which logs or allocator traces
> would be most useful to collect with the v4 test.
I suggest you wait until I send the next version which addresses the
problems sashiko located in v4. I've basically tested the update locally
and should get to sending it today or tomorrow.
I normally use iomem, dmesg with pci dyndbg on, and lspci.
Generally, I normally look /proc/iomem for quick overview of the layout.
If you have something to compare with, it's even easier to see what
changed and focus on those. E.g. you know commit x broke something so a
kernel before that commit or the problematic commit reverted vs the broken
one. The less there are other changes in between, the less noisy the
diff is.
lspci is mainly needed to map resources to BAR/ROM/VF BAR as the iomem
format conceal what the resource is. Again, diffing pre (when available)
vs post saves lots of time in focusing on the relevant bits.
For diffing dmesgs, I've this tool:
$ cat dmesg-diff
#!/bin/bash
diff -u <(cut -d ']' -f 2- "$1" | cut -b 2-) <(cut -d ']' -f 2- "$2" | cut -b 2-)
--
i.
next prev parent reply other threads:[~2026-10-26 10:20 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-21 12:49 [PATCH v4 0/7] PCI: Resource placement algorithm fixe Ilpo Järvinen
2026-10-21 12:49 ` [PATCH v4 1/7] resource: Mark free space assigned Ilpo Järvinen
2026-10-21 12:56 ` sashiko-bot
2026-10-21 12:49 ` [PATCH v4 2/7] PCI/parisc: Clean up resource debug print & use dynamic debug Ilpo Järvinen
2026-10-21 12:56 ` sashiko-bot
2026-10-23 11:46 ` Helge Deller
2026-10-21 12:49 ` [PATCH v4 3/7] PCI: Honor alignment overrides Ilpo Järvinen
2026-10-21 13:22 ` sashiko-bot
2026-10-21 12:49 ` [PATCH v4 4/7] PCI: Fix nesting windows with remainder at the left edge Ilpo Järvinen
2026-10-21 13:32 ` sashiko-bot
2026-10-21 12:49 ` [PATCH v4 5/7] linux/log2.h: Add 64-bit roundup/down_pow_of_two64() variants Ilpo Järvinen
2026-10-21 12:57 ` sashiko-bot
2026-10-21 12:49 ` [PATCH v4 6/7] PCI: Place resources to either edge of the window Ilpo Järvinen
2026-10-21 13:30 ` sashiko-bot
2026-10-21 12:49 ` [PATCH v4 7/7] PCI: Fix composite resource sizing Ilpo Järvinen
2026-10-21 13:25 ` sashiko-bot
2026-10-23 22:45 ` [PATCH v4 0/7] PCI: Resource placement algorithm fixe Maciej Grochowski
2026-10-26 10:19 ` Ilpo Järvinen [this message]
2026-10-27 13:31 ` Ilpo Järvinen
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=b20cffba-3515-b8a8-1b6f-6483facac5af@linux.intel.com \
--to=ilpo.jarvinen@linux.intel.com \
--cc=Maciej.Grochowski@sony.com \
--cc=Mesih.Kilinc@sony.com \
--cc=alexey.fomenko@intel.com \
--cc=bhelgaas@google.com \
--cc=eauger@redhat.com \
--cc=gloveless@jqluv.com \
--cc=kw@linux.com \
--cc=linux-pci@vger.kernel.org \
--cc=lorenzo.pieralisi@arm.com \
--cc=nbritton@exabit.io \
--cc=robh@kernel.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