mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Yinghai Lu" <yhlu.kernel@gmail.com>
To: "Andi Kleen" <andi@firstfloor.org>
Cc: "Andi Kleen" <ak@suse.de>,
	"Andrew Morton" <akpm@linux-foundation.org>,
	mingo@elte.hu, clameter@sgi.com, linux-kernel@vger.kernel.org,
	"Yasunori Goto" <y-goto@jp.fujitsu.com>,
	"KAMEZAWA Hiroyuki" <kamezawa.hiroyu@jp.fujitsu.com>
Subject: Re: [PATCH] mm: fix boundary checking in free_bootmem_core
Date: Fri, 14 Mar 2008 10:36:52 -0700	[thread overview]
Message-ID: <86802c440803141036m4a508a91o2cf6706157231429@mail.gmail.com> (raw)
In-Reply-To: <20080314165336.GS2522@one.firstfloor.org>

On Fri, Mar 14, 2008 at 9:53 AM, Andi Kleen <andi@firstfloor.org> wrote:
> On Fri, Mar 14, 2008 at 09:44:50AM -0700, Yinghai Lu wrote:
>  > On 14 Mar 2008 12:58:44 +0100, Andi Kleen <andi@firstfloor.org> wrote:
>  > > "Yinghai Lu" <yhlu.kernel@gmail.com> writes:
>  > >  >
>  > >  > then i tried to reserve 64M or 128M RAM before that, and free that
>  > >  > before gart/switotble try to allloc_bootmem under 4g.
>  > >
>  > >  Sounds like an incredible hack. There are far better ways to do that
>  > >  for bootmem allocations. e.g. you can just specify a high enough "goal"
>  > >  That is how swiotlb solves a similar problem (at least before my
>  > >  mask allocator rewrite)
>  >
>  > I don't think so.
>  >
>  > anyway, otherway to workaround it is
>  > change
>  >                 return __earlyonly_bootmem_alloc(node, size, size,
>  >                                 __pa(MAX_DMA_ADDRESS));
>  > in vmemmap_alloc_block to
>  >                 return __earlyonly_bootmem_alloc(node, size, size,
>  >                                 __pa(MAX_DMA_ADDRESS + (1<<27)));
>  > to make room for gart. but that is global change. and may affect other
>  > platform.
>
>  You can just make it an optional architecture defined macro
it is hard to use MACRO, if someone have allsysconfig, that will make
kernel code use a lot.
>
>
>  > and don't make sure gart will get it.
>
>  Has nothing to do with the gart?
>
>
>
>  >
>  > also i assume swiotlb need that range is less than 4g.
>
>  The normal rule is that anybody who needs big bootmem allocations
>  need to make sure they're high enough to not fill up first 4GB.
>  For small allocations like most of bootmem it doesn't matter because
>  they're, um, small.
>
>  If vmemmap doesn't do that vmemmap needs to be fixed.

how to define big?
it has hundreds of 2M block. when numa is on, they span on all nodes,
and if numa is off, they are sitting on first_online_node.

YH

  reply	other threads:[~2008-03-14 17:37 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-12  1:01 Yinghai Lu
2008-03-12 23:21 ` Yinghai Lu
2008-03-12 23:33   ` Andrew Morton
2008-03-13  1:11     ` Yinghai Lu
2008-03-13  1:22       ` Andrew Morton
2008-03-13 21:59         ` Andi Kleen
2008-03-13 22:22           ` Yinghai Lu
2008-03-14 11:58             ` Andi Kleen
2008-03-14 16:44               ` Yinghai Lu
2008-03-14 16:53                 ` Andi Kleen
2008-03-14 17:36                   ` Yinghai Lu [this message]
2008-03-21 19:44                     ` Andrew Morton
2008-03-21 20:00                       ` Ingo Molnar
2008-03-21 21:54                       ` Thomas Gleixner

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=86802c440803141036m4a508a91o2cf6706157231429@mail.gmail.com \
    --to=yhlu.kernel@gmail.com \
    --cc=ak@suse.de \
    --cc=akpm@linux-foundation.org \
    --cc=andi@firstfloor.org \
    --cc=clameter@sgi.com \
    --cc=kamezawa.hiroyu@jp.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=y-goto@jp.fujitsu.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®