Re: [PATCH 1/5] generic __remove_pages() support



On Thu, 2008-03-06 at 11:08 -0800, Randy Dunlap wrote:
On Thu, 06 Mar 2008 10:55:34 -0800 Badari Pulavarty wrote:

Generic helper function to remove section mappings and sysfs entries
for the section of the memory we are removing. offline_pages() correctly
adjusted zone and marked the pages reserved.

Such generic (exported, non-static) interfaces could use some
(kernel-)docs, please.

Sure. Will do.

Issue: If mem_map, usemap allocation could come from different places -
kmalloc, vmalloc, alloc_pages or bootmem. There is no easy way
to find and free up bootmem allocations.

Signed-off-by: Badari Pulavarty <pbadari@xxxxxxxxxx>

---
include/linux/memory_hotplug.h | 4 +++
mm/memory_hotplug.c | 44 +++++++++++++++++++++++++++++++++++++++++
mm/sparse.c | 43 +++++++++++++++++++++++++++++++++++++---
3 files changed, 88 insertions(+), 3 deletions(-)

Index: linux-2.6.25-rc2/include/linux/memory_hotplug.h
===================================================================
--- linux-2.6.25-rc2.orig/include/linux/memory_hotplug.h 2008-02-27 12:58:17.000000000 -0800
+++ linux-2.6.25-rc2/include/linux/memory_hotplug.h 2008-02-27 13:00:04.000000000 -0800
@@ -64,6 +65,8 @@ extern int offline_pages(unsigned long,
/* reasonably generic interface to expand the physical pages in a zone */
extern int __add_pages(struct zone *zone, unsigned long start_pfn,
unsigned long nr_pages);
+extern int __remove_pages(struct zone *zone, unsigned long start_pfn,
+ unsigned long nr_pages);

/*
* Walk thorugh all memory which is registered as resource.

through :)

I will fix that.

Thanks,
Badari

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



Relevant Pages

  • Re: [PATCH 1/5] generic __remove_pages() support
    ... adjusted zone and marked the pages reserved. ... interfaces could use some ... to find and free up bootmem allocations. ... Walk thorugh all memory which is registered as resource. ...
    (Linux-Kernel)
  • Re: NVIDIA FreeBSD kernel feature requests
    ... This summary makes an attempt to describe the kernel interfaces needed by ... and user mappings of I/O memory, ...
    (freebsd-hackers)
  • Re: NVIDIA FreeBSD kernel feature requests
    ... This summary makes an attempt to describe the kernel interfaces needed by ... and user mappings of I/O memory, ...
    (freebsd-hackers)
  • Re: Pin budgeting
    ... inductance to a low enough level that the on chip and off chip switching ... I/O buses, intraprocessor busses, and specialized I/O. ... The commodity memory interface unfortunately has relatively low per- ... Interprocessor interfaces can be customized, ...
    (comp.arch)
  • Re: actxserver and related issues
    ... My problem is for Excel and i have seen posts on this group about it ... So memory is only used once, ... logical groups called interfaces. ... defined in an executable somewhere. ...
    (comp.soft-sys.matlab)