28 Apr, 2008

1 commit

  • This patch is to free memmaps which is allocated by bootmem.

    Freeing usemap is not necessary. The pages of usemap may be necessary for
    other sections.

    If removing section is last section on the node, its section is the final user
    of usemap page. (usemaps are allocated on its section by previous patch.) But
    it shouldn't be freed too, because the section must be logical offline state
    which all pages are isolated against page allocater. If it is freed, page
    alloctor may use it which will be removed physically soon. It will be
    disaster. So, this patch keeps it as it is.

    Signed-off-by: Yasunori Goto
    Cc: Badari Pulavarty
    Cc: Yinghai Lu
    Cc: Yasunori Goto
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Yasunori Goto
     

24 Feb, 2008

1 commit

  • WARNING: vmlinux.o(.meminit.text+0x649):
    Section mismatch in reference from the
    function free_area_init_core() to the function .init.text:setup_usemap()
    The function __meminit free_area_init_core() references
    a function __init setup_usemap().
    If free_area_init_core is only used by setup_usemap then
    annotate free_area_init_core with a matching annotation.

    The warning is covers this stack of functions in mm/page_alloc.c:

    alloc_bootmem_node must be marked __init.
    alloc_bootmem_node is used by setup_usemap, if !SPARSEMEM.
    (usemap_size is only used by setup_usemap, if !SPARSEMEM.)
    setup_usemap is only used by free_area_init_core.
    free_area_init_core is only used by free_area_init_node.

    free_area_init_node is used by:
    arch/alpha/mm/numa.c: __init paging_init()
    arch/arm/mm/init.c: __init bootmem_init_node()
    arch/avr32/mm/init.c: __init paging_init()
    arch/cris/arch-v10/mm/init.c: __init paging_init()
    arch/cris/arch-v32/mm/init.c: __init paging_init()
    arch/m32r/mm/discontig.c: __init zone_sizes_init()
    arch/m32r/mm/init.c: __init zone_sizes_init()
    arch/m68k/mm/motorola.c: __init paging_init()
    arch/m68k/mm/sun3mmu.c: __init paging_init()
    arch/mips/sgi-ip27/ip27-memory.c: __init paging_init()
    arch/parisc/mm/init.c: __init paging_init()
    arch/sparc/mm/srmmu.c: __init srmmu_paging_init()
    arch/sparc/mm/sun4c.c: __init sun4c_paging_init()
    arch/sparc64/mm/init.c: __init paging_init()
    mm/page_alloc.c: __init free_area_init_nodes()
    mm/page_alloc.c: __init free_area_init()
    and
    mm/memory_hotplug.c: hotadd_new_pgdat()

    hotadd_new_pgdat can not be an __init function, but:

    It is compiled for MEMORY_HOTPLUG configurations only
    MEMORY_HOTPLUG depends on SPARSEMEM || X86_64_ACPI_NUMA
    X86_64_ACPI_NUMA depends on X86_64
    ARCH_FLATMEM_ENABLE depends on X86_32
    ARCH_DISCONTIGMEM_ENABLE depends on X86_32
    So X86_64_ACPI_NUMA implies SPARSEMEM, right?

    So we can mark the stack of functions __init for !SPARSEMEM, but we must mark
    them __meminit for SPARSEMEM configurations. This is ok, because then the
    calls to alloc_bootmem_node are also avoided.

    Compile-tested on:
    silly minimal config
    defconfig x86_32
    defconfig x86_64
    defconfig x86_64 -HIBERNATION +MEMORY_HOTPLUG

    Signed-off-by: Alexander van Heukelum
    Reviewed-by: Sam Ravnborg
    Acked-by: Geert Uytterhoeven
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexander van Heukelum
     

06 Feb, 2008

2 commits

  • The current PageTail semantic is that a PageTail page is first a
    PageCompound page. So remove the redundant PageCompound test in
    set_page_refcounted().

    Signed-off-by: Qi Yong
    Cc: Christoph Lameter
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Qi Yong
     
  • fastcall is always defined to be empty, remove it

    [akpm@linux-foundation.org: coding-style fixes]
    Signed-off-by: Harvey Harrison
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Harvey Harrison
     

17 Oct, 2007

1 commit

  • The statistics patch later needs to know what order a free page is on the free
    lists. Rather than having special knowledge of page_private() when
    PageBuddy() is set, this patch places out page_order() in internal.h and adds
    a VM_BUG_ON to catch using it on non-PageBuddy pages.

    Signed-off-by: Mel Gorman
    Signed-off-by: Christoph Lameter
    Acked-by: Andy Whitcroft
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Mel Gorman
     

08 May, 2007

1 commit

  • If we add a new flag so that we can distinguish between the first page and the
    tail pages then we can avoid to use page->private in the first page.
    page->private == page for the first page, so there is no real information in
    there.

    Freeing up page->private makes the use of compound pages more transparent.
    They become more usable like real pages. Right now we have to be careful f.e.
    if we are going beyond PAGE_SIZE allocations in the slab on i386 because we
    can then no longer use the private field. This is one of the issues that
    cause us not to support debugging for page size slabs in SLAB.

    Having page->private available for SLUB would allow more meta information in
    the page struct. I can probably avoid the 16 bit ints that I have in there
    right now.

    Also if page->private is available then a compound page may be equipped with
    buffer heads. This may free up the way for filesystems to support larger
    blocks than page size.

    We add PageTail as an alias of PageReclaim. Compound pages cannot currently
    be reclaimed. Because of the alias one needs to check PageCompound first.

    The RFC for the this approach was discussed at
    http://marc.info/?t=117574302800001&r=1&w=2

    [nacc@us.ibm.com: fix hugetlbfs]
    Signed-off-by: Christoph Lameter
    Signed-off-by: Nishanth Aravamudan
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Christoph Lameter
     

26 Sep, 2006

1 commit

  • Introduce a VM_BUG_ON, which is turned on with CONFIG_DEBUG_VM. Use this
    in the lightweight, inline refcounting functions; PageLRU and PageActive
    checks in vmscan, because they're pretty well confined to vmscan. And in
    page allocate/free fastpaths which can be the hottest parts of the kernel
    for kbuilds.

    Unlike BUG_ON, VM_BUG_ON must not be used to execute statements with
    side-effects, and should not be used outside core mm code.

    Signed-off-by: Nick Piggin
    Cc: Hugh Dickins
    Cc: Christoph Lameter
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Nick Piggin
     

22 Mar, 2006

3 commits

  • set_page_count usage outside mm/ is limited to setting the refcount to 1.
    Remove set_page_count from outside mm/, and replace those users with
    init_page_count() and set_page_refcounted().

    This allows more debug checking, and tighter control on how code is allowed
    to play around with page->_count.

    Signed-off-by: Nick Piggin
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Nick Piggin
     
  • Now that compound page handling is properly fixed in the VM, move nommu
    over to using compound pages rather than rolling their own refcounting.

    nommu vm page refcounting is broken anyway, but there is no need to have
    divergent code in the core VM now, nor when it gets fixed.

    Signed-off-by: Nick Piggin
    Cc: David Howells

    (Needs testing, please).
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Nick Piggin
     
  • Remove __put_page from outside the core mm/. It is dangerous because it does
    not handle compound pages nicely, and misses 1->0 transitions. If a user
    later appears that really needs the extra speed we can reevaluate.

    Signed-off-by: Nick Piggin
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Nick Piggin
     

07 Jan, 2006

2 commits

  • The attached patch cleans up the way the bootmem allocator frees pages.

    A new function, __free_pages_bootmem(), is provided in mm/page_alloc.c that is
    called from mm/bootmem.c to turn pages over to the main allocator. All the
    bits of code to initialise pages (clearing PG_reserved and setting the page
    count) are moved to here. The checks on page validity are removed, on the
    assumption that the struct page arrays will have been prepared correctly.

    Signed-off-by: David Howells
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Howells
     
  • Inline set_page_refs.

    Signed-off-by: Nick Piggin
    Cc: Hugh Dickins
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Nick Piggin
     

17 Apr, 2005

1 commit

  • Initial git repository build. I'm not bothering with the full history,
    even though we have it. We can create a separate "historical" git
    archive of that later if we want to, and in the meantime it's about
    3.2GB when imported into git - space that would just make the early
    git days unnecessarily complicated, when we don't have a lot of good
    infrastructure for it.

    Let it rip!

    Linus Torvalds