From: Mika Westerberg <mika.westerberg@linux.intel.com>
To: Jon Derrick <jonathan.derrick@intel.com>
Cc: Bjorn Helgaas <helgaas@kernel.org>,
linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org,
Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>,
Keith Busch <keith.busch@intel.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Sinan Kaya <okaya@kernel.org>, Christoph Hellwig <hch@lst.de>,
Matthew Wilcox <willy@infradead.org>,
Logan Gunthorpe <logang@deltatee.com>,
Stephen Bates <sbates@raithlin.com>
Subject: Re: [PATCH v2] PCI: Equalize hotplug memory for non/occupied slots
Date: Fri, 31 Aug 2018 16:51:35 +0300 [thread overview]
Message-ID: <20180831135135.GO2283@lahna.fi.intel.com> (raw)
In-Reply-To: <1535667120-3002-2-git-send-email-jonathan.derrick@intel.com>
On Thu, Aug 30, 2018 at 04:12:00PM -0600, Jon Derrick wrote:
> Currently, a hotplug bridge will be given hpmemsize additional memory if
> available, in order to satisfy any future hotplug allocation
> requirements.
>
> These calculations don't consider the current memory size of the hotplug
> bridge/slot, so hotplug bridges/slots which have downstream devices will
> get their current allocation in addition to the hpmemsize value.
>
> This makes for possibly undesirable results with a mix of unoccupied and
> occupied slots (ex, with hpmemsize=2M):
>
> 02:03.0 PCI bridge: <-- Occupied
> Memory behind bridge: d6200000-d64fffff [size=3M]
> 02:04.0 PCI bridge: <-- Unoccupied
> Memory behind bridge: d6500000-d66fffff [size=2M]
>
> This change considers the current allocation size when using the
> hpmemsize parameter to make the reservations predictable for the mix of
> unoccupied and occupied slots:
>
> 02:03.0 PCI bridge: <-- Occupied
> Memory behind bridge: d6200000-d63fffff [size=2M]
> 02:04.0 PCI bridge: <-- Unoccupied
> Memory behind bridge: d6400000-d65fffff [size=2M]
>
> The calculation for IO (hpiosize) should be similar, but platform
> firmwares I've encountered (including QEMU) provide strict allocations
> for IO and would not provide free IO resources for hotplug buses
> in order to prove this calculation.
>
> Signed-off-by: Jon Derrick <jonathan.derrick@intel.com>
Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
next prev parent reply other threads:[~2018-08-31 13:51 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-30 22:11 [PATCH v2] PCI hotplug Eq v2 Jon Derrick
2018-08-30 22:12 ` [PATCH v2] PCI: Equalize hotplug memory for non/occupied slots Jon Derrick
2018-08-31 13:51 ` Mika Westerberg [this message]
2018-09-17 20:53 ` [PATCH v2] PCI hotplug Eq v2 Bjorn Helgaas
2018-09-17 21:00 ` Derrick, Jonathan
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=20180831135135.GO2283@lahna.fi.intel.com \
--to=mika.westerberg@linux.intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=hch@lst.de \
--cc=helgaas@kernel.org \
--cc=jonathan.derrick@intel.com \
--cc=keith.busch@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=logang@deltatee.com \
--cc=lorenzo.pieralisi@arm.com \
--cc=okaya@kernel.org \
--cc=sbates@raithlin.com \
--cc=willy@infradead.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.