All of lore.kernel.org
 help / color / mirror / Atom feed
From: William Lee Irwin III <wli@holomorphy.com>
To: linux-kernel@vger.kernel.org
Subject: Re: [RFC] bootmem for 2.5
Date: Wed, 7 Nov 2001 16:44:00 -0800	[thread overview]
Message-ID: <20011107164400.G26577@holomorphy.com> (raw)
In-Reply-To: <20011102140207.V31822@w-wli.des.beaverton.ibm.com> <1005017025.897.0.camel@phantasy>
In-Reply-To: <1005017025.897.0.camel@phantasy>; from rml@tech9.net on Mon, Nov 05, 2001 at 10:23:45PM -0500

On Mon, Nov 05, 2001 at 10:23:45PM -0500, Robert Love wrote:
> The patch is without problem on 2.4.13-ac7.  Free memory increased by
> about 100K: free and dmesg both confirm 384292k vs 384196k.  This is a
> P3-733 on an i815 with 384MB.  Very nice.
> 
> Note that the patch and UP-APIC do not get along.  Some quick debugging
> with William found the cause.  APIC does indeed touch bootmem.  The
> above is thus obviously with CONFIG_X86_UP_APIC unset.
> 
> 	Robert Love

I've managed to reproduce the problem, and I heard from you elsewhere
that you've verified the fix (although it appeared to reduce the memory
savings to 4KB).

start_segment_treap() is a macro (operating largely on the same
principle as list_entry()) which converts a treap_node_t * to a struct *
given the field and struct name by computing offsets and casting. The
casting renders this somewhat less than type safe, and the patch below
corrects a type error I committed in calling it (the start_tree field
is already of type treap_node_t *).



Thanks again,
Bill
-----------------
willir@us.ibm.com

diff -urN linux-broken/mm/bootmem.c linux-bootmem/mm/bootmem.c
--- linux-broken/mm/bootmem.c	Wed Nov  7 16:31:37 2001
+++ linux-bootmem/mm/bootmem.c	Wed Nov  7 16:31:09 2001
@@ -860,7 +860,7 @@
 	while(pgdat) {
 		unsigned in_node;
 
-		tree = start_segment_treap(&pgdat->bdata->segment_tree.start_tree);
+		tree = start_segment_treap(pgdat->bdata->segment_tree.start_tree);
 		in_node = segment_tree_intersects(tree, &segment);
 		in_any_node |= in_node;
 

  parent reply	other threads:[~2001-11-08  0:45 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-11-02 22:02 [RFC] bootmem for 2.5 William Irwin
2001-11-03  3:31 ` William Lee Irwin III
     [not found] ` <20011102214308.A8217@kroah.com>
2001-11-03 19:58   ` William Lee Irwin III
2001-11-06  3:23 ` Robert Love
2001-11-06  4:10   ` William Lee Irwin III
2001-11-08  0:44   ` William Lee Irwin III [this message]
2001-11-08  2:06     ` Robert Love
2001-11-09  0:27       ` William Lee Irwin III
2001-12-15  6:05 ` Ingo Molnar
2001-12-15 13:27   ` William Lee Irwin III

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=20011107164400.G26577@holomorphy.com \
    --to=wli@holomorphy.com \
    --cc=linux-kernel@vger.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 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.