From: Matthew Wilcox <matthew@wil.cx>
To: Chris Wright <chrisw@sous-sol.org>
Cc: Jesse Barnes <jbarnes@virtuousgeek.org>,
Ivan Kokshaysky <ink@jurassic.park.msu.ru>,
Linus Torvalds <torvalds@linux-foundation.org>,
Yu Zhao <yu.zhao@intel.com>,
linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org,
stable@kernel.org
Subject: Re: [PATCH] SR-IOV: correct broken resource alignment calculations
Date: Fri, 28 Aug 2009 13:48:26 -0600 [thread overview]
Message-ID: <20090828194825.GM4884@parisc-linux.org> (raw)
In-Reply-To: <20090828191714.GI10360@sequoia.sous-sol.org>
On Fri, Aug 28, 2009 at 12:17:14PM -0700, Chris Wright wrote:
> An SR-IOV capable device includes an SR-IOV PCIe capability which
> describes the Virtual Function (VF) BAR requirements. A typical SR-IOV
> device can support multiple VFs whose BARs must be in a contiguous region,
> effectively an array of VF BARs. The BAR reports the size requirement
> for a single VF. We calculate the full range needed by simply multiplying
> the VF BAR size with the number of possible VFs and create a resource
> spanning the full range.
>
> This all seems sane enough except it artificially inflates the alignment
> requirement for the VF BAR. The VF BAR need only be aligned to the size
> of a single BAR not the contiguous range of VF BARs. This can cause us
> to fail to allocate resources for the BAR despite the fact that we
> actually have enough space.
>
> This patch adds a support for a new resource alignment type,
> IORESOURCE_VSIZEALIGN, and allows struct resource to keep track of the
> size requirements of a VF BAR which are smaller than the full resource
> size. This could also be done all within the PCI layer w/out bloating
> struct resource or using the last available bit for alignment types.
Yes, I think that would be preferable. We have a *LOT* of resources in
the kernel, and the embedded folks would not find it funny if they all
grew in size suddenly.
--
Matthew Wilcox Intel Open Source Technology Centre
"Bill, look, we understand that you're interested in selling us this
operating system, but compare it to ours. We can't possibly take such
a retrograde step."
next prev parent reply other threads:[~2009-08-28 19:48 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-28 19:17 [PATCH] SR-IOV: correct broken resource alignment calculations Chris Wright
2009-08-28 19:43 ` Greg KH
2009-08-28 19:58 ` Chris Wright
2009-08-28 19:48 ` Matthew Wilcox [this message]
2009-08-28 19:59 ` Chris Wright
2009-08-28 20:00 ` [PATCH v2] " Chris Wright
2009-08-30 15:39 ` Jesse Barnes
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=20090828194825.GM4884@parisc-linux.org \
--to=matthew@wil.cx \
--cc=chrisw@sous-sol.org \
--cc=ink@jurassic.park.msu.ru \
--cc=jbarnes@virtuousgeek.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=stable@kernel.org \
--cc=torvalds@linux-foundation.org \
--cc=yu.zhao@intel.com \
/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