From: Joel Schopp <jschopp@austin.ibm.com>
To: Andy Whitcroft <apw@shadowen.org>
Cc: akpm@osdl.org, anton@samba.org, haveblue@us.ibm.com,
kravetz@us.ibm.com, linux-kernel@vger.kernel.org,
linux-mm@kvack.org, linuxppc64-dev@ozlabs.org, olof@lixom.net,
paulus@samba.org
Subject: Re: sparsemem ppc64 tidy flat memory comments and fix benign mempresent call
Date: Mon, 09 May 2005 18:03:51 -0500 [thread overview]
Message-ID: <427FEC57.8060505@austin.ibm.com> (raw)
In-Reply-To: <E1DVAVE-00012m-Pq@pinky.shadowen.org>
> diff -upN reference/arch/ppc64/mm/init.c current/arch/ppc64/mm/init.c
> --- reference/arch/ppc64/mm/init.c
> +++ current/arch/ppc64/mm/init.c
> @@ -631,18 +631,19 @@ void __init do_init_bootmem(void)
>
> max_pfn = max_low_pfn;
>
> - /* add all physical memory to the bootmem map. Also, find the first
> - * presence of all LMBs*/
> + /* Add all physical memory to the bootmem map, mark each area
> + * present. The first block has already been marked present above.
> + */
> for (i=0; i < lmb.memory.cnt; i++) {
> unsigned long physbase, size;
>
> physbase = lmb.memory.region[i].physbase;
> size = lmb.memory.region[i].size;
> - if (i) { /* already created mappings for first LMB */
> + if (i) {
> start_pfn = physbase >> PAGE_SHIFT;
> end_pfn = start_pfn + (size >> PAGE_SHIFT);
> + memory_present(0, start_pfn, end_pfn);
> }
> - memory_present(0, start_pfn, end_pfn);
> free_bootmem(physbase, size);
> }
Instead of moving all that around why don't we just drop the duplicate
and the if altogether? I tested and sent a patch back in March that
cleaned up the non-numa case pretty well.
http://sourceforge.net/mailarchive/message.php?msg_id=11320001
WARNING: multiple messages have this Message-ID (diff)
From: Joel Schopp <jschopp@austin.ibm.com>
To: Andy Whitcroft <apw@shadowen.org>
Cc: akpm@osdl.org, anton@samba.org, haveblue@us.ibm.com,
kravetz@us.ibm.com, linux-kernel@vger.kernel.org,
linux-mm@kvack.org, linuxppc64-dev@ozlabs.org, olof@lixom.net,
paulus@samba.org
Subject: Re: sparsemem ppc64 tidy flat memory comments and fix benign mempresent call
Date: Mon, 09 May 2005 18:03:51 -0500 [thread overview]
Message-ID: <427FEC57.8060505@austin.ibm.com> (raw)
In-Reply-To: <E1DVAVE-00012m-Pq@pinky.shadowen.org>
> diff -upN reference/arch/ppc64/mm/init.c current/arch/ppc64/mm/init.c
> --- reference/arch/ppc64/mm/init.c
> +++ current/arch/ppc64/mm/init.c
> @@ -631,18 +631,19 @@ void __init do_init_bootmem(void)
>
> max_pfn = max_low_pfn;
>
> - /* add all physical memory to the bootmem map. Also, find the first
> - * presence of all LMBs*/
> + /* Add all physical memory to the bootmem map, mark each area
> + * present. The first block has already been marked present above.
> + */
> for (i=0; i < lmb.memory.cnt; i++) {
> unsigned long physbase, size;
>
> physbase = lmb.memory.region[i].physbase;
> size = lmb.memory.region[i].size;
> - if (i) { /* already created mappings for first LMB */
> + if (i) {
> start_pfn = physbase >> PAGE_SHIFT;
> end_pfn = start_pfn + (size >> PAGE_SHIFT);
> + memory_present(0, start_pfn, end_pfn);
> }
> - memory_present(0, start_pfn, end_pfn);
> free_bootmem(physbase, size);
> }
Instead of moving all that around why don't we just drop the duplicate
and the if altogether? I tested and sent a patch back in March that
cleaned up the non-numa case pretty well.
http://sourceforge.net/mailarchive/message.php?msg_id=11320001
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"aart@kvack.org"> aart@kvack.org </a>
next prev parent reply other threads:[~2005-05-09 23:04 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-05-04 20:30 [3/3] sparsemem memory model for ppc64 Andy Whitcroft
2005-05-04 20:30 ` Andy Whitcroft
2005-05-05 2:31 ` Olof Johansson
2005-05-05 2:31 ` Olof Johansson
2005-05-05 17:37 ` Andy Whitcroft
2005-05-05 17:37 ` Andy Whitcroft
2005-05-09 15:49 ` sparsemem ppc64 tidy flat memory comments and fix benign mempresent call Andy Whitcroft
2005-05-09 15:49 ` Andy Whitcroft
2005-05-09 23:03 ` Joel Schopp [this message]
2005-05-09 23:03 ` Joel Schopp
2005-05-10 15:45 ` Andy Whitcroft
2005-05-10 19:42 ` mike kravetz
2005-05-10 19:42 ` mike kravetz
2005-05-17 13:08 ` [PATCH] sparsemem-ppc64-flat-first-block-is-not-special Andy Whitcroft
2005-05-17 13:08 ` Andy Whitcroft
2005-05-05 17:53 ` [3/3] sparsemem memory model for ppc64 mike kravetz
2005-05-05 17:53 ` mike kravetz
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=427FEC57.8060505@austin.ibm.com \
--to=jschopp@austin.ibm.com \
--cc=akpm@osdl.org \
--cc=anton@samba.org \
--cc=apw@shadowen.org \
--cc=haveblue@us.ibm.com \
--cc=kravetz@us.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linuxppc64-dev@ozlabs.org \
--cc=olof@lixom.net \
--cc=paulus@samba.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.