All of lore.kernel.org
 help / color / mirror / Atom feed
From: "H. Peter Anvin" <hpa@zytor.com>
To: Yinghai Lu <yinghai@kernel.org>
Cc: Ingo Molnar <mingo@elte.hu>, Thomas Gleixner <tglx@linutronix.de>,
	Jeremy Fitzhardinge <jeremy@goop.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] x86: seperate reserve_early and reserve_early_overlap_check
Date: Wed, 02 Dec 2009 19:19:20 -0800	[thread overview]
Message-ID: <4B172E38.1020208@zytor.com> (raw)
In-Reply-To: <4B1722F0.6030308@kernel.org>

On 12/02/2009 06:31 PM, Yinghai Lu wrote:
>> 1. Renaming reserve_early() to reserve_early_overlap_check() is most
>> likely going to get overlooked, and people will use the "new"
>> reserve_early() thinking that they got the old one.
> kill reserve_early()
> and use
> reserve_early_overlap_check()
> reserve_early_overlap_not_check()

I would think that we should just leave the current reserve_early() in
place... it is what we want most of the time.

I guess I'd like to know specifically when one does *not* want an
overlap check, which is really the issue here.

>> 2. This creates overlapping ranges in the reservation array itself.
> 
> why?
> 
> if the range is retrieved from find_e820_area(). that range should be safe.
> we could add the early_res directly.

If there is no overlap, the current reserve_early() will work just fine.
 If there is overlap, then your code would create overlapping
reservations in the array, since it doesn't seem to check.

Either the new interface is unnecessary, or it is bad... I don't see any
other alternatives.  Unless the only point is to try to shave off a few
microseconds, but if so, it seems rather pointless to seek to the end of
the array first...

> 
> your patch seems to solve the multiple overlap ok problem.
> 
> these overlap check stuff is added by SGI guys to bandit their bios problem. maybe we can kill them at some point.
> 

It's probably a good idea to have them... errors happen.

One thing I would like to see is to change the underlying data structure
to instead of having (start, end, attributes) for each reservation, have
(start, attributes) for all address space.  Such a list would by
definition always be sorted, and overlaps would be trivial to detect.

	-hpa

-- 
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel.  I don't speak on their behalf.


      reply	other threads:[~2009-12-03  3:20 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-25  8:58 [PATCH] x86: seperate reserve_early and reserve_early_overlap_check Yinghai Lu
2009-12-03  1:51 ` H. Peter Anvin
2009-12-03  2:31   ` Yinghai Lu
2009-12-03  3:19     ` H. Peter Anvin [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=4B172E38.1020208@zytor.com \
    --to=hpa@zytor.com \
    --cc=jeremy@goop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=tglx@linutronix.de \
    --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 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.