From: Adam Litke <agl@us.ibm.com>
To: Jon Tollefson <kniht@linux.vnet.ibm.com>
Cc: linuxppc-dev <linuxppc-dev@ozlabs.org>,
Adam Litke <agl@linux.vnet.ibm.com>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Linux Memory Management List <linux-mm@kvack.org>
Subject: Re: [PATCH] properly reserve in bootmem the lmb reserved regions that cross numa nodes
Date: Tue, 30 Sep 2008 10:47:55 -0500 [thread overview]
Message-ID: <1222789675.13978.14.camel@localhost.localdomain> (raw)
In-Reply-To: <48E23D6C.4030406@linux.vnet.ibm.com>
This seems like the right approach to me. I have pointed out a few
stylistic issues below.
On Tue, 2008-09-30 at 09:53 -0500, Jon Tollefson wrote:
<snip>
> + /* Mark reserved regions */
> + for (i = 0; i < lmb.reserved.cnt; i++) {
> + unsigned long physbase = lmb.reserved.region[i].base;
> + unsigned long size = lmb.reserved.region[i].size;
> + unsigned long start_pfn = physbase >> PAGE_SHIFT;
> + unsigned long end_pfn = ((physbase+size-1) >> PAGE_SHIFT);
CodingStyle dictates that this should be:
unsigned long end_pfn = ((physbase + size - 1) >> PAGE_SHIFT);
<snip>
> +/**
> + * get_node_active_region - Return active region containing start_pfn
> + * @start_pfn The page to return the region for.
> + *
> + * It will return NULL if active region is not found.
> + */
> +struct node_active_region *get_node_active_region(
> + unsigned long start_pfn)
Bad style. I think the convention would be to write it like this:
struct node_active_region *
get_node_active_region(unsigned long start_pfn)
> +{
> + int i;
> + for (i = 0; i < nr_nodemap_entries; i++) {
> + unsigned long node_start_pfn = early_node_map[i].start_pfn;
> + unsigned long node_end_pfn = early_node_map[i].end_pfn;
> +
> + if (node_start_pfn <= start_pfn && node_end_pfn > start_pfn)
> + return &early_node_map[i];
> + }
> + return NULL;
> +}
Since this is using the early_node_map[], should we mark the function
__mminit?
--
Adam Litke - (agl at us.ibm.com)
IBM Linux Technology Center
next prev parent reply other threads:[~2008-09-30 15:48 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-30 14:53 [PATCH] properly reserve in bootmem the lmb reserved regions that cross numa nodes Jon Tollefson
2008-09-30 15:47 ` Adam Litke [this message]
2008-10-01 21:02 ` Kumar Gala
2008-10-06 15:42 ` Jon Tollefson
2008-10-06 15:58 ` Kumar Gala
2008-10-06 20:48 ` Jon Tollefson
2008-10-02 21:52 ` Jon Tollefson
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=1222789675.13978.14.camel@localhost.localdomain \
--to=agl@us.ibm.com \
--cc=agl@linux.vnet.ibm.com \
--cc=kniht@linux.vnet.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linuxppc-dev@ozlabs.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;
as well as URLs for NNTP newsgroup(s).