Merge branch 'akpm' (patches from Andrew)
Merge updates from Andrew Morton: - a few misc bits - ocfs2 - most(?) of MM * emailed patches from Andrew Morton <akpm@linux-foundation.org>: (125 commits) thp: fix comments of __pmd_trans_huge_lock() cgroup: remove unnecessary 0 check from css_from_id() cgroup: fix idr leak for the first cgroup root mm: memcontrol: fix documentation for compound parameter mm: memcontrol: remove BUG_ON in uncharge_list mm: fix build warnings in <linux/compaction.h> mm, thp: convert from optimistic swapin collapsing to conservative mm, thp: fix comment inconsistency for swapin readahead functions thp: update Documentation/{vm/transhuge,filesystems/proc}.txt shmem: split huge pages beyond i_size under memory pressure thp: introduce CONFIG_TRANSPARENT_HUGE_PAGECACHE khugepaged: add support of collapse for tmpfs/shmem pages shmem: make shmem_inode_info::lock irq-safe khugepaged: move up_read(mmap_sem) out of khugepaged_alloc_page() thp: extract khugepaged from mm/huge_memory.c shmem, thp: respect MADV_{NO,}HUGEPAGE for file mappings shmem: add huge pages support shmem: get_unmapped_area align huge page shmem: prepare huge= mount option and sysfs knob mm, rmap: account shmem thp pages ...
This commit is contained in:
@@ -391,6 +391,7 @@ static ssize_t show_valid_zones(struct device *dev,
|
||||
unsigned long nr_pages = PAGES_PER_SECTION * sections_per_block;
|
||||
struct page *first_page;
|
||||
struct zone *zone;
|
||||
int zone_shift = 0;
|
||||
|
||||
start_pfn = section_nr_to_pfn(mem->start_section_nr);
|
||||
end_pfn = start_pfn + nr_pages;
|
||||
@@ -402,21 +403,26 @@ static ssize_t show_valid_zones(struct device *dev,
|
||||
|
||||
zone = page_zone(first_page);
|
||||
|
||||
if (zone_idx(zone) == ZONE_MOVABLE - 1) {
|
||||
/*The mem block is the last memoryblock of this zone.*/
|
||||
if (end_pfn == zone_end_pfn(zone))
|
||||
return sprintf(buf, "%s %s\n",
|
||||
zone->name, (zone + 1)->name);
|
||||
/* MMOP_ONLINE_KEEP */
|
||||
sprintf(buf, "%s", zone->name);
|
||||
|
||||
/* MMOP_ONLINE_KERNEL */
|
||||
zone_shift = zone_can_shift(start_pfn, nr_pages, ZONE_NORMAL);
|
||||
if (zone_shift) {
|
||||
strcat(buf, " ");
|
||||
strcat(buf, (zone + zone_shift)->name);
|
||||
}
|
||||
|
||||
if (zone_idx(zone) == ZONE_MOVABLE) {
|
||||
/*The mem block is the first memoryblock of ZONE_MOVABLE.*/
|
||||
if (start_pfn == zone->zone_start_pfn)
|
||||
return sprintf(buf, "%s %s\n",
|
||||
zone->name, (zone - 1)->name);
|
||||
/* MMOP_ONLINE_MOVABLE */
|
||||
zone_shift = zone_can_shift(start_pfn, nr_pages, ZONE_MOVABLE);
|
||||
if (zone_shift) {
|
||||
strcat(buf, " ");
|
||||
strcat(buf, (zone + zone_shift)->name);
|
||||
}
|
||||
|
||||
return sprintf(buf, "%s\n", zone->name);
|
||||
strcat(buf, "\n");
|
||||
|
||||
return strlen(buf);
|
||||
}
|
||||
static DEVICE_ATTR(valid_zones, 0444, show_valid_zones, NULL);
|
||||
#endif
|
||||
|
@@ -113,6 +113,8 @@ static ssize_t node_read_meminfo(struct device *dev,
|
||||
"Node %d SUnreclaim: %8lu kB\n"
|
||||
#ifdef CONFIG_TRANSPARENT_HUGEPAGE
|
||||
"Node %d AnonHugePages: %8lu kB\n"
|
||||
"Node %d ShmemHugePages: %8lu kB\n"
|
||||
"Node %d ShmemPmdMapped: %8lu kB\n"
|
||||
#endif
|
||||
,
|
||||
nid, K(node_page_state(nid, NR_FILE_DIRTY)),
|
||||
@@ -131,10 +133,13 @@ static ssize_t node_read_meminfo(struct device *dev,
|
||||
node_page_state(nid, NR_SLAB_UNRECLAIMABLE)),
|
||||
nid, K(node_page_state(nid, NR_SLAB_RECLAIMABLE)),
|
||||
#ifdef CONFIG_TRANSPARENT_HUGEPAGE
|
||||
nid, K(node_page_state(nid, NR_SLAB_UNRECLAIMABLE))
|
||||
, nid,
|
||||
K(node_page_state(nid, NR_ANON_TRANSPARENT_HUGEPAGES) *
|
||||
HPAGE_PMD_NR));
|
||||
nid, K(node_page_state(nid, NR_SLAB_UNRECLAIMABLE)),
|
||||
nid, K(node_page_state(nid, NR_ANON_THPS) *
|
||||
HPAGE_PMD_NR),
|
||||
nid, K(node_page_state(nid, NR_SHMEM_THPS) *
|
||||
HPAGE_PMD_NR),
|
||||
nid, K(node_page_state(nid, NR_SHMEM_PMDMAPPED) *
|
||||
HPAGE_PMD_NR));
|
||||
#else
|
||||
nid, K(node_page_state(nid, NR_SLAB_UNRECLAIMABLE)));
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user