From: Linus Torvalds <torvalds@linux-foundation.org>
To: Ingo Molnar <mingo@elte.hu>
Cc: Yinghai Lu <yhlu.kernel@gmail.com>,
Thomas Gleixner <tglx@linutronix.de>,
"H. Peter Anvin" <hpa@zytor.com>,
Andrew Morton <akpm@linux-foundation.org>,
Jesse Barnes <jbarnes@virtuousgeek.org>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] x86: split e820 reserved entries record to late v4
Date: Fri, 29 Aug 2008 08:31:08 -0700 (PDT) [thread overview]
Message-ID: <alpine.LFD.1.10.0808290827110.3300@nehalem.linux-foundation.org> (raw)
In-Reply-To: <20080829065812.GA28777@elte.hu>
On Fri, 29 Aug 2008, Ingo Molnar wrote:
> >
> > you will get
> > fec00000 - ffffffff reserved
> > fed0000 - fed003ff hpet
> > fed0000 - fed003ff 0000:00:14.0
>
> ok - because it's fully contained insert_resource() will succeed?
Correct.
> I thought it would only succeed if the new resource was smaller than (a
> subset of) the existing resource.
No, that's "request_resource()".
Yeah, I know, the resource code is complicated, and I wish it wasn't, but
the whole issue with nesting resources correctly simply _is_ fairly
complex.
So "insert_resource()" literally tries to fit a resource into an existing
tree, at the right level, whatever level that is.
In contrast, "request_resource()" is about exclusivity, and tries to
request a "leaf" resource - and it refuses to work if there are resources
it clashes with that cover the same range.
> In the other direction, when a newly inserted resource is a superset of
> the existing resource, i thought we'd fail.
For request_resource, yes.
> hypothetical scenario, what if we had neither a superset nor a subset
> scenario, but a partial overlap, between:
>
> > > BIOS-e820: 00000000fec00000 - 0000000100000000 (reserved)
>
> and:
>
> > > pci 0000:00:14.0: BAR has HPET at feb0f000-fec01000
Now THAT is somethign that the resource structs simply cannot handle. At
that point you'd get a failure even from insert_resource(), because it no
longer nests in the tree. You would have to split the range in order for
it to nest properly.
Linus
next prev parent reply other threads:[~2008-08-29 15:31 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-29 1:29 Yinghai Lu
2008-08-29 6:30 ` Ingo Molnar
2008-08-29 6:47 ` Yinghai Lu
2008-08-29 6:58 ` Ingo Molnar
2008-08-29 7:16 ` Yinghai Lu
2008-08-29 7:28 ` Ingo Molnar
2008-08-29 7:52 ` Yinghai Lu
2008-08-29 15:31 ` Linus Torvalds [this message]
2008-08-29 15:26 ` Linus Torvalds
2008-09-06 17:55 ` Ingo Molnar
2008-08-30 7:58 [PATCH] x86: unify using pci_mmcfg_insert_resource Yinghai Lu
2008-08-30 7:58 ` [PATCH] x86: split e820 reserved entries record to late v4 Yinghai Lu
2008-08-30 20:36 Yinghai Lu
2008-08-31 2:18 ` Yinghai Lu
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=alpine.LFD.1.10.0808290827110.3300@nehalem.linux-foundation.org \
--to=torvalds@linux-foundation.org \
--cc=akpm@linux-foundation.org \
--cc=hpa@zytor.com \
--cc=jbarnes@virtuousgeek.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=tglx@linutronix.de \
--cc=yhlu.kernel@gmail.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
all inboxes | Powered by JetHome®