login
Login
/
Register
Search
Search this site:
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2008
»
April
»
28
Re: [patch] mm: node-setup agnostic free_bootmem()
view
thread
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
[view in full thread]
From: Johannes Weiner
Subject:
Re: [patch] mm: node-setup agnostic free_bootmem()
Date: Monday, April 28, 2008 - 9:49 am
Hi Ingo, Ingo Molnar <mingo@elte.hu> writes:
quoted text
> * Johannes Weiner <hannes@saeurebad.de> wrote: > >> > so i very much agree that your changes are cleaner, i just wanted to >> > have one that has all the fixes included. >> >> I had planned this to be another patch because there are more then one >> boundary check I wanted to tighten. I can merge them though if you >> like. > > no, better to have them in separate patches.
Okay.
quoted text
>> > Would you like to post a patch against current -git or should i >> > extract the cleaner reserve_bootmem() from your previous patch? >> >> I just moved and have only sporadic internet access and free time >> slots available. Would be nice if you could do it! > > sure, find the merged patch below, against latest -git, boot-tested on > x86. Is this what you had in mind? > > Ingo > > ----------------> > Subject: mm: node-setup agnostic free_bootmem() > From: Johannes Weiner <hannes@saeurebad.de> > Date: Wed, 16 Apr 2008 13:36:31 +0200 > > Make free_bootmem() look up the node holding the specified address > range which lets it work transparently on single-node and multi-node > configurations. > > If the address range exceeds the node range, it well be marked free > across node boundaries, too. > > Signed-off-by: Johannes Weiner <hannes@saeurebad.de> > CC: Andi Kleen <andi@firstfloor.org> > CC: Yinghai Lu <yhlu.kernel@gmail.com> > CC: Yasunori Goto <y-goto@jp.fujitsu.com> > CC: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> > CC: Christoph Lameter <clameter@sgi.com> > CC: Andrew Morton <akpm@linux-foundation.org> > Signed-off-by: Ingo Molnar <mingo@elte.hu> > --- > mm/bootmem.c | 27 +++++++++++++++++++++++++-- > 1 file changed, 25 insertions(+), 2 deletions(-) > > Index: linux-x86.q/mm/bootmem.c > =================================================================== > --- linux-x86.q.orig/mm/bootmem.c > +++ linux-x86.q/mm/bootmem.c > @@ -493,8 +493,31 @@ int __init reserve_bootmem(unsigned long > void __init free_bootmem(unsigned long addr, unsigned long size) > { > bootmem_data_t *bdata; > - list_for_each_entry(bdata, &bdata_list, list) > - free_bootmem_core(bdata, addr, size); > + unsigned long pos = addr; > + unsigned long partsize = size; > + > + list_for_each_entry(bdata, &bdata_list, list) { > + unsigned long remainder = 0; > + > + if (pos < bdata->node_boot_start) > + continue; > + > + if (PFN_DOWN(pos + partsize) > bdata->node_low_pfn) { > + remainder = PFN_DOWN(pos + partsize) - bdata->node_low_pfn; > + partsize -= remainder; > + } > + > + free_bootmem_core(bdata, pos, partsize); > + > + if (!remainder) > + return; > + > + pos = PFN_PHYS(bdata->node_low_pfn + 1); > + } > + printk(KERN_ERR "free_bootmem: request: addr=%lx, size=%lx, " > + "state: pos=%lx, partsize=%lx\n", addr, size, > + pos, partsize); > + BUG(); > } > > unsigned long __init free_all_bootmem(void)
Yes, looks good. But needs explicit testing, I guess. Hannes --
unsubscribe notice
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to
majordomo@vger.kernel.org
More majordomo info at
http://vger.kernel.org/majordomo-info.html
Please read the FAQ at
http://www.tux.org/lkml/
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
Messages in current thread:
[RFC git pull] "big box" x86 changes
, Ingo Molnar
, (Sat Apr 26, 11:55 am)
Re: [RFC git pull] "big box" x86 changes
, Stefan Richter
, (Sat Apr 26, 12:05 pm)
Re: [RFC git pull] "big box" x86 changes
, Linus Torvalds
, (Sat Apr 26, 12:12 pm)
Re: [RFC git pull] "big box" x86 changes
, Ingo Molnar
, (Sat Apr 26, 12:21 pm)
[git pull] "big box" x86 changes, bootmem/sparsemem
, Ingo Molnar
, (Sat Apr 26, 12:41 pm)
Re: [git pull] "big box" x86 changes, bootmem/sparsemem
, Linus Torvalds
, (Sat Apr 26, 12:52 pm)
[git pull] "big box" x86 changes, boot protocol
, Ingo Molnar
, (Sat Apr 26, 12:54 pm)
Re: [git pull] "big box" x86 changes, bootmem/sparsemem
, Ingo Molnar
, (Sat Apr 26, 1:07 pm)
[git pull] "big box" x86 changes, bootmem/sparsemem, #2
, Ingo Molnar
, (Sat Apr 26, 1:08 pm)
[RFC git pull] "big box" x86 changes, GART
, Ingo Molnar
, (Sat Apr 26, 1:24 pm)
Re: [RFC git pull] "big box" x86 changes, GART
, Ingo Molnar
, (Sat Apr 26, 1:26 pm)
Re: [git pull] "big box" x86 changes, bootmem/sparsemem, #2
, Linus Torvalds
, (Sat Apr 26, 1:30 pm)
Re: [git pull] "big box" x86 changes, boot protocol
, Andrew Morton
, (Sat Apr 26, 1:39 pm)
[git pull] "big box" x86 changes, bootmem/sparsemem, #3
, Ingo Molnar
, (Sat Apr 26, 1:55 pm)
Re: [git pull] "big box" x86 changes, boot protocol
, Adrian Bunk
, (Sat Apr 26, 2:06 pm)
Re: [git pull] "big box" x86 changes, boot protocol
, H. Peter Anvin
, (Sat Apr 26, 2:10 pm)
Re: [git pull] "big box" x86 changes, boot protocol
, Linus Torvalds
, (Sat Apr 26, 2:11 pm)
Re: [git pull] "big box" x86 changes, boot protocol
, Ingo Molnar
, (Sat Apr 26, 2:17 pm)
[git pull] "big box" x86 changes, PCI
, Ingo Molnar
, (Sat Apr 26, 2:55 pm)
Re: [RFC git pull] "big box" x86 changes
, Andi Kleen
, (Sat Apr 26, 3:17 pm)
Re: [git pull] "big box" x86 changes, boot protocol
, Jeremy Fitzhardinge
, (Sat Apr 26, 4:37 pm)
Re: [RFC git pull] "big box" x86 changes
, Yinghai Lu
, (Sat Apr 26, 8:14 pm)
Re: [RFC git pull] "big box" x86 changes
, Andi Kleen
, (Sun Apr 27, 1:30 am)
Re: [RFC git pull] "big box" x86 changes II
, Andi Kleen
, (Sun Apr 27, 1:32 am)
Re: [git pull] "big box" x86 changes, boot protocol
, Ian Campbell
, (Sun Apr 27, 4:21 am)
Re: [git pull] "big box" x86 changes, PCI
, Jesse Barnes
, (Sun Apr 27, 9:30 am)
Re: [git pull] "big box" x86 changes, boot protocol
, H. Peter Anvin
, (Sun Apr 27, 12:29 pm)
Re: [git pull] "big box" x86 changes, bootmem/sparsemem
, Johannes Weiner
, (Sun Apr 27, 3:48 pm)
Re: [git pull] "big box" x86 changes, bootmem/sparsemem
, Ingo Molnar
, (Sun Apr 27, 4:46 pm)
Re: [git pull] "big box" x86 changes, bootmem/sparsemem
, Johannes Weiner
, (Sun Apr 27, 5:19 pm)
Re: [git pull] "big box" x86 changes, bootmem/sparsemem
, Yinghai Lu
, (Sun Apr 27, 5:33 pm)
[patch] mm: node-setup agnostic free_bootmem()
, Ingo Molnar
, (Sun Apr 27, 5:40 pm)
Re: [patch] mm: node-setup agnostic free_bootmem()
, Yinghai Lu
, (Sun Apr 27, 6:48 pm)
Re: [git pull] "big box" x86 changes, boot protocol
, Ingo Molnar
, (Mon Apr 28, 8:27 am)
Re: [git pull] "big box" x86 changes, PCI
, Ingo Molnar
, (Mon Apr 28, 8:38 am)
Re: [patch] mm: node-setup agnostic free_bootmem()
, Johannes Weiner
, (Mon Apr 28, 9:49 am)
Re: [patch] mm: node-setup agnostic free_bootmem()
, Johannes Weiner
, (Mon Apr 28, 9:54 am)
Re: [git pull] "big box" x86 changes, bootmem/sparsemem
, Johannes Weiner
, (Mon Apr 28, 9:58 am)
Re: [patch] mm: node-setup agnostic free_bootmem()
, Yinghai Lu
, (Mon Apr 28, 12:11 pm)
Re: [patch] mm: node-setup agnostic free_bootmem()
, Yinghai Lu
, (Mon Apr 28, 12:55 pm)
Re: [git pull] "big box" x86 changes, PCI
, Jesse Barnes
, (Mon Apr 28, 1:34 pm)
Re: [git pull] "big box" x86 changes, PCI
, Yinghai Lu
, (Mon Apr 28, 3:53 pm)
[PATCH] x86/pci: remove flag in pci_cfg_space_size_ext
, Yinghai Lu
, (Mon Apr 28, 4:27 pm)
Re: [patch] mm: node-setup agnostic free_bootmem()
, Ingo Molnar
, (Tue Apr 29, 7:25 am)
Re: [PATCH] x86/pci: remove flag in pci_cfg_space_size_ext
, Jesse Barnes
, (Tue Apr 29, 9:14 am)
Re: [PATCH] x86/pci: remove flag in pci_cfg_space_size_ext
, Ingo Molnar
, (Tue Apr 29, 3:05 pm)
Re: [PATCH] x86/pci: remove flag in pci_cfg_space_size_ext
, Jesse Barnes
, (Tue Apr 29, 3:34 pm)
Re: [patch] mm: node-setup agnostic free_bootmem()
, Johannes Weiner
, (Wed Apr 30, 3:50 am)
Re: [patch] mm: node-setup agnostic free_bootmem()
, Johannes Weiner
, (Wed Apr 30, 3:52 am)
Re: [patch] mm: node-setup agnostic free_bootmem()
, Yinghai Lu
, (Wed Apr 30, 9:22 am)
Re: [patch] mm: node-setup agnostic free_bootmem()
, Johannes Weiner
, (Wed Apr 30, 10:52 am)
Re: [patch] mm: node-setup agnostic free_bootmem()
, Yinghai Lu
, (Wed Apr 30, 1:30 pm)
Navigation
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
Michael Trimarchi
Re: [PATCH] VFS: make file->f_pos access atomic on 32bit arch
Miklos Szeredi
[patch 14/15] vfs: more path_permission() conversions
Serge E. Hallyn
Re: [RFC v5][PATCH 7/8] Infrastructure for shared objects
Bernd Schmidt
Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3
Takashi Iwai
[PATCH 2/2] input: Add LED support to Synaptics device
git
:
Junio C Hamano
Re: mingw, windows, crlf/lf, and git
Eyvind Bernhardsen
Re: Where has "git ls-remote" reference pattern matching gone?
Shawn O. Pearce
Re: Switching from CVS to GIT
Todd Zullinger
Re: [PATCH 2/2] send-email: rfc2047-quote subject lines with non-ascii characters
Santi Béjar
Re: How to use git-fmt-merge-msg?
linux-netdev
:
Ramkrishna Vepa
[net-2.6 PATCH 1/10] Neterion: New driver: Driver help file
Mark Anthony
invitation / inquiry
Ingo Molnar
Re: [PATCH 08/16] dma-debug: add core checking functions
David Miller
Re: [PATCH 1/3] f_phonet: dev_kfree_skb instead of dev_kfree_skb_any in TX callback
Sascha Hauer
[PATCH 03/12] fec: do not typedef struct types
git-commits-head
:
Linux Kernel Mailing List
amba: struct device - replace bus_id with dev_name(), dev_set_name()
Linux Kernel Mailing List
MIPS: Yosemite: Convert SMP startup lock to arch spinlock.
Linux Kernel Mailing List
ARM: S5PC100: IRQ and timer
Linux Kernel Mailing List
davinci: edma: clear interrupt status for interrupt enabled channels only
Linux Kernel Mailing List
x86, mm, kprobes: fault.c, simplify notify_page_fault()
openbsd-misc
:
Daniel A. Ramaley
Re: [semi-OT] Can anyone recommend an OpenBSD-compatible colour laser printer?
Matthias Kilian
Re: can't get vesa @ 1280x800 or nv
Tobias Ulmer
Re: Problem after upgrade 4.5 to 4.6: ERR M
Philip Guenther
Re: SIGCHLD and libpthread.so
J.C. Roberts
Re: [semi-OT] Can anyone recommend an OpenBSD-compatible colour laser printer?
Colocation donated by:
Syndicate