Skip to content

Commit df32e43

Browse files
committed
Merge branch 'akpm' (incoming from Andrew)
Merge first patch-bomb from Andrew Morton: - a couple of misc things - inotify/fsnotify work from Jan - ocfs2 updates (partial) - about half of MM * emailed patches from Andrew Morton <akpm@linux-foundation.org>: (117 commits) mm/migrate: remove unused function, fail_migrate_page() mm/migrate: remove putback_lru_pages, fix comment on putback_movable_pages mm/migrate: correct failure handling if !hugepage_migration_support() mm/migrate: add comment about permanent failure path mm, page_alloc: warn for non-blockable __GFP_NOFAIL allocation failure mm: compaction: reset scanner positions immediately when they meet mm: compaction: do not mark unmovable pageblocks as skipped in async compaction mm: compaction: detect when scanners meet in isolate_freepages mm: compaction: reset cached scanner pfn's before reading them mm: compaction: encapsulate defer reset logic mm: compaction: trace compaction begin and end memcg, oom: lock mem_cgroup_print_oom_info sched: add tracepoints related to NUMA task migration mm: numa: do not automatically migrate KSM pages mm: numa: trace tasks that fail migration due to rate limiting mm: numa: limit scope of lock for NUMA migrate rate limiting mm: numa: make NUMA-migrate related functions static lib/show_mem.c: show num_poisoned_pages when oom mm/hwpoison: add '#' to hwpoison_inject mm/memblock: use WARN_ONCE when MAX_NUMNODES passed as input parameter ...
2 parents fbd918a + 78d5506 commit df32e43

139 files changed

Lines changed: 2902 additions & 2512 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎Documentation/filesystems/proc.txt‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -767,6 +767,7 @@ The "Locked" indicates whether the mapping is locked in memory or not.
767767

768768
MemTotal: 16344972 kB
769769
MemFree: 13634064 kB
770+
MemAvailable: 14836172 kB
770771
Buffers: 3656 kB
771772
Cached: 1195708 kB
772773
SwapCached: 0 kB
@@ -799,6 +800,14 @@ AnonHugePages: 49152 kB
799800
MemTotal: Total usable ram (i.e. physical ram minus a few reserved
800801
bits and the kernel binary code)
801802
MemFree: The sum of LowFree+HighFree
803+
MemAvailable: An estimate of how much memory is available for starting new
804+
applications, without swapping. Calculated from MemFree,
805+
SReclaimable, the size of the file LRU lists, and the low
806+
watermarks in each zone.
807+
The estimate takes into account that the system needs some
808+
page cache to function well, and that not all reclaimable
809+
slab will be reclaimable, due to items being in use. The
810+
impact of those factors will vary from system to system.
802811
Buffers: Relatively temporary storage for raw disk blocks
803812
shouldn't get tremendously large (20MB or so)
804813
Cached: in-memory cache for files read from the disk (the

‎Documentation/sysctl/vm.txt‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ Currently, these files are in /proc/sys/vm:
4747
- numa_zonelist_order
4848
- oom_dump_tasks
4949
- oom_kill_allocating_task
50+
- overcommit_kbytes
5051
- overcommit_memory
5152
- overcommit_ratio
5253
- page-cluster
@@ -574,6 +575,17 @@ The default value is 0.
574575

575576
==============================================================
576577

578+
overcommit_kbytes:
579+
580+
When overcommit_memory is set to 2, the committed address space is not
581+
permitted to exceed swap plus this amount of physical RAM. See below.
582+
583+
Note: overcommit_kbytes is the counterpart of overcommit_ratio. Only one
584+
of them may be specified at a time. Setting one disables the other (which
585+
then appears as 0 when read).
586+
587+
==============================================================
588+
577589
overcommit_memory:
578590

579591
This value contains a flag that enables memory overcommitment.

‎Documentation/vm/overcommit-accounting‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ The Linux kernel supports the following overcommit handling modes
1414

1515
2 - Don't overcommit. The total address space commit
1616
for the system is not permitted to exceed swap + a
17-
configurable percentage (default is 50) of physical RAM.
18-
Depending on the percentage you use, in most situations
17+
configurable amount (default is 50%) of physical RAM.
18+
Depending on the amount you use, in most situations
1919
this means a process will not be killed while accessing
2020
pages but will receive errors on memory allocation as
2121
appropriate.
@@ -26,7 +26,8 @@ The Linux kernel supports the following overcommit handling modes
2626

2727
The overcommit policy is set via the sysctl `vm.overcommit_memory'.
2828

29-
The overcommit percentage is set via `vm.overcommit_ratio'.
29+
The overcommit amount can be set via `vm.overcommit_ratio' (percentage)
30+
or `vm.overcommit_kbytes' (absolute value).
3031

3132
The current overcommit limit and amount committed are viewable in
3233
/proc/meminfo as CommitLimit and Committed_AS respectively.

‎arch/arm/include/asm/dma.h‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
#define MAX_DMA_ADDRESS 0xffffffffUL
99
#else
1010
#define MAX_DMA_ADDRESS ({ \
11-
extern unsigned long arm_dma_zone_size; \
12-
arm_dma_zone_size ? \
11+
extern phys_addr_t arm_dma_zone_size; \
12+
arm_dma_zone_size && arm_dma_zone_size < (0x10000000 - PAGE_OFFSET) ? \
1313
(PAGE_OFFSET + arm_dma_zone_size) : 0xffffffffUL; })
1414
#endif
1515

‎arch/arm/kernel/devtree.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ void __init early_init_dt_add_memory_arch(u64 base, u64 size)
3333

3434
void * __init early_init_dt_alloc_memory_arch(u64 size, u64 align)
3535
{
36-
return alloc_bootmem_align(size, align);
36+
return memblock_virt_alloc(size, align);
3737
}
3838

3939
void __init arm_dt_memblock_reserve(void)

‎arch/arm/kernel/setup.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -717,7 +717,7 @@ static void __init request_standard_resources(const struct machine_desc *mdesc)
717717
kernel_data.end = virt_to_phys(_end - 1);
718718

719719
for_each_memblock(memory, region) {
720-
res = alloc_bootmem_low(sizeof(*res));
720+
res = memblock_virt_alloc(sizeof(*res), 0);
721721
res->name = "System RAM";
722722
res->start = __pfn_to_phys(memblock_region_memory_base_pfn(region));
723723
res->end = __pfn_to_phys(memblock_region_memory_end_pfn(region)) - 1;

‎arch/arm/mach-omap2/omap_hwmod.c‎

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2791,9 +2791,7 @@ static int __init _alloc_links(struct omap_hwmod_link **ml,
27912791
sz = sizeof(struct omap_hwmod_link) * LINKS_PER_OCP_IF;
27922792

27932793
*sl = NULL;
2794-
*ml = alloc_bootmem(sz);
2795-
2796-
memset(*ml, 0, sz);
2794+
*ml = memblock_virt_alloc(sz, 0);
27972795

27982796
*sl = (void *)(*ml) + sizeof(struct omap_hwmod_link);
27992797

@@ -2912,9 +2910,7 @@ static int __init _alloc_linkspace(struct omap_hwmod_ocp_if **ois)
29122910
pr_debug("omap_hwmod: %s: allocating %d byte linkspace (%d links)\n",
29132911
__func__, sz, max_ls);
29142912

2915-
linkspace = alloc_bootmem(sz);
2916-
2917-
memset(linkspace, 0, sz);
2913+
linkspace = memblock_virt_alloc(sz, 0);
29182914

29192915
return 0;
29202916
}

‎arch/arm/mm/init.c‎

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,9 +92,6 @@ void show_mem(unsigned int filter)
9292
printk("Mem-info:\n");
9393
show_free_areas(filter);
9494

95-
if (filter & SHOW_MEM_FILTER_PAGE_COUNT)
96-
return;
97-
9895
for_each_bank (i, mi) {
9996
struct membank *bank = &mi->bank[i];
10097
unsigned int pfn1, pfn2;
@@ -461,7 +458,7 @@ free_memmap(unsigned long start_pfn, unsigned long end_pfn)
461458
* free the section of the memmap array.
462459
*/
463460
if (pg < pgend)
464-
free_bootmem(pg, pgend - pg);
461+
memblock_free_early(pg, pgend - pg);
465462
}
466463

467464
/*

‎arch/ia64/mm/contig.c‎

Lines changed: 0 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -31,74 +31,6 @@
3131
static unsigned long max_gap;
3232
#endif
3333

34-
/**
35-
* show_mem - give short summary of memory stats
36-
*
37-
* Shows a simple page count of reserved and used pages in the system.
38-
* For discontig machines, it does this on a per-pgdat basis.
39-
*/
40-
void show_mem(unsigned int filter)
41-
{
42-
int i, total_reserved = 0;
43-
int total_shared = 0, total_cached = 0;
44-
unsigned long total_present = 0;
45-
pg_data_t *pgdat;
46-
47-
printk(KERN_INFO "Mem-info:\n");
48-
show_free_areas(filter);
49-
printk(KERN_INFO "Node memory in pages:\n");
50-
if (filter & SHOW_MEM_FILTER_PAGE_COUNT)
51-
return;
52-
for_each_online_pgdat(pgdat) {
53-
unsigned long present;
54-
unsigned long flags;
55-
int shared = 0, cached = 0, reserved = 0;
56-
int nid = pgdat->node_id;
57-
58-
if (skip_free_areas_node(filter, nid))
59-
continue;
60-
pgdat_resize_lock(pgdat, &flags);
61-
present = pgdat->node_present_pages;
62-
for(i = 0; i < pgdat->node_spanned_pages; i++) {
63-
struct page *page;
64-
if (unlikely(i % MAX_ORDER_NR_PAGES == 0))
65-
touch_nmi_watchdog();
66-
if (pfn_valid(pgdat->node_start_pfn + i))
67-
page = pfn_to_page(pgdat->node_start_pfn + i);
68-
else {
69-
#ifdef CONFIG_VIRTUAL_MEM_MAP
70-
if (max_gap < LARGE_GAP)
71-
continue;
72-
#endif
73-
i = vmemmap_find_next_valid_pfn(nid, i) - 1;
74-
continue;
75-
}
76-
if (PageReserved(page))
77-
reserved++;
78-
else if (PageSwapCache(page))
79-
cached++;
80-
else if (page_count(page))
81-
shared += page_count(page)-1;
82-
}
83-
pgdat_resize_unlock(pgdat, &flags);
84-
total_present += present;
85-
total_reserved += reserved;
86-
total_cached += cached;
87-
total_shared += shared;
88-
printk(KERN_INFO "Node %4d: RAM: %11ld, rsvd: %8d, "
89-
"shrd: %10d, swpd: %10d\n", nid,
90-
present, reserved, shared, cached);
91-
}
92-
printk(KERN_INFO "%ld pages of RAM\n", total_present);
93-
printk(KERN_INFO "%d reserved pages\n", total_reserved);
94-
printk(KERN_INFO "%d pages shared\n", total_shared);
95-
printk(KERN_INFO "%d pages swap cached\n", total_cached);
96-
printk(KERN_INFO "Total of %ld pages in page table cache\n",
97-
quicklist_total_size());
98-
printk(KERN_INFO "%ld free buffer pages\n", nr_free_buffer_pages());
99-
}
100-
101-
10234
/* physical address where the bootmem map is located */
10335
unsigned long bootmap_start;
10436

‎arch/ia64/mm/discontig.c‎

Lines changed: 0 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -607,69 +607,6 @@ void *per_cpu_init(void)
607607
}
608608
#endif /* CONFIG_SMP */
609609

610-
/**
611-
* show_mem - give short summary of memory stats
612-
*
613-
* Shows a simple page count of reserved and used pages in the system.
614-
* For discontig machines, it does this on a per-pgdat basis.
615-
*/
616-
void show_mem(unsigned int filter)
617-
{
618-
int i, total_reserved = 0;
619-
int total_shared = 0, total_cached = 0;
620-
unsigned long total_present = 0;
621-
pg_data_t *pgdat;
622-
623-
printk(KERN_INFO "Mem-info:\n");
624-
show_free_areas(filter);
625-
if (filter & SHOW_MEM_FILTER_PAGE_COUNT)
626-
return;
627-
printk(KERN_INFO "Node memory in pages:\n");
628-
for_each_online_pgdat(pgdat) {
629-
unsigned long present;
630-
unsigned long flags;
631-
int shared = 0, cached = 0, reserved = 0;
632-
int nid = pgdat->node_id;
633-
634-
if (skip_free_areas_node(filter, nid))
635-
continue;
636-
pgdat_resize_lock(pgdat, &flags);
637-
present = pgdat->node_present_pages;
638-
for(i = 0; i < pgdat->node_spanned_pages; i++) {
639-
struct page *page;
640-
if (unlikely(i % MAX_ORDER_NR_PAGES == 0))
641-
touch_nmi_watchdog();
642-
if (pfn_valid(pgdat->node_start_pfn + i))
643-
page = pfn_to_page(pgdat->node_start_pfn + i);
644-
else {
645-
i = vmemmap_find_next_valid_pfn(nid, i) - 1;
646-
continue;
647-
}
648-
if (PageReserved(page))
649-
reserved++;
650-
else if (PageSwapCache(page))
651-
cached++;
652-
else if (page_count(page))
653-
shared += page_count(page)-1;
654-
}
655-
pgdat_resize_unlock(pgdat, &flags);
656-
total_present += present;
657-
total_reserved += reserved;
658-
total_cached += cached;
659-
total_shared += shared;
660-
printk(KERN_INFO "Node %4d: RAM: %11ld, rsvd: %8d, "
661-
"shrd: %10d, swpd: %10d\n", nid,
662-
present, reserved, shared, cached);
663-
}
664-
printk(KERN_INFO "%ld pages of RAM\n", total_present);
665-
printk(KERN_INFO "%d reserved pages\n", total_reserved);
666-
printk(KERN_INFO "%d pages shared\n", total_shared);
667-
printk(KERN_INFO "%d pages swap cached\n", total_cached);
668-
printk(KERN_INFO "Total of %ld pages in page table cache\n",
669-
quicklist_total_size());
670-
printk(KERN_INFO "%ld free buffer pages\n", nr_free_buffer_pages());
671-
}
672-
673610
/**
674611
* call_pernode_memory - use SRAT to call callback functions with node info
675612
* @start: physical start of range

0 commit comments

Comments
 (0)