mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Maciej Grochowski <Maciej.Grochowski@sony.com>
To: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
Cc: linux-kernel@vger.kernel.org,
	"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,  2 Nov 2026 23:19:30 -0800	[thread overview]
Message-ID: <20261103071937.37940-1-Maciej.Grochowski@sony.com> (raw)
In-Reply-To: <20261021124956.4250-1-ilpo.jarvinen@linux.intel.com>

Hi Ilpo,

Thanks for the update. We already had the v4 backport in testing when
you asked us to wait for v5, so here are Mesih's sizing results.

Our setup has an AST2720 root complex, a Microchip PM50052 switch and
eight Microchip PCI1003 devices. The BAR resource sizes per PCI1003 are:

  16 MiB + 16 MiB + 4 MiB = 36 MiB

That gives 288 MiB across all eight devices.

The prefetchable bridge window is still 387 MiB with v4, the same as v2,
compared with 384 MiB using our local max() -> ALIGN() workaround.

Looking at pbus_size_mem(), I think the extra 3 MiB may come from three
unused prefetchable bridge windows: 0001:02:08.0, 09.0 and 0a.0. One
branch is empty; the other two have Pericom UARTs with non-prefetchable
BARs.

V4 keeps:

  size += max(r_size, align);

For a zero-sized window aligned to 1 MiB, max() contributes 1 MiB, while
ALIGN() contributes zero. That would account for the difference if all
three resources reach this loop. Together with 96 MiB of alignment
padding, this gives 387 MiB instead of 384 MiB.

pbus_size_mem_optional() returns false when realloc_head is NULL, but we
have not yet traced the resource flags and alignment at each level to
confirm this explanation.

Is that minimum contribution intentional for empty prefetchable windows,
or should zero-sized windows be skipped in this pass?

So far we have compared sizing only. We do not yet have a complete
allocator trace or a verified v4 BAR-assignment result.

Thanks,
Maciej

      parent reply	other threads:[~2026-11-03  7:20 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-21 12:49 Ilpo Järvinen
2026-10-21 12:49 ` [PATCH v4 1/7] resource: Mark free space assigned Ilpo Järvinen
2026-10-21 12:49 ` [PATCH v4 2/7] PCI/parisc: Clean up resource debug print & use dynamic debug Ilpo Järvinen
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 12:49 ` [PATCH v4 4/7] PCI: Fix nesting windows with remainder at the left edge Ilpo Järvinen
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:49 ` [PATCH v4 6/7] PCI: Place resources to either edge of the window Ilpo Järvinen
2026-10-21 12:49 ` [PATCH v4 7/7] PCI: Fix composite resource sizing Ilpo Järvinen
2026-11-03  7:19 ` Maciej Grochowski [this message]

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=20261103071937.37940-1-Maciej.Grochowski@sony.com \
    --to=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=ilpo.jarvinen@linux.intel.com \
    --cc=kw@linux.com \
    --cc=linux-kernel@vger.kernel.org \
    --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

all inboxes | Powered by JetHome®