From: "Yinghai Lu" <yhlu.kernel@gmail.com>
To: "KAMEZAWA Hiroyuki" <kamezawa.hiroyu@jp.fujitsu.com>
Cc: "Andrew Morton" <akpm@linux-foundation.org>,
"Ingo Molnar" <mingo@elte.hu>, "Andi Kleen" <ak@suse.de>,
"Christoph Lameter" <clameter@sgi.com>,
linux-kernel@vger.kernel.org,
"Yasunori Goto" <y-goto@jp.fujitsu.com>
Subject: Re: [PATCH] mm: make reserve_bootmem can crossed the nodes
Date: Thu, 13 Mar 2008 19:00:33 -0700 [thread overview]
Message-ID: <86802c440803131900j30ef490bk1923fdd219433535@mail.gmail.com> (raw)
In-Reply-To: <20080314105529.79921546.kamezawa.hiroyu@jp.fujitsu.com>
On Thu, Mar 13, 2008 at 6:55 PM, KAMEZAWA Hiroyuki
<kamezawa.hiroyu@jp.fujitsu.com> wrote:
> On Thu, 13 Mar 2008 18:35:51 -0700
>
> "Yinghai Lu" <yhlu.kernel@gmail.com> wrote:
>
> > On Thu, Mar 13, 2008 at 6:34 PM, KAMEZAWA Hiroyuki
> > <kamezawa.hiroyu@jp.fujitsu.com> wrote:
> > > On Thu, 13 Mar 2008 16:45:42 -0700
> > > "Yinghai Lu" <yhlu.kernel@gmail.com> wrote:
> > > > int __init reserve_bootmem(unsigned long addr, unsigned long size,
> > > > int flags)
> > > > {
> > > > - return reserve_bootmem_core(NODE_DATA(0)->bdata, addr, size, flags);
> > > > + int ret;
> > > > + bootmem_data_t *bdata;
> > > > + list_for_each_entry(bdata, &bdata_list, list) {
> > > > + ret = can_reserve_bootmem_core(bdata, addr, size, flags);
> > > > + if (ret < 0)
> > > > + return ret;
> > > > + }
> > > > + list_for_each_entry(bdata, &bdata_list, list)
> > > > + reserve_bootmem_core(bdata, addr, size, flags);
> > > > + return 0;
> > > > }
> > >
> > > why list_for_each twice ?
> >
> > first_for_each only check if we can reserve that.
> > second will do the reserve job.
> >
> Hmm, can a call to reserve_bootmem() return a memory region which spread across
> prural nodes ?
Yes. there is one reserve_bootmem in reserve_crashkernel. and position
is passed via commandline...
there is some chance for ramdisk too. it is called via reserve_bootmem_generic.
YH
next prev parent reply other threads:[~2008-03-14 2:00 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-13 23:45 Yinghai Lu
2008-03-14 0:13 ` Johannes Weiner
2008-03-14 1:04 ` Yinghai Lu
2008-03-14 2:50 ` Johannes Weiner
2008-03-14 3:09 ` Yinghai Lu
2008-03-14 1:34 ` KAMEZAWA Hiroyuki
2008-03-14 1:35 ` Yinghai Lu
2008-03-14 1:55 ` KAMEZAWA Hiroyuki
2008-03-14 2:00 ` Yinghai Lu [this message]
2008-03-14 2:36 ` KAMEZAWA Hiroyuki
2008-03-14 2:58 ` Johannes Weiner
2008-03-14 3:03 ` Yinghai Lu
2008-03-15 3:08 ` Johannes Weiner
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=86802c440803131900j30ef490bk1923fdd219433535@mail.gmail.com \
--to=yhlu.kernel@gmail.com \
--cc=ak@suse.de \
--cc=akpm@linux-foundation.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®