public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jeremy Fitzhardinge <jeremy@goop.org>
To: "H. Peter Anvin" <hpa@zytor.com>
Cc: Yinghai Lu <yinghai@kernel.org>,
	Thomas Gleixner <tglx@linutronix.de>, Ingo Molnar <mingo@elte.hu>,
	Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Vivek Goyal <vgoyal@redhat.com>
Subject: Re: [PATCH 0/4] memblock related fixes for -tip
Date: Wed, 13 Oct 2010 13:03:11 -0700	[thread overview]
Message-ID: <4CB6107F.4080908@goop.org> (raw)
In-Reply-To: <4CB5F86C.9030900@zytor.com>

 On 10/13/2010 11:20 AM, H. Peter Anvin wrote:
> On 10/13/2010 09:31 AM, Jeremy Fitzhardinge wrote:
>>> use ARCH_FIND_MEMBLOCK_AREA to select from them.
>> Thanks, that fixes the problem.  I would ideally like to make the the
>> Xen code independent of the page allocation ordering, but it looks like
>> it will be very tricky since we effectively make use of the pagetable as
>> a way of storing one bit of information about each page before there's a
>> struct page in place.
>>
>> So this patch looks good to me (but there's no need to make it a
>> separate config option).
>>
> There isn't per se, but I have repeatedly expressed unhappiness about
> x86 having a completely different allocation policy -- worse, bottom-up
> is the absolutely worst possible allocation policy since low-address
> memory is a precious resource for all kinds of odd requirements
> (trampoline pages, ZONE_DMA, ZONE_DMA32 and so on.)
>
> Furthermore, I really, really disapprove of interfaces which carry
> hidden semantics, such as allocation order.

Me too.  I'd like to fix the Xen code to handle any pages.

> I have repeatedly asked that we do *not* do this on x86 if we're going
> to go to a memblock-everywhere configuration.
>
> Now, if Xen needs it, there are few options that I can see in the short
> term, neither of which makes me happy -- I would appreciate
>
> a) Add an explicit interface to allocate bottoms-up, and have Xen use it
> because it needs it.  This is appropriate if (and only if) the
> allocations in Xen aren't underneath a bunch of extra layers.

The allocation is done in find_early_table_space() in x86/mm/init.c, so
the allocation call itself can't be easily replaced, but I suppose some
of the parameters could be global and tweaked by Xen code, but that's
pretty ugly.

> c) Just accept it for now with the intent of getting rid of it as soon
> as possible.  I'd be fine pushing this for 2.6.37, but I'd like to get a
> reasonably firm commitment try to come up with something better within
> the next kernel cycle.
>
> Opinions?

I'm looking at ways of avoiding the dependency on bottom-up allocation
at the moment.  It looks like it's OK if I can assume that the pagetable
is being allocated out of pages in the range
e820_table_start-e820_table_end (though one hopes those will get renamed
to something a bit more meaningful).

I should know how its going to turn out later today.

    J

  reply	other threads:[~2010-10-13 20:03 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-04 21:57 [PATCH 0/4] memblock related fixes for -tip Yinghai Lu
2010-10-06 22:52 ` Jeremy Fitzhardinge
2010-10-06 22:57   ` Yinghai Lu
2010-10-06 22:59     ` H. Peter Anvin
2010-10-07 18:31       ` Jeremy Fitzhardinge
2010-11-03  5:05         ` Debug patches for memblock Yinghai Lu
2010-11-03  5:13           ` Jeremy Fitzhardinge
2010-10-12  0:01   ` [tip:core/memblock] memblock: Allow memblock_init to be called early tip-bot for Jeremy Fitzhardinge
2010-10-12 18:41 ` [PATCH 0/4] memblock related fixes for -tip Jeremy Fitzhardinge
2010-10-12 18:45   ` Yinghai Lu
2010-10-12 21:12   ` Yinghai Lu
2010-10-12 21:42     ` Jeremy Fitzhardinge
2010-10-12 21:50       ` H. Peter Anvin
2010-10-12 22:02         ` Yinghai Lu
2010-10-12 21:42     ` H. Peter Anvin
2010-10-12 22:01       ` Yinghai Lu
2010-10-12 22:10         ` H. Peter Anvin
2010-10-12 23:37     ` Jeremy Fitzhardinge
2010-10-13  5:40       ` Yinghai Lu
2010-10-13 16:31         ` Jeremy Fitzhardinge
2010-10-13 18:12           ` Yinghai Lu
2010-10-13 18:20           ` H. Peter Anvin
2010-10-13 20:03             ` Jeremy Fitzhardinge [this message]
2010-10-13 21:03               ` H. Peter Anvin
2010-10-13 23:02                 ` Jeremy Fitzhardinge
2010-10-13 23:07                   ` H. Peter Anvin
2010-10-14  0:31                   ` [tip:core/memblock] xen: Cope with unmapped pages when initializing kernel pagetable tip-bot for Jeremy Fitzhardinge
2010-10-13 22:06               ` [PATCH 0/4] memblock related fixes for -tip Yinghai Lu
2010-10-13 23:07                 ` Jeremy Fitzhardinge
2010-10-13 23:14                 ` Jeremy Fitzhardinge
2010-10-13 23:18                   ` H. Peter Anvin
2010-10-13 23:34                     ` Jeremy Fitzhardinge
2010-10-14  0:08                       ` Yinghai
2010-10-14  0:24                         ` Jeremy Fitzhardinge
2010-10-14  0:27                           ` H. Peter Anvin
2010-10-14  0:31                       ` [tip:core/memblock] x86-64: Only set max_pfn_mapped to 512 MiB if we enter via head_64.S tip-bot for Jeremy Fitzhardinge
2010-10-14  5:57                         ` Ingo Molnar
2010-10-14  5:59                           ` Ingo Molnar
2010-10-14  6:06                           ` Ingo Molnar
2010-10-14  6:07                           ` Yinghai Lu
2010-10-14  6:37                             ` Ingo Molnar
2010-10-14  7:03                               ` Yinghai Lu
2010-10-14  7:42                                 ` tip-bot for Jeremy Fitzhardinge

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=4CB6107F.4080908@goop.org \
    --to=jeremy@goop.org \
    --cc=benh@kernel.crashing.org \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=tglx@linutronix.de \
    --cc=vgoyal@redhat.com \
    --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