From: "H. Peter Anvin" <hpa@zytor.com>
To: Bjorn Helgaas <bjorn.helgaas@hp.com>
Cc: Jesse Barnes <jbarnes@virtuousgeek.org>,
Brian Bloniarz <phunge0@hotmail.com>,
Charles Butterfield <charles.butterfield@nextcentury.com>,
Denys Vlasenko <dvlasenk@redhat.com>,
linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org,
Stefan Becker <chemobejk@gmail.com>,
Yinghai Lu <yinghai@kernel.org>,
Thomas Gleixner <tglx@linutronix.de>,
Linus Torvalds <torvalds@linux-foundation.org>,
Ingo Molnar <mingo@elte.hu>
Subject: Re: [PATCH 3/3] PCI: allocate bus resources from the top down
Date: Thu, 16 Sep 2010 10:44:08 -0700 [thread overview]
Message-ID: <4C925768.7040707@zytor.com> (raw)
In-Reply-To: <201009161104.15665.bjorn.helgaas@hp.com>
On 09/16/2010 10:04 AM, Bjorn Helgaas wrote:
> It does seem like we should do *something* with E820 reserved areas, but
> I'm not 100% convinced we should be more strict than Windows. If we
> pay attention to things Windows doesn't test, I think we're likely to
> trip over even more BIOS bugs.
Windows have a couple of advantages on us. They have WHQL; every
machine needs to pass WHQL or it doesn't get sold. The other advantage
is that most manufacturers of Windows desktops don't give a damn about
anything other than the shipping configuration (Windows version and
hardware): I have seen machines which fail to boot if you put in a PCI
UART card.
> Linux does avoid putting PCI devices in E820 reserved areas ... in
> some cases. In this Dell case, the reserved area conflicts with a
> host bridge window, so we expand the reserved area and insert it as
> the *parent* of the window. Since it's the parent, it has no effect
> on allocations from the window, so we end up putting devices in the
> reserved area.
OK, so that's a problem. This isn't really a hideously uncommon use
case for a reserved region, either: it probably reflects a device used
by SMM under that particular host bridge.
> I think the problem is that E820 reservations fundamentally don't
> fit well with the Linux resource manager. We manage resources as
> a strict hierarchy of non-overlapping regions, but there's no
> requirement that E820 reservations have any relationship with actual
> devices that we discover via ACPI, PCI, etc.
>
> We've been kludging around this with a collection of hacks like
> reserve_region_with_split() and insert_resource_expand_to_fit(),
> but I think we're just making an unmaintainable mess. We should
> take a step back and think about how to do this cleanly.
Perhaps we should consider reserved regions a separate hierarchy, or we
should deal with them at the time a new resource is created?
-hpa
--
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel. I don't speak on their behalf.
next prev parent reply other threads:[~2010-09-16 17:45 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20100915210818.12365.58732.stgit@bob.kio>
2010-09-15 21:09 ` [PATCH 1/3] x86/PCI: allocate space from the end of a region, not the beginning Bjorn Helgaas
2010-09-15 21:09 ` [PATCH 2/3] resources: allocate space within a region from the top down Bjorn Helgaas
2010-09-15 21:09 ` [PATCH 3/3] PCI: allocate bus resources " Bjorn Helgaas
2010-09-15 21:50 ` H. Peter Anvin
2010-09-15 22:44 ` Bjorn Helgaas
2010-09-15 23:45 ` H. Peter Anvin
2010-09-16 17:04 ` Bjorn Helgaas
2010-09-16 17:44 ` H. Peter Anvin [this message]
2010-09-16 19:33 ` Yinghai Lu
2010-09-16 20:02 ` H. Peter Anvin
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=4C925768.7040707@zytor.com \
--to=hpa@zytor.com \
--cc=bjorn.helgaas@hp.com \
--cc=charles.butterfield@nextcentury.com \
--cc=chemobejk@gmail.com \
--cc=dvlasenk@redhat.com \
--cc=jbarnes@virtuousgeek.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=phunge0@hotmail.com \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.org \
--cc=yinghai@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
Powered by JetHome