aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2013-07-03mm: memcontrol: factor out reclaim iterator loading and updatingJohannes Weiner1-29/+57
mem_cgroup_iter() is too hard to follow. Factor out the lockless reclaim iterator loading and updating so it's easier to follow the big picture. Also document the iterator invalidation mechanism a bit more extensively. Signed-off-by: Johannes Weiner <[email protected]> Reported-by: Tejun Heo <[email protected]> Reviewed-by: Tejun Heo <[email protected]> Acked-by: Michal Hocko <[email protected]> Cc: KAMEZAWA Hiroyuki <[email protected]> Cc: Glauber Costa <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-07-03mm, vmalloc: use clamp() to simplify codeZhang Yanfei1-10/+2
Signed-off-by: Zhang Yanfei <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-07-03mm, vmalloc: remove insert_vmalloc_vm()Zhang Yanfei1-7/+0
Now this function is nowhere used, we can remove it directly. Signed-off-by: Zhang Yanfei <[email protected]> Acked-by: Joonsoo Kim <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-07-03mm, vmalloc: call setup_vmalloc_vm() instead of insert_vmalloc_vm()Zhang Yanfei1-2/+2
Here we pass flags with only VM_ALLOC bit set, it is unnecessary to call clear_vm_unlist to clear VM_UNLIST bit. So use setup_vmalloc_vm instead of insert_vmalloc_vm. Signed-off-by: Zhang Yanfei <[email protected]> Acked-by: Joonsoo Kim <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-07-03mm, vmalloc: only call setup_vmalloc_vm() only in __get_vm_area_node()Zhang Yanfei1-10/+1
Now for insert_vmalloc_vm, it only calls the two functions: - setup_vmalloc_vm: fill vm_struct and vmap_area instances - clear_vm_unlist: clear VM_UNLIST bit in vm_struct->flags So in __get_vm_area_node(), if VM_UNLIST bit unset in flags, that is the else branch here, we don't need to clear VM_UNLIST bit for vm->flags since this bit is obviously not set. That is to say, we could only call setup_vmalloc_vm instead of insert_vmalloc_vm here. And then we could even remove the if test here. Signed-off-by: Zhang Yanfei <[email protected]> Acked-by: Joonsoo Kim <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-07-03documentation: document the is_dirty_writeback aops callbackMel Gorman1-0/+10
Signed-off-by: Mel Gorman <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-07-03documentation: update address_space_operationsMel Gorman1-8/+7
The documentation for address_space_operations is partially out of date. Signed-off-by: Mel Gorman <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-07-03sparsemem: add BUILD_BUG_ON when sizeof mem_section is non-power-of-2Cody P Schafer2-0/+7
Instead of leaving a hidden trap for the next person who comes along and wants to add something to mem_section, add a big fat warning about it needing to be a power-of-2, and insert a BUILD_BUG_ON() in sparse_init() to catch mistakes. Right now non-power-of-2 mem_sections cause a number of WARNs at boot (which don't clearly point to the size of mem_section as an issue), but the system limps on (temporarily, at least). This is based upon Dave Hansen's earlier RFC where he ran into the same issue: "sparsemem: fix boot when SECTIONS_PER_ROOT is not power-of-2" http://lkml.indiana.edu/hypermail/linux/kernel/1205.2/03077.html Signed-off-by: Cody P Schafer <[email protected]> Acked-by: Dave Hansen <[email protected]> Cc: Jiang Liu <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-07-03mm/unicore32: fix stale comment about VALID_PAGE()Jiang Liu1-6/+0
VALID_PAGE() has been removed from kernel long time ago, so fix the comment. Signed-off-by: Jiang Liu <[email protected]> Acked-by: Guan Xuetao <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-07-03mm/microblaze: clean up unused VALID_PAGE()Jiang Liu1-1/+0
VALID_PAGE() has been removed from kernel long time ago, so clean up it. Signed-off-by: Jiang Liu <[email protected]> Cc: Michal Simek <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-07-03mm/CRIS: clean up unused VALID_PAGE()Jiang Liu1-1/+0
VALID_PAGE() has been removed from kernel long time ago, so clean up it. Signed-off-by: Jiang Liu <[email protected]> Acked-by: Jesper Nilsson <[email protected]> Cc: Mikael Starvik <[email protected]> Cc: Jiang Liu <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-07-03mm/ARM: fix stale comment about VALID_PAGE()Jiang Liu1-6/+0
VALID_PAGE() has been removed from kernel long time ago, so fix the comment. Signed-off-by: Jiang Liu <[email protected]> Cc: Russell King <[email protected]> Cc: Will Deacon <[email protected]> Cc: Nicolas Pitre <[email protected]> Cc: Stephen Boyd <[email protected]> Cc: Giancarlo Asnaghi <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-07-03mm/ALPHA: clean up unused VALID_PAGE()Jiang Liu1-2/+0
VALID_PAGE() has been removed from kernel long time ago, so clean up it. Signed-off-by: Jiang Liu <[email protected]> Cc: Richard Henderson <[email protected]> Cc: Ivan Kokshaysky <[email protected]> Cc: Matt Turner <[email protected]> Cc: Nadia Yvette Chambers <[email protected]> Cc: Jiri Kosina <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-07-03mm/m68k: fix build warning of unused variableJiang Liu1-5/+8
Fix build warning of unused variable: arch/m68k/mm/init.c: In function 'mem_init': arch/m68k/mm/init.c:151:6: warning: unused variable 'i' [-Wunused-variable] Signed-off-by: Jiang Liu <[email protected]> Cc: Geert Uytterhoeven <[email protected]> Cc: Greg Ungerer <[email protected]> Cc: Thadeu Lima de Souza Cascardo <[email protected]> Cc: Sergei Shtylyov <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-07-03mm/alpha: unify mem_init() for both UMA and NUMA architecturesJiang Liu2-15/+2
Now mem_init() for both Alpha UMA and Alpha NUMA are the same, so unify it to reduce duplicated code. Signed-off-by: Jiang Liu <[email protected]> Cc: Richard Henderson <[email protected]> Cc: Ivan Kokshaysky <[email protected]> Cc: Matt Turner <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-07-03mm: kill free_all_bootmem_node()Jiang Liu2-19/+0
Now nobody makes use of free_all_bootmem_node(), kill it. Signed-off-by: Jiang Liu <[email protected]> Cc: Johannes Weiner <[email protected]> Cc: "David S. Miller" <[email protected]> Cc: Yinghai Lu <[email protected]> Acked-by: Tejun Heo <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-07-03mm/SH: prepare for killing free_all_bootmem_node()Jiang Liu1-12/+4
Prepare for killing free_all_bootmem_node() by using free_all_bootmem(). Signed-off-by: Jiang Liu <[email protected]> Cc: Paul Mundt <[email protected]> Cc: Wen Congyang <[email protected]> Cc: Tang Chen <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-07-03mm/PPC: prepare for killing free_all_bootmem_node()Jiang Liu1-15/+1
Prepare for killing free_all_bootmem_node() by using free_all_bootmem(). Signed-off-by: Jiang Liu <[email protected]> Cc: Benjamin Herrenschmidt <[email protected]> Cc: Paul Mackerras <[email protected]> Cc: Alexander Graf <[email protected]> Cc: "Suzuki K. Poulose" <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-07-03mm/PARISC: prepare for killing free_all_bootmem_node()Jiang Liu1-11/+1
Prepare for killing free_all_bootmem_node() by using free_all_bootmem(). Signed-off-by: Jiang Liu <[email protected]> Cc: "James E.J. Bottomley" <[email protected]> Cc: Helge Deller <[email protected]> Cc: Michal Hocko <[email protected]> Cc: David Rientjes <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-07-03mm/MIPS: prepare for killing free_all_bootmem_node()Jiang Liu1-11/+1
Prepare for killing free_all_bootmem_node() by using free_all_bootmem(). Signed-off-by: Jiang Liu <[email protected]> Cc: Ralf Baechle <[email protected]> Cc: Minchan Kim <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-07-03mm/metag: prepare for killing free_all_bootmem_node()Jiang Liu1-12/+2
Prepare for killing free_all_bootmem_node() by using free_all_bootmem(). Signed-off-by: Jiang Liu <[email protected]> Cc: James Hogan <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-07-03mm/m68k: prepare for killing free_all_bootmem_node()Jiang Liu1-3/+1
Prepare for killing free_all_bootmem_node() by using free_all_bootmem(). Signed-off-by: Jiang Liu <[email protected]> Cc: Geert Uytterhoeven <[email protected]> Cc: Greg Ungerer <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-07-03mm/m32r: prepare for killing free_all_bootmem_node()Jiang Liu1-13/+4
Prepare for killing free_all_bootmem_node() by using free_all_bootmem(). Signed-off-by: Jiang Liu <[email protected]> Cc: Hirokazu Takata <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-07-03mm/IA64: prepare for killing free_all_bootmem_node()Jiang Liu1-7/+2
Prepare for killing free_all_bootmem_node() by using free_all_bootmem(). Signed-off-by: Jiang Liu <[email protected]> Cc: Tony Luck <[email protected]> Cc: Fenghua Yu <[email protected]> Cc: Tang Chen <[email protected]> Cc: David Rientjes <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-07-03mm/AVR32: prepare for killing free_all_bootmem_node()Jiang Liu1-16/+5
Prepare for killing free_all_bootmem_node() by using free_all_bootmem() instead. Signed-off-by: Jiang Liu <[email protected]> Cc: Haavard Skinnemoen <[email protected]> Cc: Hans-Christian Egtvedt <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-07-03mm: introduce helper function set_max_mapnr()Jiang Liu1-1/+8
Introduce a helper function set_max_mapnr() to set global variable max_mapnr. Also unify condition compilation for max_mapnr with CONFIG_NEED_MULTIPLE_NODES instead of CONFIG_DISCONTIGMEM. Signed-off-by: Jiang Liu <[email protected]> Cc: Greg Kroah-Hartman <[email protected]> Cc: Mauro Carvalho Chehab <[email protected]> Cc: "David S. Miller" <[email protected]> Cc: Mark Brown <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-07-03mm: kill global variable num_physpagesJiang Liu3-5/+0
Now all references to num_physpages have been removed, so kill it. Signed-off-by: Jiang Liu <[email protected]> Cc: Mel Gorman <[email protected]> Cc: Michel Lespinasse <[email protected]> Cc: Rik van Riel <[email protected]> Cc: Jiang Liu <[email protected]> Cc: Hugh Dickins <[email protected]> Cc: David Rientjes <[email protected]> Cc: Al Viro <[email protected]> Cc: Konstantin Khlebnikov <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-07-03mm/xtensa: prepare for removing num_physpages and simplify mem_init()Jiang Liu1-25/+2
Prepare for removing num_physpages and simplify mem_init(). Signed-off-by: Jiang Liu <[email protected]> Cc: Chris Zankel <[email protected]> Cc: Max Filippov <[email protected]> Cc: Geert Uytterhoeven <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-07-03mm/x86: prepare for removing num_physpages and simplify mem_init()Jiang Liu5-52/+4
Prepare for removing num_physpages and simplify mem_init(). Signed-off-by: Jiang Liu <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: "H. Peter Anvin" <[email protected]> Cc: Andreas Herrmann <[email protected]> Cc: Tang Chen <[email protected]> Cc: Wen Congyang <[email protected]> Cc: Jianguo Wu <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-07-03mm/unicore32: prepare for removing num_physpages and simplify mem_init()Jiang Liu1-47/+2
Prepare for removing num_physpages and simplify mem_init(). Signed-off-by: Jiang Liu <[email protected]> Cc: Guan Xuetao <[email protected]> Cc: Michal Hocko <[email protected]> Cc: David Rientjes <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-07-03mm/um: prepare for removing num_physpages and simplify mem_init()Jiang Liu1-3/+1
Prepare for removing num_physpages and simplify mem_init(). Signed-off-by: Jiang Liu <[email protected]> Cc: Jeff Dike <[email protected]> Cc: Richard Weinberger <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-07-03mm/tile: prepare for removing num_physpages and simplify mem_init()Jiang Liu2-22/+9
Prepare for removing num_physpages and simplify mem_init(). Signed-off-by: Jiang Liu <[email protected]> Acked-by: Chris Metcalf <[email protected]> Cc: Bjorn Helgaas <[email protected]> Cc: "David S. Miller" <[email protected]> Cc: Wen Congyang <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-07-03mm/SPARC: prepare for removing num_physpages and simplify mem_init()Jiang Liu3-54/+7
Prepare for removing num_physpages and simplify mem_init(). Signed-off-by: Jiang Liu <[email protected]> Acked-by: Sam Ravnborg <[email protected]> Cc: "David S. Miller" <[email protected]> Cc: Yasuaki Ishimatsu <[email protected]> Cc: Tang Chen <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-07-03mm/SH: prepare for removing num_physpages and simplify mem_init()Jiang Liu1-21/+4
Prepare for removing num_physpages and simplify mem_init(). Signed-off-by: Jiang Liu <[email protected]> Cc: Paul Mundt <[email protected]> Cc: Wen Congyang <[email protected]> Cc: Tang Chen <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-07-03mm/score: prepare for removing num_physpages and simplify mem_init()Jiang Liu1-24/+2
Prepare for removing num_physpages and simplify mem_init(). Signed-off-by: Jiang Liu <[email protected]> Cc: Chen Liqin <[email protected]> Cc: Lennox Wu <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-07-03mm/s390: prepare for removing num_physpages and simplify mem_init()Jiang Liu1-15/+2
Prepare for removing num_physpages and simplify mem_init(). Signed-off-by: Jiang Liu <[email protected]> Cc: Martin Schwidefsky <[email protected]> Cc: Heiko Carstens <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-07-03mm/ppc: prepare for removing num_physpages and simplify mem_init()Jiang Liu1-44/+12
Prepare for removing num_physpages and simplify mem_init(). Signed-off-by: Jiang Liu <[email protected]> Cc: Benjamin Herrenschmidt <[email protected]> Cc: Paul Mackerras <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-07-03mm/PARISC: prepare for removing num_physpages and simplify mem_init()Jiang Liu1-44/+3
Prepare for removing num_physpages and simplify mem_init(). Signed-off-by: Jiang Liu <[email protected]> Cc: "James E.J. Bottomley" <[email protected]> Cc: Helge Deller <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: Michal Hocko <[email protected]> Cc: David Rientjes <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-07-03mm/openrisc: prepare for removing num_physpages and simplify mem_init()Jiang Liu1-40/+4
Prepare for removing num_physpages and simplify mem_init(). Signed-off-by: Jiang Liu <[email protected]> Acked-by: Jonas Bonn <[email protected]> Cc: David Howells <[email protected]> Cc: Arnd Bergmann <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-07-03mm/mn10300: prepare for removing num_physpages and simplify mem_init()Jiang Liu1-24/+2
Prepare for removing num_physpages and simplify mem_init(). Signed-off-by: Jiang Liu <[email protected]> Cc: David Howells <[email protected]> Cc: Koichi Yasutake <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-07-03mm/MIPS: prepare for removing num_physpages and simplify mem_init()Jiang Liu3-59/+21
Prepare for removing num_physpages and simplify mem_init(). Signed-off-by: Jiang Liu <[email protected]> Cc: Ralf Baechle <[email protected]> Cc: David Daney <[email protected]> Cc: Arnd Bergmann <[email protected]> Cc: Jiri Kosina <[email protected]> Cc: John Crispin <[email protected]> Cc: Greg Kroah-Hartman <[email protected]> Cc: Minchan Kim <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-07-03mm/microblaze: prepare for removing num_physpages and simplify mem_init()Jiang Liu2-46/+7
Prepare for removing num_physpages and simplify mem_init(). Signed-off-by: Jiang Liu <[email protected]> Cc: Michal Simek <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-07-03mm/metag: prepare for removing num_physpages and simplify mem_init()Jiang Liu1-7/+1
Prepare for removing num_physpages and simplify mem_init(). Signed-off-by: Jiang Liu <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-07-03mm/m68k: prepare for removing num_physpages and simplify mem_init()Jiang Liu1-29/+2
Prepare for removing num_physpages and simplify mem_init(). Signed-off-by: Jiang Liu <[email protected]> Acked-by: Greg Ungerer <[email protected]> Cc: Geert Uytterhoeven <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-07-03mm/m32r: prepare for removing num_physpages and simplify mem_init()Jiang Liu2-49/+6
Prepare for removing num_physpages and simplify mem_init(). Signed-off-by: Jiang Liu <[email protected]> Cc: Hirokazu Takata <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-07-03mm/IA64: prepare for removing num_physpages and simplify mem_init()Jiang Liu3-40/+1
Prepare for removing num_physpages and simplify mem_init(). Signed-off-by: Jiang Liu <[email protected]> Cc: Tony Luck <[email protected]> Cc: Fenghua Yu <[email protected]> Cc: Zhang Yanfei <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-07-03mm/hexagon: prepare for removing num_physpages and simplify mem_init()Jiang Liu1-3/+1
Prepare for removing num_physpages and simplify mem_init(). Signed-off-by: Jiang Liu <[email protected]> Cc: Richard Kuo <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-07-03mm/h8300: prepare for removing num_physpages and simplify mem_init()Jiang Liu1-28/+8
Prepare for removing num_physpages and simplify mem_init(). Signed-off-by: Jiang Liu <[email protected]> Cc: Yoshinori Sato <[email protected]> Cc: Geert Uytterhoeven <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-07-03mm/frv: prepare for removing num_physpages and simplify mem_init()Jiang Liu2-41/+21
Prepare for removing num_physpages and simplify mem_init(). Signed-off-by: Jiang Liu <[email protected]> Cc: David Howells <[email protected]> Cc: Andi Kleen <[email protected]> Cc: Geert Uytterhoeven <[email protected]> Cc: Greg Kroah-Hartman <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-07-03mm/cris: prepare for removing num_physpages and simplify mem_init()Jiang Liu1-31/+2
Prepare for removing num_physpages and simplify mem_init(). Signed-off-by: Jiang Liu <[email protected]> Acked-by: Jesper Nilsson <[email protected]> Cc: Mikael Starvik <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>