13 Sep, 2013

1 commit

  • MIGRATION must depend on MMU, or allmodconfig for the nommu sh
    architecture fails to build:

    CC mm/migrate.o
    mm/migrate.c: In function 'remove_migration_pte':
    mm/migrate.c:134:3: error: implicit declaration of function 'pmd_trans_huge' [-Werror=implicit-function-declaration]
    if (pmd_trans_huge(*pmd))
    ^
    mm/migrate.c:149:2: error: implicit declaration of function 'is_swap_pte' [-Werror=implicit-function-declaration]
    if (!is_swap_pte(pte))
    ^
    ...

    Also let CMA depend on MMU, or when NOMMU, if we select CMA, it will
    select MIGRATION by force.

    Signed-off-by: Chen Gang
    Reviewed-by: Michal Hocko
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Chen Gang
     

29 Aug, 2013

1 commit


11 Jul, 2013

2 commits

  • zswap is a thin backend for frontswap that takes pages that are in the
    process of being swapped out and attempts to compress them and store
    them in a RAM-based memory pool. This can result in a significant I/O
    reduction on the swap device and, in the case where decompressing from
    RAM is faster than reading from the swap device, can also improve
    workload performance.

    It also has support for evicting swap pages that are currently
    compressed in zswap to the swap device on an LRU(ish) basis. This
    functionality makes zswap a true cache in that, once the cache is full,
    the oldest pages can be moved out of zswap to the swap device so newer
    pages can be compressed and stored in zswap.

    This patch adds the zswap driver to mm/

    Signed-off-by: Seth Jennings
    Acked-by: Rik van Riel
    Cc: Greg Kroah-Hartman
    Cc: Nitin Gupta
    Cc: Minchan Kim
    Cc: Konrad Rzeszutek Wilk
    Cc: Dan Magenheimer
    Cc: Robert Jennings
    Cc: Jenifer Hopper
    Cc: Mel Gorman
    Cc: Johannes Weiner
    Cc: Larry Woodman
    Cc: Benjamin Herrenschmidt
    Cc: Dave Hansen
    Cc: Joe Perches
    Cc: Joonsoo Kim
    Cc: Cody P Schafer
    Cc: Hugh Dickens
    Cc: Paul Mackerras
    Cc: Fengguang Wu
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Seth Jennings
     
  • zbud is an special purpose allocator for storing compressed pages. It
    is designed to store up to two compressed pages per physical page.
    While this design limits storage density, it has simple and
    deterministic reclaim properties that make it preferable to a higher
    density approach when reclaim will be used.

    zbud works by storing compressed pages, or "zpages", together in pairs
    in a single memory page called a "zbud page". The first buddy is "left
    justifed" at the beginning of the zbud page, and the last buddy is
    "right justified" at the end of the zbud page. The benefit is that if
    either buddy is freed, the freed buddy space, coalesced with whatever
    slack space that existed between the buddies, results in the largest
    possible free region within the zbud page.

    zbud also provides an attractive lower bound on density. The ratio of
    zpages to zbud pages can not be less than 1. This ensures that zbud can
    never "do harm" by using more pages to store zpages than the
    uncompressed zpages would have used on their own.

    This implementation is a rewrite of the zbud allocator internally used
    by zcache in the driver/staging tree. The rewrite was necessary to
    remove some of the zcache specific elements that were ingrained
    throughout and provide a generic allocation interface that can later be
    used by zsmalloc and others.

    This patch adds zbud to mm/ for later use by zswap.

    Signed-off-by: Seth Jennings
    Acked-by: Rik van Riel
    Cc: Greg Kroah-Hartman
    Cc: Nitin Gupta
    Cc: Minchan Kim
    Cc: Konrad Rzeszutek Wilk
    Cc: Dan Magenheimer
    Cc: Robert Jennings
    Cc: Jenifer Hopper
    Cc: Mel Gorman
    Cc: Johannes Weiner
    Cc: Larry Woodman
    Cc: Benjamin Herrenschmidt
    Cc: Dave Hansen
    Cc: Joe Perches
    Cc: Joonsoo Kim
    Cc: Cody P Schafer
    Cc: Hugh Dickens
    Cc: Paul Mackerras
    Cc: Bob Liu
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Seth Jennings
     

08 Jul, 2013

1 commit


04 Jul, 2013

1 commit

  • The soft-dirty is a bit on a PTE which helps to track which pages a task
    writes to. In order to do this tracking one should

    1. Clear soft-dirty bits from PTEs ("echo 4 > /proc/PID/clear_refs)
    2. Wait some time.
    3. Read soft-dirty bits (55'th in /proc/PID/pagemap2 entries)

    To do this tracking, the writable bit is cleared from PTEs when the
    soft-dirty bit is. Thus, after this, when the task tries to modify a
    page at some virtual address the #PF occurs and the kernel sets the
    soft-dirty bit on the respective PTE.

    Note, that although all the task's address space is marked as r/o after
    the soft-dirty bits clear, the #PF-s that occur after that are processed
    fast. This is so, since the pages are still mapped to physical memory,
    and thus all the kernel does is finds this fact out and puts back
    writable, dirty and soft-dirty bits on the PTE.

    Another thing to note, is that when mremap moves PTEs they are marked
    with soft-dirty as well, since from the user perspective mremap modifies
    the virtual memory at mremap's new address.

    Signed-off-by: Pavel Emelyanov
    Cc: Matt Mackall
    Cc: Xiao Guangrong
    Cc: Glauber Costa
    Cc: Marcelo Tosatti
    Cc: KOSAKI Motohiro
    Cc: Stephen Rothwell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Pavel Emelyanov
     

02 Jul, 2013

1 commit

  • We want to use CMA for allocating hash page table and real mode area for
    PPC64. Hence move DMA contiguous related changes into a seperate config
    so that ppc64 can enable CMA without requiring DMA contiguous.

    Acked-by: Michal Nazarewicz
    Acked-by: Paul Mackerras
    Signed-off-by: Aneesh Kumar K.V
    [removed defconfig changes]
    Signed-off-by: Marek Szyprowski

    Aneesh Kumar K.V
     

04 Jun, 2013

1 commit

  • Ever since commit 45f035ab9b8f ("CONFIG_HOTPLUG should be always on"),
    it has been basically impossible to build a kernel with CONFIG_HOTPLUG
    turned off. Remove all the remaining references to it.

    Cc: Russell King
    Cc: Doug Thompson
    Cc: Bjorn Helgaas
    Cc: Steven Whitehouse
    Cc: Arnd Bergmann
    Cc: Pavel Machek
    Cc: "Rafael J. Wysocki"
    Cc: Andrew Morton
    Signed-off-by: Stephen Rothwell
    Acked-by: Mauro Carvalho Chehab
    Acked-by: Hans Verkuil
    Signed-off-by: Greg Kroah-Hartman

    Stephen Rothwell
     

30 Apr, 2013

1 commit

  • There are times when HIGHMEM is enabled, but we don't prefer
    CONFIG_BOUNCE to be enabled. CONFIG_BOUNCE can reduce the block device
    throughput, and this is not ideal for machines where we don't gain much
    by enabling it. So provide an option to deselect CONFIG_BOUNCE. The
    observation was made while measuring eMMC throughput using iozone on an
    ARM device with 1GB RAM.

    Signed-off-by: Vinayak Menon
    Cc: David Rientjes
    Cc: Jens Axboe
    Cc: Randy Dunlap
    Cc: Russell King
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Vinayak Menon
     

13 Mar, 2013

1 commit

  • In commit 887cbce0adea ("arch Kconfig: centralise ARCH_NO_VIRT_TO_BUS")
    I introduced the config sybmol HAVE_VIRT_TO_BUS and selected that where
    needed. I am not sure what I was thinking. Instead, just directly
    select VIRT_TO_BUS where it is needed.

    Signed-off-by: Stephen Rothwell
    Signed-off-by: Linus Torvalds

    Stephen Rothwell
     

28 Feb, 2013

1 commit

  • Change it to CONFIG_HAVE_VIRT_TO_BUS and set it in all architecures
    that already provide virt_to_bus().

    Signed-off-by: Stephen Rothwell
    Reviewed-by: James Hogan
    Cc: Bjorn Helgaas
    Cc: H Hartley Sweeten
    Cc: Benjamin Herrenschmidt
    Cc: Paul Mackerras
    Cc: "David S. Miller"
    Cc: Paul Mundt
    Cc: Vineet Gupta
    Cc: James Bottomley
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Stephen Rothwell
     

24 Feb, 2013

1 commit

  • For removing memmap region of sparse-vmemmap which is allocated bootmem,
    memmap region of sparse-vmemmap needs to be registered by
    get_page_bootmem(). So the patch searches pages of virtual mapping and
    registers the pages by get_page_bootmem().

    NOTE: register_page_bootmem_memmap() is not implemented for ia64,
    ppc, s390, and sparc. So introduce CONFIG_HAVE_BOOTMEM_INFO_NODE
    and revert register_page_bootmem_info_node() when platform doesn't
    support it.

    It's implemented by adding a new Kconfig option named
    CONFIG_HAVE_BOOTMEM_INFO_NODE, which will be automatically selected
    by memory-hotplug feature fully supported archs(currently only on
    x86_64).

    Since we have 2 config options called MEMORY_HOTPLUG and
    MEMORY_HOTREMOVE used for memory hot-add and hot-remove separately,
    and codes in function register_page_bootmem_info_node() are only
    used for collecting infomation for hot-remove, so reside it under
    MEMORY_HOTREMOVE.

    Besides page_isolation.c selected by MEMORY_ISOLATION under
    MEMORY_HOTPLUG is also such case, move it too.

    [mhocko@suse.cz: put register_page_bootmem_memmap inside CONFIG_MEMORY_HOTPLUG_SPARSE]
    [linfeng@cn.fujitsu.com: introduce CONFIG_HAVE_BOOTMEM_INFO_NODE and revert register_page_bootmem_info_node()]
    [mhocko@suse.cz: remove the arch specific functions without any implementation]
    [linfeng@cn.fujitsu.com: mm/Kconfig: move auto selects from MEMORY_HOTPLUG to MEMORY_HOTREMOVE as needed]
    [rientjes@google.com: fix defined but not used warning]
    Signed-off-by: Wen Congyang
    Signed-off-by: Yasuaki Ishimatsu
    Signed-off-by: Tang Chen
    Reviewed-by: Wu Jianguo
    Cc: KOSAKI Motohiro
    Cc: Jiang Liu
    Cc: Jianguo Wu
    Cc: Kamezawa Hiroyuki
    Cc: Lai Jiangshan
    Cc: Ingo Molnar
    Cc: Thomas Gleixner
    Cc: "H. Peter Anvin"
    Signed-off-by: Michal Hocko
    Signed-off-by: Lin Feng
    Signed-off-by: David Rientjes
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Yasuaki Ishimatsu
     

22 Feb, 2013

2 commits

  • Merge misc patches from Andrew Morton:

    - Florian has vanished so I appear to have become fbdev maintainer
    again :(

    - Joel and Mark are distracted to welcome to the new OCFS2 maintainer

    - The backlight queue

    - Small core kernel changes

    - lib/ updates

    - The rtc queue

    - Various random bits

    * akpm: (164 commits)
    rtc: rtc-davinci: use devm_*() functions
    rtc: rtc-max8997: use devm_request_threaded_irq()
    rtc: rtc-max8907: use devm_request_threaded_irq()
    rtc: rtc-da9052: use devm_request_threaded_irq()
    rtc: rtc-wm831x: use devm_request_threaded_irq()
    rtc: rtc-tps80031: use devm_request_threaded_irq()
    rtc: rtc-lp8788: use devm_request_threaded_irq()
    rtc: rtc-coh901331: use devm_clk_get()
    rtc: rtc-vt8500: use devm_*() functions
    rtc: rtc-tps6586x: use devm_request_threaded_irq()
    rtc: rtc-imxdi: use devm_clk_get()
    rtc: rtc-cmos: use dev_warn()/dev_dbg() instead of printk()/pr_debug()
    rtc: rtc-pcf8583: use dev_warn() instead of printk()
    rtc: rtc-sun4v: use pr_warn() instead of printk()
    rtc: rtc-vr41xx: use dev_info() instead of printk()
    rtc: rtc-rs5c313: use pr_err() instead of printk()
    rtc: rtc-at91rm9200: use dev_dbg()/dev_err() instead of printk()/pr_debug()
    rtc: rtc-rs5c372: use dev_dbg()/dev_warn() instead of printk()/pr_debug()
    rtc: rtc-ds2404: use dev_err() instead of printk()
    rtc: rtc-efi: use dev_err()/dev_warn()/pr_err() instead of printk()
    ...

    Linus Torvalds
     
  • This provides a band-aid to provide stable page writes on jbd without
    needing to backport the fixed locking and page writeback bit handling
    schemes of jbd2. The band-aid works by using bounce buffers to snapshot
    page contents instead of waiting.

    For those wondering about the ext3 bandage -- fixing the jbd locking
    (which was done as part of ext4dev years ago) is a lot of surgery, and
    setting PG_writeback on data pages when we actually hold the page lock
    dropped ext3 performance by nearly an order of magnitude. If we're
    going to migrate iscsi and raid to use stable page writes, the
    complaints about high latency will likely return. We might as well
    centralize their page snapshotting thing to one place.

    Signed-off-by: Darrick J. Wong
    Tested-by: Andy Lutomirski
    Cc: Adrian Hunter
    Cc: Artem Bityutskiy
    Reviewed-by: Jan Kara
    Cc: Joel Becker
    Cc: Mark Fasheh
    Cc: Steven Whitehouse
    Cc: Jens Axboe
    Cc: Eric Van Hensbergen
    Cc: Ron Minnich
    Cc: Latchesar Ionkov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Darrick J. Wong
     

18 Jan, 2013

1 commit

  • The CONFIG_EXPERIMENTAL config item has not carried much meaning for a
    while now and is almost always enabled by default. As agreed during the
    Linux kernel summit, remove it from any "depends on" lines in Kconfigs.

    CC: Andrew Morton
    CC: KAMEZAWA Hiroyuki
    CC: Jan Beulich
    CC: Mel Gorman
    CC: Seth Jennings
    Acked-by: David Rientjes
    Signed-off-by: Kees Cook
    Signed-off-by: Greg Kroah-Hartman

    Kees Cook
     

19 Dec, 2012

1 commit

  • Add help info for CONFIG_MOVABLE_NODE and permit its selection.

    This option allows the user to online all memory of a node as movable
    memory. So that the whole node can be hotplugged. Users who don't use
    the hotplug feature are also fine with this option on since they won't
    online memory as movable.

    Signed-off-by: Tang Chen
    Reviewed-by: Yasuaki Ishimatsu
    Cc: Lai Jiangshan
    Cc: Wen Congyang
    Cc: Ingo Molnar
    [akpm@linux-foundation.org: tweak help text]
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Tang Chen
     

14 Dec, 2012

1 commit

  • Merge misc VM changes from Andrew Morton:
    "The rest of most-of-MM. The other MM bits await a slab merge.

    This patch includes the addition of a huge zero_page. Not a
    performance boost but it an save large amounts of physical memory in
    some situations.

    Also a bunch of Fujitsu engineers are working on memory hotplug.
    Which, as it turns out, was badly broken. About half of their patches
    are included here; the remainder are 3.8 material."

    However, this merge disables CONFIG_MOVABLE_NODE, which was totally
    broken. We don't add new features with "default y", nor do we add
    Kconfig questions that are incomprehensible to most people without any
    help text. Does the feature even make sense without compaction or
    memory hotplug?

    * akpm: (54 commits)
    mm/bootmem.c: remove unused wrapper function reserve_bootmem_generic()
    mm/memory.c: remove unused code from do_wp_page()
    asm-generic, mm: pgtable: consolidate zero page helpers
    mm/hugetlb.c: fix warning on freeing hwpoisoned hugepage
    hwpoison, hugetlbfs: fix RSS-counter warning
    hwpoison, hugetlbfs: fix "bad pmd" warning in unmapping hwpoisoned hugepage
    mm: protect against concurrent vma expansion
    memcg: do not check for mm in __mem_cgroup_count_vm_event
    tmpfs: support SEEK_DATA and SEEK_HOLE (reprise)
    mm: provide more accurate estimation of pages occupied by memmap
    fs/buffer.c: remove redundant initialization in alloc_page_buffers()
    fs/buffer.c: do not inline exported function
    writeback: fix a typo in comment
    mm: introduce new field "managed_pages" to struct zone
    mm, oom: remove statically defined arch functions of same name
    mm, oom: remove redundant sleep in pagefault oom handler
    mm, oom: cleanup pagefault oom handler
    memory_hotplug: allow online/offline memory to result movable node
    numa: add CONFIG_MOVABLE_NODE for movable-dedicated node
    mm, memcg: avoid unnecessary function call when memcg is disabled
    ...

    Linus Torvalds
     

13 Dec, 2012

1 commit

  • We need a node which only contains movable memory. This feature is very
    important for node hotplug. If a node has normal/highmem, the memory may
    be used by the kernel and can't be offlined. If the node only contains
    movable memory, we can offline the memory and the node.

    All are prepared, we can actually introduce N_MEMORY.
    add CONFIG_MOVABLE_NODE make we can use it for movable-dedicated node

    [akpm@linux-foundation.org: fix Kconfig text]
    Signed-off-by: Lai Jiangshan
    Tested-by: Yasuaki Ishimatsu
    Signed-off-by: Wen Congyang
    Cc: Jiang Liu
    Cc: KOSAKI Motohiro
    Cc: Minchan Kim
    Cc: Mel Gorman
    Cc: David Rientjes
    Cc: Yinghai Lu
    Cc: Rusty Russell
    Cc: Greg KH
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Lai Jiangshan
     

12 Dec, 2012

1 commit

  • Memory fragmentation introduced by ballooning might reduce significantly
    the number of 2MB contiguous memory blocks that can be used within a guest,
    thus imposing performance penalties associated with the reduced number of
    transparent huge pages that could be used by the guest workload.

    This patch introduces a common interface to help a balloon driver on
    making its page set movable to compaction, and thus allowing the system
    to better leverage the compation efforts on memory defragmentation.

    [akpm@linux-foundation.org: use PAGE_FLAGS_CHECK_AT_PREP, s/__balloon_page_flags/page_flags_cleared/, small cleanups]
    [rientjes@google.com: allow balloon compaction for any system with memory compaction enabled, which is the defconfig]
    Signed-off-by: Rafael Aquini
    Acked-by: Mel Gorman
    Cc: Rusty Russell
    Cc: "Michael S. Tsirkin"
    Cc: Rik van Riel
    Cc: Andi Kleen
    Cc: Konrad Rzeszutek Wilk
    Cc: Minchan Kim
    Signed-off-by: David Rientjes
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Rafael Aquini
     

09 Oct, 2012

2 commits

  • Now that lumpy reclaim has been removed, compaction is the only way left
    to free up contiguous memory areas. It is time to just enable
    CONFIG_COMPACTION by default.

    Signed-off-by: Rik van Riel
    Cc: Mel Gorman
    Acked-by: Rafael Aquini
    Acked-by: Johannes Weiner
    Acked-by: Minchan Kim
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Rik van Riel
     
  • Cleanup patch in preparation for transparent hugepage support on s390.
    Adding new architectures to the TRANSPARENT_HUGEPAGE config option can
    make the "depends" line rather ugly, like "depends on (X86 || (S390 &&
    64BIT)) && MMU".

    This patch adds a HAVE_ARCH_TRANSPARENT_HUGEPAGE instead. x86 already has
    MMU "def_bool y", so the MMU check is superfluous there and
    HAVE_ARCH_TRANSPARENT_HUGEPAGE can be selected in arch/x86/Kconfig.

    Signed-off-by: Gerald Schaefer
    Cc: Ingo Molnar
    Cc: Thomas Gleixner
    Cc: "H. Peter Anvin"
    Cc: Andrea Arcangeli
    Cc: Andi Kleen
    Cc: Hugh Dickins
    Cc: Hillf Danton
    Cc: Martin Schwidefsky
    Cc: Heiko Carstens
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Gerald Schaefer
     

01 Aug, 2012

1 commit

  • mm/page_alloc.c has some memory isolation functions but they are used only
    when we enable CONFIG_{CMA|MEMORY_HOTPLUG|MEMORY_FAILURE}. So let's make
    it configurable by new CONFIG_MEMORY_ISOLATION so that it can reduce
    binary size and we can check it simple by CONFIG_MEMORY_ISOLATION, not if
    defined CONFIG_{CMA|MEMORY_HOTPLUG|MEMORY_FAILURE}.

    Signed-off-by: Minchan Kim
    Cc: Andi Kleen
    Cc: Marek Szyprowski
    Acked-by: KAMEZAWA Hiroyuki
    Cc: KOSAKI Motohiro
    Cc: Mel Gorman
    Cc: Michal Hocko
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Minchan Kim
     

05 Jun, 2012

1 commit

  • Pull frontswap feature from Konrad Rzeszutek Wilk:
    "Frontswap provides a "transcendent memory" interface for swap pages.
    In some environments, dramatic performance savings may be obtained
    because swapped pages are saved in RAM (or a RAM-like device) instead
    of a swap disk. This tag provides the basic infrastructure along with
    some changes to the existing backends."

    Fix up trivial conflict in mm/Makefile due to removal of swap token code
    changing a line next to the new frontswap entry.

    This pull request came in before the merge window even opened, it got
    delayed to after the merge window by me just wanting to make sure it had
    actual users. Apparently IBM is using this on their embedded side, and
    Jan Beulich says that it's already made available for SLES and OpenSUSE
    users.

    Also acked by Rik van Riel, and Konrad points to other people liking it
    too. So in it goes.

    By Dan Magenheimer (4) and Konrad Rzeszutek Wilk (2)
    via Konrad Rzeszutek Wilk
    * tag 'stable/frontswap.v16-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/mm:
    frontswap: s/put_page/store/g s/get_page/load
    MAINTAINER: Add myself for the frontswap API
    mm: frontswap: config and doc files
    mm: frontswap: core frontswap functionality
    mm: frontswap: core swap subsystem hooks and headers
    mm: frontswap: add frontswap header file

    Linus Torvalds
     

30 May, 2012

1 commit


21 May, 2012

1 commit

  • The MIGRATE_CMA migration type has two main characteristics:
    (i) only movable pages can be allocated from MIGRATE_CMA
    pageblocks and (ii) page allocator will never change migration
    type of MIGRATE_CMA pageblocks.

    This guarantees (to some degree) that page in a MIGRATE_CMA page
    block can always be migrated somewhere else (unless there's no
    memory left in the system).

    It is designed to be used for allocating big chunks (eg. 10MiB)
    of physically contiguous memory. Once driver requests
    contiguous memory, pages from MIGRATE_CMA pageblocks may be
    migrated away to create a contiguous block.

    To minimise number of migrations, MIGRATE_CMA migration type
    is the last type tried when page allocator falls back to other
    migration types when requested.

    Signed-off-by: Michal Nazarewicz
    Signed-off-by: Marek Szyprowski
    Signed-off-by: Kyungmin Park
    Acked-by: Mel Gorman
    Reviewed-by: KAMEZAWA Hiroyuki
    Tested-by: Rob Clark
    Tested-by: Ohad Ben-Cohen
    Tested-by: Benjamin Gaignard
    Tested-by: Robert Nelson
    Tested-by: Barry Song

    Michal Nazarewicz
     

15 May, 2012

1 commit

  • This patch 4of4 adds configuration and documentation files including a FAQ.

    [v14: updated docs/FAQ to use zcache and RAMster as examples]
    [v10: no change]
    [v9: akpm@linux-foundation.org: sysfs->debugfs; no longer need Doc/ABI file]
    [v8: rebase to 3.0-rc4]
    [v7: rebase to 3.0-rc3]
    [v6: rebase to 3.0-rc1]
    [v5: change config default to n]
    [v4: rebase to 2.6.39]
    Signed-off-by: Dan Magenheimer
    Acked-by: Jan Beulich
    Acked-by: Seth Jennings
    Cc: Jeremy Fitzhardinge
    Cc: Hugh Dickins
    Cc: Johannes Weiner
    Cc: Nitin Gupta
    Cc: Matthew Wilcox
    Cc: Chris Mason
    Cc: Rik Riel
    Cc: Andrew Morton
    Signed-off-by: Konrad Rzeszutek Wilk

    Dan Magenheimer
     

29 Nov, 2011

1 commit

  • Conflicts & resolutions:

    * arch/x86/xen/setup.c

    dc91c728fd "xen: allow extra memory to be in multiple regions"
    24aa07882b "memblock, x86: Replace memblock_x86_reserve/free..."

    conflicted on xen_add_extra_mem() updates. The resolution is
    trivial as the latter just want to replace
    memblock_x86_reserve_range() with memblock_reserve().

    * drivers/pci/intel-iommu.c

    166e9278a3f "x86/ia64: intel-iommu: move to drivers/iommu/"
    5dfe8660a3d "bootmem: Replace work_with_active_regions() with..."

    conflicted as the former moved the file under drivers/iommu/.
    Resolved by applying the chnages from the latter on the moved
    file.

    * mm/Kconfig

    6661672053a "memblock: add NO_BOOTMEM config symbol"
    c378ddd53f9 "memblock, x86: Make ARCH_DISCARD_MEMBLOCK a config option"

    conflicted trivially. Both added config options. Just
    letting both add their own options resolves the conflict.

    * mm/memblock.c

    d1f0ece6cdc "mm/memblock.c: small function definition fixes"
    ed7b56a799c "memblock: Remove memblock_memory_can_coalesce()"

    confliected. The former updates function removed by the
    latter. Resolution is trivial.

    Signed-off-by: Tejun Heo

    Tejun Heo
     

01 Nov, 2011

1 commit

  • With the NO_BOOTMEM symbol added architectures may now use the following
    syntax to tell that they do not need bootmem:

    select NO_BOOTMEM

    This is much more convinient than adding a new kconfig symbol which was
    otherwise required.

    Adding this symbol does not conflict with the architctures that already
    define their own symbol.

    Signed-off-by: Sam Ravnborg
    Cc: Yinghai Lu
    Acked-by: Tejun Heo
    Cc: "H. Peter Anvin"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Sam Ravnborg
     

15 Jul, 2011

2 commits

  • From 6839454ae63f1eb21e515c10229ca95c22955fec Mon Sep 17 00:00:00 2001
    From: Tejun Heo
    Date: Thu, 14 Jul 2011 11:22:17 +0200

    Make ARCH_DISCARD_MEMBLOCK a config option so that it can be handled
    together with other MEMBLOCK options.

    Signed-off-by: Tejun Heo
    Link: http://lkml.kernel.org/r/20110714094603.GH3455@htj.dyndns.org
    Cc: Yinghai Lu
    Cc: Benjamin Herrenschmidt
    Cc: Thomas Gleixner
    Cc: Ingo Molnar
    Cc: "H. Peter Anvin"
    Signed-off-by: H. Peter Anvin

    Tejun Heo
     
  • From 83103b92f3234ec830852bbc5c45911bd6cbdb20 Mon Sep 17 00:00:00 2001
    From: Tejun Heo
    Date: Thu, 14 Jul 2011 11:22:16 +0200

    Add optional region->nid which can be enabled by arch using
    CONFIG_HAVE_MEMBLOCK_NODE_MAP. When enabled, memblock also carries
    NUMA node information and replaces early_node_map[].

    Newly added memblocks have MAX_NUMNODES as nid. Arch can then call
    memblock_set_node() to set node information. memblock takes care of
    merging and node affine allocations w.r.t. node information.

    When MEMBLOCK_NODE_MAP is enabled, early_node_map[], related data
    structures and functions to manipulate and iterate it are disabled.
    memblock version of __next_mem_pfn_range() is provided such that
    for_each_mem_pfn_range() behaves the same and its users don't have to
    be updated.

    -v2: Yinghai spotted section mismatch caused by missing
    __init_memblock in memblock_set_node(). Fixed.

    Signed-off-by: Tejun Heo
    Link: http://lkml.kernel.org/r/20110714094342.GF3455@htj.dyndns.org
    Cc: Yinghai Lu
    Cc: Benjamin Herrenschmidt
    Signed-off-by: H. Peter Anvin

    Tejun Heo
     

10 Jun, 2011

1 commit


27 May, 2011

1 commit

  • This third patch of eight in this cleancache series provides
    the core code for cleancache that interfaces between the hooks in
    VFS and individual filesystems and a cleancache backend. It also
    includes build and config patches.

    Two new files are added: mm/cleancache.c and include/linux/cleancache.h.

    Note that CONFIG_CLEANCACHE can default to on; in systems that do
    not provide a cleancache backend, all hooks devolve to a simple
    check of a global enable flag, so performance impact should
    be negligible but can be reduced to zero impact if config'ed off.
    However for this first commit, it defaults to off.

    Details and a FAQ can be found in Documentation/vm/cleancache.txt

    Credits: Cleancache_ops design derived from Jeremy Fitzhardinge
    design for tmem

    [v8: dan.magenheimer@oracle.com: fix exportfs call affecting btrfs]
    [v8: akpm@linux-foundation.org: use static inline function, not macro]
    [v7: dan.magenheimer@oracle.com: cleanup sysfs and remove cleancache prefix]
    [v6: JBeulich@novell.com: robustly handle buggy fs encode_fh actor definition]
    [v5: jeremy@goop.org: clean up global usage and static var names]
    [v5: jeremy@goop.org: simplify init hook and any future fs init changes]
    [v5: hch@infradead.org: cleaner non-global interface for ops registration]
    [v4: adilger@sun.com: interface must support exportfs FS's]
    [v4: hch@infradead.org: interface must support 64-bit FS on 32-bit kernel]
    [v3: akpm@linux-foundation.org: use one ops struct to avoid pointer hops]
    [v3: akpm@linux-foundation.org: document and ensure PageLocked reqts are met]
    [v3: ngupta@vflare.org: fix success/fail codes, change funcs to void]
    [v2: viro@ZenIV.linux.org.uk: use sane types]
    Signed-off-by: Dan Magenheimer
    Reviewed-by: Jeremy Fitzhardinge
    Reviewed-by: Konrad Rzeszutek Wilk
    Acked-by: Al Viro
    Acked-by: Andrew Morton
    Acked-by: Nitin Gupta
    Acked-by: Minchan Kim
    Acked-by: Andreas Dilger
    Acked-by: Jan Beulich
    Cc: Matthew Wilcox
    Cc: Nick Piggin
    Cc: Mel Gorman
    Cc: Rik Van Riel
    Cc: Chris Mason
    Cc: Ted Ts'o
    Cc: Mark Fasheh
    Cc: Joel Becker

    Dan Magenheimer
     

26 Jan, 2011

1 commit

  • Commit 5d6892407 ("thp: select CONFIG_COMPACTION if TRANSPARENT_HUGEPAGE
    enabled") causes this warning during the configuration process:

    warning: (TRANSPARENT_HUGEPAGE) selects COMPACTION which has unmet
    direct dependencies (EXPERIMENTAL && HUGETLB_PAGE && MMU)

    COMPACTION doesn't depend on HUGETLB_PAGE, it doesn't depend on THP
    either, it is also useful for regular alloc_pages(order > 0) including
    the very kernel stack during fork (THREAD_ORDER = 1). It's always
    better to enable COMPACTION.

    The warning should be an error because we would end up with MIGRATION
    not selected, and COMPACTION wouldn't work without migration (despite it
    seems to build with an inline migrate_pages returning -ENOSYS).

    I'd also like to remove EXPERIMENTAL: compaction has been in the kernel
    for some releases (for full safety the default remains disabled which I
    think is enough).

    Signed-off-by: Andrea Arcangeli
    Reported-by: Luca Tettamanti
    Tested-by: Luca Tettamanti
    Cc: Mel Gorman
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrea Arcangeli
     

14 Jan, 2011

4 commits

  • With transparent hugepage support we need compaction for the "defrag"
    sysfs controls to be effective.

    At the moment THP hangs the system if COMPACTION isn't selected, as
    without COMPACTION lumpy reclaim wouldn't be entirely disabled. So at the
    moment it's not orthogonal. When lumpy will be removed from the VM I can
    remove the select COMPACTION in theory, but then 99% of THP users would be
    still doing a mistake in disabling compaction, even if the mistake won't
    return in fatal runtime but just slightly degraded performance. So from a
    theoretical standpoing forcing the below select is not needed (the
    dependency isn't strict nor at compile time nor at runtime) but from a
    practical standpoint it is safer.

    If anybody really wants THP to run without compaction, it'd be such a
    weird setup that editing the Kconfig file to allow it will be surely not a
    problem.

    Signed-off-by: Andrea Arcangeli
    Acked-by: Mel Gorman
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrea Arcangeli
     
  • Allow to choose between the always|madvise default for page faults and
    khugepaged at config time. madvise guarantees zero risk of higher memory
    footprint for applications (applications using madvise(MADV_HUGEPAGE)
    won't risk to use any more memory by backing their virtual regions with
    hugepages).

    Initially set the default to N and don't depend on EMBEDDED.

    Signed-off-by: Andrea Arcangeli
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrea Arcangeli
     
  • Add support for transparent hugepages to x86 32bit.

    Share the same VM_ bitflag for VM_MAPPED_COPY. mm/nommu.c will never
    support transparent hugepages.

    Signed-off-by: Johannes Weiner
    Signed-off-by: Andrea Arcangeli
    Reviewed-by: Rik van Riel
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Johannes Weiner
     
  • Add config option.

    Signed-off-by: Andrea Arcangeli
    Acked-by: Rik van Riel
    Acked-by: Mel Gorman
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrea Arcangeli
     

23 Oct, 2010

1 commit

  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu:
    percpu: update comments to reflect that percpu allocations are always zero-filled
    percpu: Optimize __get_cpu_var()
    x86, percpu: Optimize this_cpu_ptr
    percpu: clear memory allocated with the km allocator
    percpu: fix build breakage on s390 and cleanup build configuration tests
    percpu: use percpu allocator on UP too
    percpu: reduce PCPU_MIN_UNIT_SIZE to 32k
    vmalloc: pcpu_get/free_vm_areas() aren't needed on UP

    Fixed up trivial conflicts in include/linux/percpu.h

    Linus Torvalds
     

10 Sep, 2010

1 commit

  • COMPACTION enables MIGRATION, but MIGRATION spawns a warning if numa or
    memhotplug aren't selected. However MIGRATION doesn't depend on them. I
    guess it's just trying to be strict doing a double check on who's enabling
    it, but it doesn't know that compaction also enables MIGRATION.

    Signed-off-by: Andrea Arcangeli
    Acked-by: Mel Gorman
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrea Arcangeli
     

08 Sep, 2010

1 commit

  • On UP, percpu allocations were redirected to kmalloc. This has the
    following problems.

    * For certain amount of allocations (determined by
    PERCPU_DYNAMIC_EARLY_SLOTS and PERCPU_DYNAMIC_EARLY_SIZE), percpu
    allocator can be used before the usual kernel memory allocator is
    brought online. On SMP, this is used to initialize the kernel
    memory allocator.

    * percpu allocator honors alignment upto PAGE_SIZE but kmalloc()
    doesn't. For example, workqueue makes use of larger alignments for
    cpu_workqueues.

    Currently, users of percpu allocators need to handle UP differently,
    which is somewhat fragile and ugly. Other than small amount of
    memory, there isn't much to lose by enabling percpu allocator on UP.
    It can simply use kernel memory based chunk allocation which was added
    for SMP archs w/o MMUs.

    This patch removes mm/percpu_up.c, builds mm/percpu.c on UP too and
    makes UP build use percpu-km. As percpu addresses and kernel
    addresses are always identity mapped and static percpu variables don't
    need any special treatment, nothing is arch dependent and mm/percpu.c
    implements generic setup_per_cpu_areas() for UP.

    Signed-off-by: Tejun Heo
    Reviewed-by: Christoph Lameter
    Acked-by: Pekka Enberg

    Tejun Heo