From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f71.google.com (mail-wm0-f71.google.com [74.125.82.71]) by kanga.kvack.org (Postfix) with ESMTP id E1AC56B0033 for ; Thu, 12 Jan 2017 08:17:08 -0500 (EST) Received: by mail-wm0-f71.google.com with SMTP id c206so3693245wme.3 for ; Thu, 12 Jan 2017 05:17:08 -0800 (PST) Received: from mail-wm0-f65.google.com (mail-wm0-f65.google.com. [74.125.82.65]) by mx.google.com with ESMTPS id w63si7286181wrb.1.2017.01.12.05.17.07 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 12 Jan 2017 05:17:07 -0800 (PST) Received: by mail-wm0-f65.google.com with SMTP id l2so3629965wml.2 for ; Thu, 12 Jan 2017 05:17:07 -0800 (PST) From: Michal Hocko Subject: [PATCH 0/4] show_mem updates Date: Thu, 12 Jan 2017 14:16:55 +0100 Message-Id: <20170112131659.23058-1-mhocko@kernel.org> Sender: owner-linux-mm@kvack.org List-ID: To: linux-mm@kvack.org Cc: Andrew Morton , Johannes Weiner , Mel Gorman , David Rientjes , Chris Metcalf , "David S. Miller" , Fenghua Yu , Guan Xuetao , Helge Deller , "James E.J. Bottomley" , Michal Hocko , Tony Luck Hi, this is a mixture of one bug fix (patch 1), an enhancement (patch 2) and cleanups (the rest of the series). First two patches should be really straightforward. Patch 3 removes some arch specific show_mem implementations because I think they are quite outdated and do not really serve any useful purpose anymore. I might be missing something which is why this patch is RFC. I think we should really strive to have a consistent show_mem output regardless of the architecture. If some architecture is really special and wants to dump something additional we should do that via an arch specific hook. The last patch adds nodemask parameter so that we do not rely on the hardcoded mems_allowed of the current task when doing the node filtering. I consider this more a cleanup than a fix because basically all users use a nodemask which is a subset of mems_allowed. There is only one call path in the memory hotplug which doesn't comply with this but that is hardly something to worry about. Thoughts, comments? Michal Hocko (4): mm, page_alloc: do not report all nodes in show_mem mm, page_alloc: warn_alloc print nodemask arch, mm: remove arch specific show_mem lib/show_mem.c: teach show_mem to work with the given nodemask arch/ia64/mm/init.c | 48 ------------------------------------ arch/parisc/mm/init.c | 49 ------------------------------------- arch/powerpc/xmon/xmon.c | 2 +- arch/sparc/kernel/setup_32.c | 2 +- arch/sparc/mm/init_32.c | 11 --------- arch/tile/mm/pgtable.c | 45 ---------------------------------- arch/unicore32/mm/init.c | 44 --------------------------------- drivers/net/ethernet/sgi/ioc3-eth.c | 2 +- drivers/tty/sysrq.c | 2 +- drivers/tty/vt/keyboard.c | 2 +- include/linux/mm.h | 9 +++---- lib/show_mem.c | 4 +-- mm/nommu.c | 6 ++--- mm/oom_kill.c | 2 +- mm/page_alloc.c | 48 +++++++++++++++++++----------------- mm/vmalloc.c | 4 +-- 16 files changed, 43 insertions(+), 237 deletions(-) -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f69.google.com (mail-wm0-f69.google.com [74.125.82.69]) by kanga.kvack.org (Postfix) with ESMTP id 6E5566B0069 for ; Thu, 12 Jan 2017 08:17:09 -0500 (EST) Received: by mail-wm0-f69.google.com with SMTP id c85so3658412wmi.6 for ; Thu, 12 Jan 2017 05:17:09 -0800 (PST) Received: from mail-wm0-f66.google.com (mail-wm0-f66.google.com. [74.125.82.66]) by mx.google.com with ESMTPS id eh3si7425300wjd.247.2017.01.12.05.17.08 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 12 Jan 2017 05:17:08 -0800 (PST) Received: by mail-wm0-f66.google.com with SMTP id l2so3630105wml.2 for ; Thu, 12 Jan 2017 05:17:08 -0800 (PST) From: Michal Hocko Subject: [PATCH 1/4] mm, page_alloc: do not report all nodes in show_mem Date: Thu, 12 Jan 2017 14:16:56 +0100 Message-Id: <20170112131659.23058-2-mhocko@kernel.org> In-Reply-To: <20170112131659.23058-1-mhocko@kernel.org> References: <20170112131659.23058-1-mhocko@kernel.org> Sender: owner-linux-mm@kvack.org List-ID: To: linux-mm@kvack.org Cc: Andrew Morton , Johannes Weiner , Mel Gorman , David Rientjes , Michal Hocko From: Michal Hocko 599d0c954f91 ("mm, vmscan: move LRU lists to node") has added per numa node statistics to show_mem but it forgot to add skip_free_areas_node to fileter out nodes which are outside of the allocating task numa policy. Add this check to not pollute the output with the pointless information. Signed-off-by: Michal Hocko --- mm/page_alloc.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 8ff25883c172..8f4f306d804c 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -4345,6 +4345,9 @@ void show_free_areas(unsigned int filter) global_page_state(NR_FREE_CMA_PAGES)); for_each_online_pgdat(pgdat) { + if (skip_free_areas_node(filter, pgdat->node_id)) + continue; + printk("Node %d" " active_anon:%lukB" " inactive_anon:%lukB" -- 2.11.0 -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f70.google.com (mail-wm0-f70.google.com [74.125.82.70]) by kanga.kvack.org (Postfix) with ESMTP id 5D90C6B0253 for ; Thu, 12 Jan 2017 08:17:10 -0500 (EST) Received: by mail-wm0-f70.google.com with SMTP id p192so3712564wme.1 for ; Thu, 12 Jan 2017 05:17:10 -0800 (PST) Received: from mail-wm0-f68.google.com (mail-wm0-f68.google.com. [74.125.82.68]) by mx.google.com with ESMTPS id v30si7290037wrv.93.2017.01.12.05.17.09 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 12 Jan 2017 05:17:09 -0800 (PST) Received: by mail-wm0-f68.google.com with SMTP id c85so3597907wmi.1 for ; Thu, 12 Jan 2017 05:17:09 -0800 (PST) From: Michal Hocko Subject: [PATCH 2/4] mm, page_alloc: warn_alloc print nodemask Date: Thu, 12 Jan 2017 14:16:57 +0100 Message-Id: <20170112131659.23058-3-mhocko@kernel.org> In-Reply-To: <20170112131659.23058-1-mhocko@kernel.org> References: <20170112131659.23058-1-mhocko@kernel.org> Sender: owner-linux-mm@kvack.org List-ID: To: linux-mm@kvack.org Cc: Andrew Morton , Johannes Weiner , Mel Gorman , David Rientjes , Michal Hocko From: Michal Hocko warn_alloc is currently used for to report an allocation failure or an allocation stall. We print some details of the allocation request like the gfp mask and the request order. We do not print the allocation nodemask which is important when debugging the reason for the allocation failure as well. We alreaddy print the nodemask in the OOM report. Add nodemask to warn_alloc and print it in warn_alloc as well. Signed-off-by: Michal Hocko --- include/linux/mm.h | 4 ++-- mm/page_alloc.c | 9 +++++---- mm/vmalloc.c | 4 ++-- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/include/linux/mm.h b/include/linux/mm.h index 57dc3c3b53c1..3e35eb04a28a 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h @@ -1912,8 +1912,8 @@ extern void si_meminfo_node(struct sysinfo *val, int nid); extern unsigned long arch_reserved_kernel_pages(void); #endif -extern __printf(2, 3) -void warn_alloc(gfp_t gfp_mask, const char *fmt, ...); +extern __printf(3, 4) +void warn_alloc(gfp_t gfp_mask, nodemask_t *nodemask, const char *fmt, ...); extern void setup_per_cpu_pageset(void); diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 8f4f306d804c..0a9805a696bb 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -3031,12 +3031,13 @@ static void warn_alloc_show_mem(gfp_t gfp_mask) show_mem(filter); } -void warn_alloc(gfp_t gfp_mask, const char *fmt, ...) +void warn_alloc(gfp_t gfp_mask, nodemask_t *nodemask, const char *fmt, ...) { struct va_format vaf; va_list args; static DEFINE_RATELIMIT_STATE(nopage_rs, DEFAULT_RATELIMIT_INTERVAL, DEFAULT_RATELIMIT_BURST); + nodemask_t *nm = (nodemask) ? nodemask : &cpuset_current_mems_allowed; if ((gfp_mask & __GFP_NOWARN) || !__ratelimit(&nopage_rs) || debug_guardpage_minorder() > 0) @@ -3050,7 +3051,7 @@ void warn_alloc(gfp_t gfp_mask, const char *fmt, ...) pr_cont("%pV", &vaf); va_end(args); - pr_cont(", mode:%#x(%pGg)\n", gfp_mask, &gfp_mask); + pr_cont(", mode:%#x(%pGg), nodemask=%*pbl\n", gfp_mask, &gfp_mask, nodemask_pr_args(nm)); dump_stack(); warn_alloc_show_mem(gfp_mask); @@ -3709,7 +3710,7 @@ __alloc_pages_slowpath(gfp_t gfp_mask, unsigned int order, /* Make sure we know about allocations which stall for too long */ if (time_after(jiffies, alloc_start + stall_timeout)) { - warn_alloc(gfp_mask, + warn_alloc(gfp_mask, ac->nodemask, "page allocation stalls for %ums, order:%u", jiffies_to_msecs(jiffies-alloc_start), order); stall_timeout += 10 * HZ; @@ -3743,7 +3744,7 @@ __alloc_pages_slowpath(gfp_t gfp_mask, unsigned int order, } nopage: - warn_alloc(gfp_mask, + warn_alloc(gfp_mask, ac->nodemask, "page allocation failure: order:%u", order); got_pg: return page; diff --git a/mm/vmalloc.c b/mm/vmalloc.c index b9999fc44aa6..0600bbbd1080 100644 --- a/mm/vmalloc.c +++ b/mm/vmalloc.c @@ -1662,7 +1662,7 @@ static void *__vmalloc_area_node(struct vm_struct *area, gfp_t gfp_mask, return area->addr; fail: - warn_alloc(gfp_mask, + warn_alloc(gfp_mask, NULL, "vmalloc: allocation failure, allocated %ld of %ld bytes", (area->nr_pages*PAGE_SIZE), area->size); vfree(area->addr); @@ -1724,7 +1724,7 @@ void *__vmalloc_node_range(unsigned long size, unsigned long align, return addr; fail: - warn_alloc(gfp_mask, + warn_alloc(gfp_mask, NULL, "vmalloc: allocation failure: %lu bytes", real_size); return NULL; } -- 2.11.0 -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f69.google.com (mail-wm0-f69.google.com [74.125.82.69]) by kanga.kvack.org (Postfix) with ESMTP id 78E7A6B025E for ; Thu, 12 Jan 2017 08:17:11 -0500 (EST) Received: by mail-wm0-f69.google.com with SMTP id l2so3682952wml.5 for ; Thu, 12 Jan 2017 05:17:11 -0800 (PST) Received: from mail-wm0-f67.google.com (mail-wm0-f67.google.com. [74.125.82.67]) by mx.google.com with ESMTPS id i67si1829800wmh.90.2017.01.12.05.17.10 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 12 Jan 2017 05:17:10 -0800 (PST) Received: by mail-wm0-f67.google.com with SMTP id r144so3622864wme.0 for ; Thu, 12 Jan 2017 05:17:10 -0800 (PST) From: Michal Hocko Subject: [RFC PATCH 3/4] arch, mm: remove arch specific show_mem Date: Thu, 12 Jan 2017 14:16:58 +0100 Message-Id: <20170112131659.23058-4-mhocko@kernel.org> In-Reply-To: <20170112131659.23058-1-mhocko@kernel.org> References: <20170112131659.23058-1-mhocko@kernel.org> Sender: owner-linux-mm@kvack.org List-ID: To: linux-mm@kvack.org Cc: Andrew Morton , Johannes Weiner , Mel Gorman , David Rientjes , Michal Hocko , Tony Luck , Fenghua Yu , "James E.J. Bottomley" , Helge Deller , "David S. Miller" , Chris Metcalf , Guan Xuetao , linux-ia64@vger.kernel.org, linux-parisc@vger.kernel.org From: Michal Hocko We have a generic implementation for quite some time already. If there is any arch specific information to be printed then we should add a callback called from the generic code rather than duplicate the whole show_mem. The current code has resulted in the code duplication and the output divergence which is both confusing and adds maintainance costs. Let's just get rid of this mess. Cc: Tony Luck Cc: Fenghua Yu Cc: "James E.J. Bottomley" Cc: Helge Deller Cc: "David S. Miller" Cc: Chris Metcalf Cc: Guan Xuetao Cc: linux-ia64@vger.kernel.org Cc: linux-parisc@vger.kernel.org Signed-off-by: Michal Hocko --- arch/ia64/mm/init.c | 48 ----------------------------------------------- arch/parisc/mm/init.c | 49 ------------------------------------------------ arch/sparc/mm/init_32.c | 11 ----------- arch/tile/mm/pgtable.c | 45 -------------------------------------------- arch/unicore32/mm/init.c | 44 ------------------------------------------- 5 files changed, 197 deletions(-) diff --git a/arch/ia64/mm/init.c b/arch/ia64/mm/init.c index 1841ef69183d..46afc8d5ebfc 100644 --- a/arch/ia64/mm/init.c +++ b/arch/ia64/mm/init.c @@ -684,51 +684,3 @@ int arch_remove_memory(u64 start, u64 size) } #endif #endif - -/** - * show_mem - give short summary of memory stats - * - * Shows a simple page count of reserved and used pages in the system. - * For discontig machines, it does this on a per-pgdat basis. - */ -void show_mem(unsigned int filter) -{ - int total_reserved = 0; - unsigned long total_present = 0; - pg_data_t *pgdat; - - printk(KERN_INFO "Mem-info:\n"); - show_free_areas(filter); - printk(KERN_INFO "Node memory in pages:\n"); - for_each_online_pgdat(pgdat) { - unsigned long present; - unsigned long flags; - int reserved = 0; - int nid = pgdat->node_id; - int zoneid; - - if (skip_free_areas_node(filter, nid)) - continue; - pgdat_resize_lock(pgdat, &flags); - - for (zoneid = 0; zoneid < MAX_NR_ZONES; zoneid++) { - struct zone *zone = &pgdat->node_zones[zoneid]; - if (!populated_zone(zone)) - continue; - - reserved += zone->present_pages - zone->managed_pages; - } - present = pgdat->node_present_pages; - - pgdat_resize_unlock(pgdat, &flags); - total_present += present; - total_reserved += reserved; - printk(KERN_INFO "Node %4d: RAM: %11ld, rsvd: %8d, ", - nid, present, reserved); - } - printk(KERN_INFO "%ld pages of RAM\n", total_present); - printk(KERN_INFO "%d reserved pages\n", total_reserved); - printk(KERN_INFO "Total of %ld pages in page table cache\n", - quicklist_total_size()); - printk(KERN_INFO "%ld free buffer pages\n", nr_free_buffer_pages()); -} diff --git a/arch/parisc/mm/init.c b/arch/parisc/mm/init.c index e02ada312be8..64bfdf636f39 100644 --- a/arch/parisc/mm/init.c +++ b/arch/parisc/mm/init.c @@ -653,55 +653,6 @@ void __init mem_init(void) unsigned long *empty_zero_page __read_mostly; EXPORT_SYMBOL(empty_zero_page); -void show_mem(unsigned int filter) -{ - int total = 0,reserved = 0; - pg_data_t *pgdat; - - printk(KERN_INFO "Mem-info:\n"); - show_free_areas(filter); - - for_each_online_pgdat(pgdat) { - unsigned long flags; - int zoneid; - - pgdat_resize_lock(pgdat, &flags); - for (zoneid = 0; zoneid < MAX_NR_ZONES; zoneid++) { - struct zone *zone = &pgdat->node_zones[zoneid]; - if (!populated_zone(zone)) - continue; - - total += zone->present_pages; - reserved = zone->present_pages - zone->managed_pages; - } - pgdat_resize_unlock(pgdat, &flags); - } - - printk(KERN_INFO "%d pages of RAM\n", total); - printk(KERN_INFO "%d reserved pages\n", reserved); - -#ifdef CONFIG_DISCONTIGMEM - { - struct zonelist *zl; - int i, j; - - for (i = 0; i < npmem_ranges; i++) { - zl = node_zonelist(i, 0); - for (j = 0; j < MAX_NR_ZONES; j++) { - struct zoneref *z; - struct zone *zone; - - printk("Zone list for zone %d on node %d: ", j, i); - for_each_zone_zonelist(zone, z, zl, j) - printk("[%d/%s] ", zone_to_nid(zone), - zone->name); - printk("\n"); - } - } - } -#endif -} - /* * pagetable_init() sets up the page tables * diff --git a/arch/sparc/mm/init_32.c b/arch/sparc/mm/init_32.c index eb8287155279..c6afe98de4d9 100644 --- a/arch/sparc/mm/init_32.c +++ b/arch/sparc/mm/init_32.c @@ -55,17 +55,6 @@ extern unsigned int sparc_ramdisk_size; unsigned long highstart_pfn, highend_pfn; -void show_mem(unsigned int filter) -{ - printk("Mem-info:\n"); - show_free_areas(filter); - printk("Free swap: %6ldkB\n", - get_nr_swap_pages() << (PAGE_SHIFT-10)); - printk("%ld pages of RAM\n", totalram_pages); - printk("%ld free pages\n", nr_free_pages()); -} - - unsigned long last_valid_pfn; unsigned long calc_highpages(void) diff --git a/arch/tile/mm/pgtable.c b/arch/tile/mm/pgtable.c index 7cc6ee7f1a58..492a7361e58e 100644 --- a/arch/tile/mm/pgtable.c +++ b/arch/tile/mm/pgtable.c @@ -36,51 +36,6 @@ #define K(x) ((x) << (PAGE_SHIFT-10)) -/* - * The normal show_free_areas() is too verbose on Tile, with dozens - * of processors and often four NUMA zones each with high and lowmem. - */ -void show_mem(unsigned int filter) -{ - struct zone *zone; - - pr_err("Active:%lu inactive:%lu dirty:%lu writeback:%lu unstable:%lu free:%lu\n slab:%lu mapped:%lu pagetables:%lu bounce:%lu pagecache:%lu swap:%lu\n", - (global_node_page_state(NR_ACTIVE_ANON) + - global_node_page_state(NR_ACTIVE_FILE)), - (global_node_page_state(NR_INACTIVE_ANON) + - global_node_page_state(NR_INACTIVE_FILE)), - global_node_page_state(NR_FILE_DIRTY), - global_node_page_state(NR_WRITEBACK), - global_node_page_state(NR_UNSTABLE_NFS), - global_page_state(NR_FREE_PAGES), - (global_page_state(NR_SLAB_RECLAIMABLE) + - global_page_state(NR_SLAB_UNRECLAIMABLE)), - global_node_page_state(NR_FILE_MAPPED), - global_page_state(NR_PAGETABLE), - global_page_state(NR_BOUNCE), - global_node_page_state(NR_FILE_PAGES), - get_nr_swap_pages()); - - for_each_zone(zone) { - unsigned long flags, order, total = 0, largest_order = -1; - - if (!populated_zone(zone)) - continue; - - spin_lock_irqsave(&zone->lock, flags); - for (order = 0; order < MAX_ORDER; order++) { - int nr = zone->free_area[order].nr_free; - total += nr << order; - if (nr) - largest_order = order; - } - spin_unlock_irqrestore(&zone->lock, flags); - pr_err("Node %d %7s: %lukB (largest %luKb)\n", - zone_to_nid(zone), zone->name, - K(total), largest_order ? K(1UL) << largest_order : 0); - } -} - /** * shatter_huge_page() - ensure a given address is mapped by a small page. * diff --git a/arch/unicore32/mm/init.c b/arch/unicore32/mm/init.c index be2bde9b07cf..f4950fbfe574 100644 --- a/arch/unicore32/mm/init.c +++ b/arch/unicore32/mm/init.c @@ -57,50 +57,6 @@ early_param("initrd", early_initrd); */ struct meminfo meminfo; -void show_mem(unsigned int filter) -{ - int free = 0, total = 0, reserved = 0; - int shared = 0, cached = 0, slab = 0, i; - struct meminfo *mi = &meminfo; - - printk(KERN_DEFAULT "Mem-info:\n"); - show_free_areas(filter); - - for_each_bank(i, mi) { - struct membank *bank = &mi->bank[i]; - unsigned int pfn1, pfn2; - struct page *page, *end; - - pfn1 = bank_pfn_start(bank); - pfn2 = bank_pfn_end(bank); - - page = pfn_to_page(pfn1); - end = pfn_to_page(pfn2 - 1) + 1; - - do { - total++; - if (PageReserved(page)) - reserved++; - else if (PageSwapCache(page)) - cached++; - else if (PageSlab(page)) - slab++; - else if (!page_count(page)) - free++; - else - shared += page_count(page) - 1; - page++; - } while (page < end); - } - - printk(KERN_DEFAULT "%d pages of RAM\n", total); - printk(KERN_DEFAULT "%d free pages\n", free); - printk(KERN_DEFAULT "%d reserved pages\n", reserved); - printk(KERN_DEFAULT "%d slab pages\n", slab); - printk(KERN_DEFAULT "%d pages shared\n", shared); - printk(KERN_DEFAULT "%d pages swap cached\n", cached); -} - static void __init find_limits(unsigned long *min, unsigned long *max_low, unsigned long *max_high) { -- 2.11.0 -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f71.google.com (mail-wm0-f71.google.com [74.125.82.71]) by kanga.kvack.org (Postfix) with ESMTP id 697676B0260 for ; Thu, 12 Jan 2017 08:17:12 -0500 (EST) Received: by mail-wm0-f71.google.com with SMTP id c206so3693852wme.3 for ; Thu, 12 Jan 2017 05:17:12 -0800 (PST) Received: from mail-wm0-f67.google.com (mail-wm0-f67.google.com. [74.125.82.67]) by mx.google.com with ESMTPS id r202si1848003wmg.40.2017.01.12.05.17.10 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 12 Jan 2017 05:17:11 -0800 (PST) Received: by mail-wm0-f67.google.com with SMTP id l2so3630455wml.2 for ; Thu, 12 Jan 2017 05:17:10 -0800 (PST) From: Michal Hocko Subject: [PATCH 4/4] lib/show_mem.c: teach show_mem to work with the given nodemask Date: Thu, 12 Jan 2017 14:16:59 +0100 Message-Id: <20170112131659.23058-5-mhocko@kernel.org> In-Reply-To: <20170112131659.23058-1-mhocko@kernel.org> References: <20170112131659.23058-1-mhocko@kernel.org> Sender: owner-linux-mm@kvack.org List-ID: To: linux-mm@kvack.org Cc: Andrew Morton , Johannes Weiner , Mel Gorman , David Rientjes , Michal Hocko From: Michal Hocko show_mem() allows to filter out node specific data which is irrelevant to the allocation request via SHOW_MEM_FILTER_NODES. The filtering is done in skip_free_areas_node which skips all nodes which are not in the mems_allowed of the current process. This works most of the time as expected because the nodemask shouldn't be outside of the allocating task but there are some exceptions. E.g. memory hotplug might want to request allocations from outside of the allowed nodes (see new_node_page). Get rid of this hardcoded behavior and push the allocation mask down the show_mem path and use it instead of cpuset_current_mems_allowed. NULL nodemask is interpreted as cpuset_current_mems_allowed. Signed-off-by: Michal Hocko --- arch/powerpc/xmon/xmon.c | 2 +- arch/sparc/kernel/setup_32.c | 2 +- drivers/net/ethernet/sgi/ioc3-eth.c | 2 +- drivers/tty/sysrq.c | 2 +- drivers/tty/vt/keyboard.c | 2 +- include/linux/mm.h | 5 ++--- lib/show_mem.c | 4 ++-- mm/nommu.c | 6 +++--- mm/oom_kill.c | 2 +- mm/page_alloc.c | 38 ++++++++++++++++++------------------- 10 files changed, 32 insertions(+), 33 deletions(-) diff --git a/arch/powerpc/xmon/xmon.c b/arch/powerpc/xmon/xmon.c index 760545519a0b..e285a89a65ec 100644 --- a/arch/powerpc/xmon/xmon.c +++ b/arch/powerpc/xmon/xmon.c @@ -913,7 +913,7 @@ cmds(struct pt_regs *excp) memzcan(); break; case 'i': - show_mem(0); + show_mem(0, NULL); break; default: termch = cmd; diff --git a/arch/sparc/kernel/setup_32.c b/arch/sparc/kernel/setup_32.c index c4e65cb3280f..6f06058c5ae7 100644 --- a/arch/sparc/kernel/setup_32.c +++ b/arch/sparc/kernel/setup_32.c @@ -82,7 +82,7 @@ static void prom_sync_me(void) "nop\n\t" : : "r" (&trapbase)); prom_printf("PROM SYNC COMMAND...\n"); - show_free_areas(0); + show_free_areas(0, NULL); if (!is_idle_task(current)) { local_irq_enable(); sys_sync(); diff --git a/drivers/net/ethernet/sgi/ioc3-eth.c b/drivers/net/ethernet/sgi/ioc3-eth.c index 7a254da85dd7..231e96d8bd14 100644 --- a/drivers/net/ethernet/sgi/ioc3-eth.c +++ b/drivers/net/ethernet/sgi/ioc3-eth.c @@ -914,7 +914,7 @@ static void ioc3_alloc_rings(struct net_device *dev) skb = ioc3_alloc_skb(RX_BUF_ALLOC_SIZE, GFP_ATOMIC); if (!skb) { - show_free_areas(0); + show_free_areas(0, NULL); continue; } diff --git a/drivers/tty/sysrq.c b/drivers/tty/sysrq.c index 52bbd27e93ae..667fa3931161 100644 --- a/drivers/tty/sysrq.c +++ b/drivers/tty/sysrq.c @@ -317,7 +317,7 @@ static struct sysrq_key_op sysrq_ftrace_dump_op = { static void sysrq_handle_showmem(int key) { - show_mem(0); + show_mem(0, NULL); } static struct sysrq_key_op sysrq_showmem_op = { .handler = sysrq_handle_showmem, diff --git a/drivers/tty/vt/keyboard.c b/drivers/tty/vt/keyboard.c index 0f8caae4267d..09511a362ade 100644 --- a/drivers/tty/vt/keyboard.c +++ b/drivers/tty/vt/keyboard.c @@ -572,7 +572,7 @@ static void fn_scroll_back(struct vc_data *vc) static void fn_show_mem(struct vc_data *vc) { - show_mem(0); + show_mem(0, NULL); } static void fn_show_state(struct vc_data *vc) diff --git a/include/linux/mm.h b/include/linux/mm.h index 3e35eb04a28a..95488f901c6f 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h @@ -1124,8 +1124,7 @@ extern void pagefault_out_of_memory(void); */ #define SHOW_MEM_FILTER_NODES (0x0001u) /* disallowed nodes */ -extern void show_free_areas(unsigned int flags); -extern bool skip_free_areas_node(unsigned int flags, int nid); +extern void show_free_areas(unsigned int flags, nodemask_t *nodemask); int shmem_zero_setup(struct vm_area_struct *); #ifdef CONFIG_SHMEM @@ -1904,7 +1903,7 @@ extern void setup_per_zone_wmarks(void); extern int __meminit init_per_zone_wmark_min(void); extern void mem_init(void); extern void __init mmap_init(void); -extern void show_mem(unsigned int flags); +extern void show_mem(unsigned int flags, nodemask_t *nodemask); extern long si_mem_available(void); extern void si_meminfo(struct sysinfo * val); extern void si_meminfo_node(struct sysinfo *val, int nid); diff --git a/lib/show_mem.c b/lib/show_mem.c index 1feed6a2b12a..0beaa1d899aa 100644 --- a/lib/show_mem.c +++ b/lib/show_mem.c @@ -9,13 +9,13 @@ #include #include -void show_mem(unsigned int filter) +void show_mem(unsigned int filter, nodemask_t *nodemask) { pg_data_t *pgdat; unsigned long total = 0, reserved = 0, highmem = 0; printk("Mem-Info:\n"); - show_free_areas(filter); + show_free_areas(filter, nodemask); for_each_online_pgdat(pgdat) { unsigned long flags; diff --git a/mm/nommu.c b/mm/nommu.c index ca239988fb68..5bd401b7f9a9 100644 --- a/mm/nommu.c +++ b/mm/nommu.c @@ -1191,7 +1191,7 @@ static int do_mmap_private(struct vm_area_struct *vma, enomem: pr_err("Allocation of length %lu from process %d (%s) failed\n", len, current->pid, current->comm); - show_free_areas(0); + show_free_areas(0, NULL); return -ENOMEM; } @@ -1412,13 +1412,13 @@ unsigned long do_mmap(struct file *file, kmem_cache_free(vm_region_jar, region); pr_warn("Allocation of vma for %lu byte allocation from process %d failed\n", len, current->pid); - show_free_areas(0); + show_free_areas(0, NULL); return -ENOMEM; error_getting_region: pr_warn("Allocation of vm region for %lu byte allocation from process %d failed\n", len, current->pid); - show_free_areas(0); + show_free_areas(0, NULL); return -ENOMEM; } diff --git a/mm/oom_kill.c b/mm/oom_kill.c index ead093c6f2a6..7cf61b928ba8 100644 --- a/mm/oom_kill.c +++ b/mm/oom_kill.c @@ -417,7 +417,7 @@ static void dump_header(struct oom_control *oc, struct task_struct *p) if (oc->memcg) mem_cgroup_print_oom_info(oc->memcg, p); else - show_mem(SHOW_MEM_FILTER_NODES); + show_mem(SHOW_MEM_FILTER_NODES, nm); if (sysctl_oom_dump_tasks) dump_tasks(oc->memcg, oc->nodemask); } diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 0a9805a696bb..44ba8b27a2b1 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -3008,7 +3008,7 @@ static inline bool should_suppress_show_mem(void) return ret; } -static void warn_alloc_show_mem(gfp_t gfp_mask) +static void warn_alloc_show_mem(gfp_t gfp_mask, nodemask_t *nodemask) { unsigned int filter = SHOW_MEM_FILTER_NODES; static DEFINE_RATELIMIT_STATE(show_mem_rs, HZ, 1); @@ -3028,7 +3028,7 @@ static void warn_alloc_show_mem(gfp_t gfp_mask) if (in_interrupt() || !(gfp_mask & __GFP_DIRECT_RECLAIM)) filter &= ~SHOW_MEM_FILTER_NODES; - show_mem(filter); + show_mem(filter, nodemask); } void warn_alloc(gfp_t gfp_mask, nodemask_t *nodemask, const char *fmt, ...) @@ -3054,7 +3054,7 @@ void warn_alloc(gfp_t gfp_mask, nodemask_t *nodemask, const char *fmt, ...) pr_cont(", mode:%#x(%pGg), nodemask=%*pbl\n", gfp_mask, &gfp_mask, nodemask_pr_args(nm)); dump_stack(); - warn_alloc_show_mem(gfp_mask); + warn_alloc_show_mem(gfp_mask, nm); } static inline struct page * @@ -4250,20 +4250,20 @@ void si_meminfo_node(struct sysinfo *val, int nid) * Determine whether the node should be displayed or not, depending on whether * SHOW_MEM_FILTER_NODES was passed to show_free_areas(). */ -bool skip_free_areas_node(unsigned int flags, int nid) +static bool show_mem_node_skip(unsigned int flags, int nid, nodemask_t *nodemask) { - bool ret = false; - unsigned int cpuset_mems_cookie; - if (!(flags & SHOW_MEM_FILTER_NODES)) - goto out; + return false; - do { - cpuset_mems_cookie = read_mems_allowed_begin(); - ret = !node_isset(nid, cpuset_current_mems_allowed); - } while (read_mems_allowed_retry(cpuset_mems_cookie)); -out: - return ret; + /* + * no node mask - aka implicit memory numa policy. Do not bother with the + * synchronization - read_mems_allowed_begin - because we do not have to be + * precise here. + */ + if (!nodemask) + nodemask = &cpuset_current_mems_allowed; + + return !node_isset(nid, *nodemask); } #define K(x) ((x) << (PAGE_SHIFT-10)) @@ -4304,7 +4304,7 @@ static void show_migration_types(unsigned char type) * SHOW_MEM_FILTER_NODES: suppress nodes that are not allowed by current's * cpuset. */ -void show_free_areas(unsigned int filter) +void show_free_areas(unsigned int filter, nodemask_t *nodemask) { unsigned long free_pcp = 0; int cpu; @@ -4312,7 +4312,7 @@ void show_free_areas(unsigned int filter) pg_data_t *pgdat; for_each_populated_zone(zone) { - if (skip_free_areas_node(filter, zone_to_nid(zone))) + if (show_mem_node_skip(filter, zone_to_nid(zone), nodemask)) continue; for_each_online_cpu(cpu) @@ -4346,7 +4346,7 @@ void show_free_areas(unsigned int filter) global_page_state(NR_FREE_CMA_PAGES)); for_each_online_pgdat(pgdat) { - if (skip_free_areas_node(filter, pgdat->node_id)) + if (show_mem_node_skip(filter, pgdat->node_id, nodemask)) continue; printk("Node %d" @@ -4398,7 +4398,7 @@ void show_free_areas(unsigned int filter) for_each_populated_zone(zone) { int i; - if (skip_free_areas_node(filter, zone_to_nid(zone))) + if (show_mem_node_skip(filter, zone_to_nid(zone), nodemask)) continue; free_pcp = 0; @@ -4463,7 +4463,7 @@ void show_free_areas(unsigned int filter) unsigned long nr[MAX_ORDER], flags, total = 0; unsigned char types[MAX_ORDER]; - if (skip_free_areas_node(filter, zone_to_nid(zone))) + if (show_mem_node_skip(filter, zone_to_nid(zone), nodemask)) continue; show_node(zone); printk(KERN_CONT "%s: ", zone->name); -- 2.11.0 -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f72.google.com (mail-wm0-f72.google.com [74.125.82.72]) by kanga.kvack.org (Postfix) with ESMTP id 6B16F6B0033 for ; Thu, 12 Jan 2017 08:47:22 -0500 (EST) Received: by mail-wm0-f72.google.com with SMTP id r144so4037213wme.0 for ; Thu, 12 Jan 2017 05:47:22 -0800 (PST) Received: from mx2.suse.de (mx2.suse.de. [195.135.220.15]) by mx.google.com with ESMTPS id bo9si7465635wjb.202.2017.01.12.05.47.21 for (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 12 Jan 2017 05:47:21 -0800 (PST) Date: Thu, 12 Jan 2017 13:47:18 +0000 From: Mel Gorman Subject: Re: [PATCH 1/4] mm, page_alloc: do not report all nodes in show_mem Message-ID: <20170112134718.jginjco4qsz5lboh@suse.de> References: <20170112131659.23058-1-mhocko@kernel.org> <20170112131659.23058-2-mhocko@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: <20170112131659.23058-2-mhocko@kernel.org> Sender: owner-linux-mm@kvack.org List-ID: To: Michal Hocko Cc: linux-mm@kvack.org, Andrew Morton , Johannes Weiner , David Rientjes , Michal Hocko On Thu, Jan 12, 2017 at 02:16:56PM +0100, Michal Hocko wrote: > From: Michal Hocko > > 599d0c954f91 ("mm, vmscan: move LRU lists to node") has added per numa > node statistics to show_mem but it forgot to add skip_free_areas_node > to fileter out nodes which are outside of the allocating task numa > policy. Add this check to not pollute the output with the pointless > information. > > Signed-off-by: Michal Hocko Acked-by: Mel Gorman -- Mel Gorman SUSE Labs -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f71.google.com (mail-wm0-f71.google.com [74.125.82.71]) by kanga.kvack.org (Postfix) with ESMTP id 65F136B0069 for ; Thu, 12 Jan 2017 08:48:02 -0500 (EST) Received: by mail-wm0-f71.google.com with SMTP id p192so4041298wme.1 for ; Thu, 12 Jan 2017 05:48:02 -0800 (PST) Received: from mx2.suse.de (mx2.suse.de. [195.135.220.15]) by mx.google.com with ESMTPS id j136si1893466wmf.102.2017.01.12.05.48.01 for (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 12 Jan 2017 05:48:01 -0800 (PST) Date: Thu, 12 Jan 2017 13:47:58 +0000 From: Mel Gorman Subject: Re: [PATCH 2/4] mm, page_alloc: warn_alloc print nodemask Message-ID: <20170112134758.zmryorv6o5i7i5fx@suse.de> References: <20170112131659.23058-1-mhocko@kernel.org> <20170112131659.23058-3-mhocko@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: <20170112131659.23058-3-mhocko@kernel.org> Sender: owner-linux-mm@kvack.org List-ID: To: Michal Hocko Cc: linux-mm@kvack.org, Andrew Morton , Johannes Weiner , David Rientjes , Michal Hocko On Thu, Jan 12, 2017 at 02:16:57PM +0100, Michal Hocko wrote: > From: Michal Hocko > > warn_alloc is currently used for to report an allocation failure or an > allocation stall. We print some details of the allocation request like > the gfp mask and the request order. We do not print the allocation > nodemask which is important when debugging the reason for the allocation > failure as well. We alreaddy print the nodemask in the OOM report. > > Add nodemask to warn_alloc and print it in warn_alloc as well. > > Signed-off-by: Michal Hocko Acked-by: Mel Gorman -- Mel Gorman SUSE Labs -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-yb0-f198.google.com (mail-yb0-f198.google.com [209.85.213.198]) by kanga.kvack.org (Postfix) with ESMTP id A347A6B0253 for ; Thu, 12 Jan 2017 08:48:53 -0500 (EST) Received: by mail-yb0-f198.google.com with SMTP id l23so24508608ybj.6 for ; Thu, 12 Jan 2017 05:48:53 -0800 (PST) Received: from mx2.suse.de (mx2.suse.de. [195.135.220.15]) by mx.google.com with ESMTPS id h125si1948428wme.3.2017.01.12.05.48.52 for (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 12 Jan 2017 05:48:52 -0800 (PST) Date: Thu, 12 Jan 2017 13:48:46 +0000 From: Mel Gorman Subject: Re: [RFC PATCH 3/4] arch, mm: remove arch specific show_mem Message-ID: <20170112134846.rdrqoulc6in5bllj@suse.de> References: <20170112131659.23058-1-mhocko@kernel.org> <20170112131659.23058-4-mhocko@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: <20170112131659.23058-4-mhocko@kernel.org> Sender: owner-linux-mm@kvack.org List-ID: To: Michal Hocko Cc: linux-mm@kvack.org, Andrew Morton , Johannes Weiner , David Rientjes , Michal Hocko , Tony Luck , Fenghua Yu , "James E.J. Bottomley" , Helge Deller , "David S. Miller" , Chris Metcalf , Guan Xuetao , linux-ia64@vger.kernel.org, linux-parisc@vger.kernel.org On Thu, Jan 12, 2017 at 02:16:58PM +0100, Michal Hocko wrote: > From: Michal Hocko > > We have a generic implementation for quite some time already. If there > is any arch specific information to be printed then we should add a > callback called from the generic code rather than duplicate the whole > show_mem. The current code has resulted in the code duplication and > the output divergence which is both confusing and adds maintainance > costs. Let's just get rid of this mess. > > Cc: Tony Luck > Cc: Fenghua Yu > Cc: "James E.J. Bottomley" > Cc: Helge Deller > Cc: "David S. Miller" > Cc: Chris Metcalf > Cc: Guan Xuetao > Cc: linux-ia64@vger.kernel.org > Cc: linux-parisc@vger.kernel.org > Signed-off-by: Michal Hocko This is overdue. The last time it was brought up, no one objected to arch-specific information from show_mem but maybe they weren't looking that carefully. For me; Acked-by: Mel Gorman -- Mel Gorman SUSE Labs -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f71.google.com (mail-wm0-f71.google.com [74.125.82.71]) by kanga.kvack.org (Postfix) with ESMTP id 66DE76B0033 for ; Thu, 12 Jan 2017 08:49:45 -0500 (EST) Received: by mail-wm0-f71.google.com with SMTP id c206so4040628wme.3 for ; Thu, 12 Jan 2017 05:49:45 -0800 (PST) Received: from mx2.suse.de (mx2.suse.de. [195.135.220.15]) by mx.google.com with ESMTPS id j189si1919509wmd.1.2017.01.12.05.49.44 for (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 12 Jan 2017 05:49:44 -0800 (PST) Date: Thu, 12 Jan 2017 13:49:42 +0000 From: Mel Gorman Subject: Re: [PATCH 4/4] lib/show_mem.c: teach show_mem to work with the given nodemask Message-ID: <20170112134942.46d6adcjshfeyj4r@suse.de> References: <20170112131659.23058-1-mhocko@kernel.org> <20170112131659.23058-5-mhocko@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: <20170112131659.23058-5-mhocko@kernel.org> Sender: owner-linux-mm@kvack.org List-ID: To: Michal Hocko Cc: linux-mm@kvack.org, Andrew Morton , Johannes Weiner , David Rientjes , Michal Hocko On Thu, Jan 12, 2017 at 02:16:59PM +0100, Michal Hocko wrote: > From: Michal Hocko > > show_mem() allows to filter out node specific data which is irrelevant > to the allocation request via SHOW_MEM_FILTER_NODES. The filtering > is done in skip_free_areas_node which skips all nodes which are not > in the mems_allowed of the current process. This works most of the > time as expected because the nodemask shouldn't be outside of the > allocating task but there are some exceptions. E.g. memory hotplug might > want to request allocations from outside of the allowed nodes (see > new_node_page). > > Get rid of this hardcoded behavior and push the allocation mask down the > show_mem path and use it instead of cpuset_current_mems_allowed. NULL > nodemask is interpreted as cpuset_current_mems_allowed. > > Signed-off-by: Michal Hocko Fairly marginal but Acked-by: Mel Gorman -- Mel Gorman SUSE Labs -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf0-f198.google.com (mail-pf0-f198.google.com [209.85.192.198]) by kanga.kvack.org (Postfix) with ESMTP id EC1526B0253 for ; Thu, 12 Jan 2017 12:53:52 -0500 (EST) Received: by mail-pf0-f198.google.com with SMTP id c73so64958328pfb.7 for ; Thu, 12 Jan 2017 09:53:52 -0800 (PST) Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-he1eur01on0062.outbound.protection.outlook.com. [104.47.0.62]) by mx.google.com with ESMTPS id x3si9363371pfi.274.2017.01.12.09.53.51 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 12 Jan 2017 09:53:52 -0800 (PST) Subject: Re: [RFC PATCH 3/4] arch, mm: remove arch specific show_mem References: <20170112131659.23058-1-mhocko@kernel.org> <20170112131659.23058-4-mhocko@kernel.org> From: Chris Metcalf Message-ID: <283030f8-bcfa-2948-4461-26d09f4a5bb0@mellanox.com> Date: Thu, 12 Jan 2017 12:53:37 -0500 MIME-Version: 1.0 In-Reply-To: <20170112131659.23058-4-mhocko@kernel.org> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit Sender: owner-linux-mm@kvack.org List-ID: To: Michal Hocko , linux-mm@kvack.org Cc: Andrew Morton , Johannes Weiner , Mel Gorman , David Rientjes , Michal Hocko , Tony Luck , Fenghua Yu , "James E.J. Bottomley" , Helge Deller , "David S. Miller" , Guan Xuetao , linux-ia64@vger.kernel.org, linux-parisc@vger.kernel.org On 1/12/2017 8:16 AM, Michal Hocko wrote: > From: Michal Hocko > > We have a generic implementation for quite some time already. If there > is any arch specific information to be printed then we should add a > callback called from the generic code rather than duplicate the whole > show_mem. The current code has resulted in the code duplication and > the output divergence which is both confusing and adds maintainance > costs. Let's just get rid of this mess. > > Cc: Tony Luck > Cc: Fenghua Yu > Cc: "James E.J. Bottomley" > Cc: Helge Deller > Cc: "David S. Miller" > Cc: Chris Metcalf > Cc: Guan Xuetao > Cc:linux-ia64@vger.kernel.org > Cc:linux-parisc@vger.kernel.org > Signed-off-by: Michal Hocko > --- > arch/ia64/mm/init.c | 48 ----------------------------------------------- > arch/parisc/mm/init.c | 49 ------------------------------------------------ > arch/sparc/mm/init_32.c | 11 ----------- > arch/tile/mm/pgtable.c | 45 -------------------------------------------- > arch/unicore32/mm/init.c | 44 ------------------------------------------- > 5 files changed, 197 deletions(-) Acked-by: Chris Metcalf [for tile] -- Chris Metcalf, Mellanox Technologies http://www.mellanox.com -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f72.google.com (mail-wm0-f72.google.com [74.125.82.72]) by kanga.kvack.org (Postfix) with ESMTP id 54F306B0253 for ; Thu, 12 Jan 2017 15:11:25 -0500 (EST) Received: by mail-wm0-f72.google.com with SMTP id l2so8423946wml.5 for ; Thu, 12 Jan 2017 12:11:25 -0800 (PST) Received: from mout.gmx.net (mout.gmx.net. [212.227.15.18]) by mx.google.com with ESMTPS id c134si2962867wme.33.2017.01.12.12.11.23 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 12 Jan 2017 12:11:24 -0800 (PST) Subject: Re: [RFC PATCH 3/4] arch, mm: remove arch specific show_mem References: <20170112131659.23058-1-mhocko@kernel.org> <20170112131659.23058-4-mhocko@kernel.org> From: Helge Deller Message-ID: <2ca95061-4fb3-9f15-1f99-22e3ddd927dc@gmx.de> Date: Thu, 12 Jan 2017 21:04:18 +0100 MIME-Version: 1.0 In-Reply-To: <20170112131659.23058-4-mhocko@kernel.org> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: owner-linux-mm@kvack.org List-ID: To: Michal Hocko , linux-mm@kvack.org Cc: Andrew Morton , Johannes Weiner , Mel Gorman , David Rientjes , Michal Hocko , Tony Luck , Fenghua Yu , "James E.J. Bottomley" , "David S. Miller" , Chris Metcalf , Guan Xuetao , linux-ia64@vger.kernel.org, linux-parisc@vger.kernel.org On 12.01.2017 14:16, Michal Hocko wrote: > From: Michal Hocko > > We have a generic implementation for quite some time already. If there > is any arch specific information to be printed then we should add a > callback called from the generic code rather than duplicate the whole > show_mem. The current code has resulted in the code duplication and > the output divergence which is both confusing and adds maintainance > costs. Let's just get rid of this mess. > > Cc: Tony Luck > Cc: Fenghua Yu > Cc: "James E.J. Bottomley" > Cc: Helge Deller > Cc: "David S. Miller" > Cc: Chris Metcalf > Cc: Guan Xuetao > Cc: linux-ia64@vger.kernel.org > Cc: linux-parisc@vger.kernel.org > Signed-off-by: Michal Hocko > --- > arch/ia64/mm/init.c | 48 ----------------------------------------------- > arch/parisc/mm/init.c | 49 ------------------------------------------------ > arch/sparc/mm/init_32.c | 11 ----------- > arch/tile/mm/pgtable.c | 45 -------------------------------------------- > arch/unicore32/mm/init.c | 44 ------------------------------------------- > 5 files changed, 197 deletions(-) Thanks! Acked-by: Helge Deller [for parisc] -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-io0-f199.google.com (mail-io0-f199.google.com [209.85.223.199]) by kanga.kvack.org (Postfix) with ESMTP id 1C48F6B0033 for ; Thu, 12 Jan 2017 21:56:35 -0500 (EST) Received: by mail-io0-f199.google.com with SMTP id q20so49380828ioi.0 for ; Thu, 12 Jan 2017 18:56:35 -0800 (PST) Received: from mprc.pku.edu.cn (mprc.pku.edu.cn. [162.105.203.9]) by mx.google.com with ESMTPS id b141si9909074ioa.77.2017.01.12.18.56.31 for (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 12 Jan 2017 18:56:32 -0800 (PST) Message-ID: <15923.175.43.247.167.1484275786.squirrel@mprc.pku.edu.cn> In-Reply-To: <20170112131659.23058-4-mhocko@kernel.org> References: <20170112131659.23058-1-mhocko@kernel.org> <20170112131659.23058-4-mhocko@kernel.org> Date: Fri, 13 Jan 2017 10:49:46 +0800 (CST) Subject: Re: [RFC PATCH 3/4] arch, mm: remove arch specific show_mem From: "Xuetao Guan" Reply-To: gxt@mprc.pku.edu.cn MIME-Version: 1.0 Content-Type: text/plain;charset=gb2312 Content-Transfer-Encoding: 8bit Sender: owner-linux-mm@kvack.org List-ID: To: Michal Hocko Cc: linux-mm@kvack.org, Andrew Morton , Johannes Weiner , Mel Gorman , David Rientjes , Michal Hocko , Tony Luck , Fenghua Yu , "James E.J. Bottomley" , Helge Deller , "David S. Miller" , Chris Metcalf , Guan Xuetao , linux-ia64@vger.kernel.org, linux-parisc@vger.kernel.org > From: Michal Hocko > > We have a generic implementation for quite some time already. If there > is any arch specific information to be printed then we should add a > callback called from the generic code rather than duplicate the whole > show_mem. The current code has resulted in the code duplication and > the output divergence which is both confusing and adds maintainance > costs. Let's just get rid of this mess. > > Cc: Tony Luck > Cc: Fenghua Yu > Cc: "James E.J. Bottomley" > Cc: Helge Deller > Cc: "David S. Miller" > Cc: Chris Metcalf > Cc: Guan Xuetao > Cc: linux-ia64@vger.kernel.org > Cc: linux-parisc@vger.kernel.org > Signed-off-by: Michal Hocko > --- > arch/ia64/mm/init.c | 48 > ----------------------------------------------- > arch/parisc/mm/init.c | 49 > ------------------------------------------------ > arch/sparc/mm/init_32.c | 11 ----------- > arch/tile/mm/pgtable.c | 45 > -------------------------------------------- > arch/unicore32/mm/init.c | 44 ------------------------------------------- > 5 files changed, 197 deletions(-) For UniCore32: Acked-by: Guan Xuetao Thanks. -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f71.google.com (mail-wm0-f71.google.com [74.125.82.71]) by kanga.kvack.org (Postfix) with ESMTP id 6DD496B0033 for ; Fri, 13 Jan 2017 06:31:57 -0500 (EST) Received: by mail-wm0-f71.google.com with SMTP id d140so15020819wmd.4 for ; Fri, 13 Jan 2017 03:31:57 -0800 (PST) Received: from mx2.suse.de (mx2.suse.de. [195.135.220.15]) by mx.google.com with ESMTPS id q2si10861274wra.219.2017.01.13.03.31.55 for (version=TLS1 cipher=AES128-SHA bits=128/128); Fri, 13 Jan 2017 03:31:55 -0800 (PST) Subject: Re: [PATCH 2/4] mm, page_alloc: warn_alloc print nodemask References: <20170112131659.23058-1-mhocko@kernel.org> <20170112131659.23058-3-mhocko@kernel.org> From: Vlastimil Babka Message-ID: Date: Fri, 13 Jan 2017 12:31:52 +0100 MIME-Version: 1.0 In-Reply-To: <20170112131659.23058-3-mhocko@kernel.org> Content-Type: text/plain; charset=iso-8859-2; format=flowed Content-Transfer-Encoding: 7bit Sender: owner-linux-mm@kvack.org List-ID: To: Michal Hocko , linux-mm@kvack.org Cc: Andrew Morton , Johannes Weiner , Mel Gorman , David Rientjes , Michal Hocko On 01/12/2017 02:16 PM, Michal Hocko wrote: > From: Michal Hocko > > warn_alloc is currently used for to report an allocation failure or an > allocation stall. We print some details of the allocation request like > the gfp mask and the request order. We do not print the allocation > nodemask which is important when debugging the reason for the allocation > failure as well. We alreaddy print the nodemask in the OOM report. > > Add nodemask to warn_alloc and print it in warn_alloc as well. That's helpful, but still IMHO incomplete compared to oom killer, see below. > --- a/mm/page_alloc.c > +++ b/mm/page_alloc.c > @@ -3031,12 +3031,13 @@ static void warn_alloc_show_mem(gfp_t gfp_mask) > show_mem(filter); > } > > -void warn_alloc(gfp_t gfp_mask, const char *fmt, ...) > +void warn_alloc(gfp_t gfp_mask, nodemask_t *nodemask, const char *fmt, ...) > { > struct va_format vaf; > va_list args; > static DEFINE_RATELIMIT_STATE(nopage_rs, DEFAULT_RATELIMIT_INTERVAL, > DEFAULT_RATELIMIT_BURST); > + nodemask_t *nm = (nodemask) ? nodemask : &cpuset_current_mems_allowed; Yes that's same as oom's dump_header() does it. But what if there's both mempolicy nodemask and cpuset at play? From oom report you'll see that as it also calls cpuset_print_current_mems_allowed(). So could we do that here as well? Thanks. -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f71.google.com (mail-wm0-f71.google.com [74.125.82.71]) by kanga.kvack.org (Postfix) with ESMTP id 116496B0069 for ; Fri, 13 Jan 2017 08:08:38 -0500 (EST) Received: by mail-wm0-f71.google.com with SMTP id d140so15933144wmd.4 for ; Fri, 13 Jan 2017 05:08:38 -0800 (PST) Received: from mx2.suse.de (mx2.suse.de. [195.135.220.15]) by mx.google.com with ESMTPS id d7si11171689wra.193.2017.01.13.05.08.36 for (version=TLS1 cipher=AES128-SHA bits=128/128); Fri, 13 Jan 2017 05:08:36 -0800 (PST) Subject: Re: [PATCH 4/4] lib/show_mem.c: teach show_mem to work with the given nodemask References: <20170112131659.23058-1-mhocko@kernel.org> <20170112131659.23058-5-mhocko@kernel.org> From: Vlastimil Babka Message-ID: <13903870-92bd-1ea2-aefc-0481c850da19@suse.cz> Date: Fri, 13 Jan 2017 14:08:34 +0100 MIME-Version: 1.0 In-Reply-To: <20170112131659.23058-5-mhocko@kernel.org> Content-Type: text/plain; charset=iso-8859-2; format=flowed Content-Transfer-Encoding: 7bit Sender: owner-linux-mm@kvack.org List-ID: To: Michal Hocko , linux-mm@kvack.org Cc: Andrew Morton , Johannes Weiner , Mel Gorman , David Rientjes , Michal Hocko On 01/12/2017 02:16 PM, Michal Hocko wrote: > From: Michal Hocko > > show_mem() allows to filter out node specific data which is irrelevant > to the allocation request via SHOW_MEM_FILTER_NODES. The filtering > is done in skip_free_areas_node which skips all nodes which are not > in the mems_allowed of the current process. This works most of the > time as expected because the nodemask shouldn't be outside of the > allocating task but there are some exceptions. E.g. memory hotplug might > want to request allocations from outside of the allowed nodes (see > new_node_page). Hm AFAICS memory hotplug's new_node_page() is restricted both by cpusets (by using GFP_USER), and by the nodemask it constructs. That's probably a bug in itself, as it shouldn't matter which task is triggering the offline? Which probably means that if show_mem() wants to be really precise, it would have to start from nodemask and intersect with cpuset when the allocation in question cannot escape it. But if we accept that it's ok when we print too many nodes (because we can filter them out when reading the output by having also nodemask and mems_allowed printed), and strive only to not miss any nodes, then this patch could really fix cases when we do miss (although new_node_page() currently isn't such example). Or am I wrong? -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wj0-f198.google.com (mail-wj0-f198.google.com [209.85.210.198]) by kanga.kvack.org (Postfix) with ESMTP id 404F26B0038 for ; Fri, 13 Jan 2017 09:58:59 -0500 (EST) Received: by mail-wj0-f198.google.com with SMTP id an2so391156wjc.3 for ; Fri, 13 Jan 2017 06:58:59 -0800 (PST) Received: from mx2.suse.de (mx2.suse.de. [195.135.220.15]) by mx.google.com with ESMTPS id u133si2421863wmu.53.2017.01.13.06.58.57 for (version=TLS1 cipher=AES128-SHA bits=128/128); Fri, 13 Jan 2017 06:58:58 -0800 (PST) Date: Fri, 13 Jan 2017 15:58:56 +0100 From: Michal Hocko Subject: Re: [PATCH 2/4] mm, page_alloc: warn_alloc print nodemask Message-ID: <20170113145856.GM25212@dhcp22.suse.cz> References: <20170112131659.23058-1-mhocko@kernel.org> <20170112131659.23058-3-mhocko@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: owner-linux-mm@kvack.org List-ID: To: Vlastimil Babka Cc: linux-mm@kvack.org, Andrew Morton , Johannes Weiner , Mel Gorman , David Rientjes On Fri 13-01-17 12:31:52, Vlastimil Babka wrote: > On 01/12/2017 02:16 PM, Michal Hocko wrote: > > From: Michal Hocko > > > > warn_alloc is currently used for to report an allocation failure or an > > allocation stall. We print some details of the allocation request like > > the gfp mask and the request order. We do not print the allocation > > nodemask which is important when debugging the reason for the allocation > > failure as well. We alreaddy print the nodemask in the OOM report. > > > > Add nodemask to warn_alloc and print it in warn_alloc as well. > > That's helpful, but still IMHO incomplete compared to oom killer, see below. > > > --- a/mm/page_alloc.c > > +++ b/mm/page_alloc.c > > @@ -3031,12 +3031,13 @@ static void warn_alloc_show_mem(gfp_t gfp_mask) > > show_mem(filter); > > } > > > > -void warn_alloc(gfp_t gfp_mask, const char *fmt, ...) > > +void warn_alloc(gfp_t gfp_mask, nodemask_t *nodemask, const char *fmt, ...) > > { > > struct va_format vaf; > > va_list args; > > static DEFINE_RATELIMIT_STATE(nopage_rs, DEFAULT_RATELIMIT_INTERVAL, > > DEFAULT_RATELIMIT_BURST); > > + nodemask_t *nm = (nodemask) ? nodemask : &cpuset_current_mems_allowed; > > Yes that's same as oom's dump_header() does it. But what if there's both > mempolicy nodemask and cpuset at play? From oom report you'll see that as it > also calls cpuset_print_current_mems_allowed(). So could we do that here as > well? OK, I will add it. It cannot be harmful. -- Michal Hocko SUSE Labs -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f72.google.com (mail-wm0-f72.google.com [74.125.82.72]) by kanga.kvack.org (Postfix) with ESMTP id 450E16B0033 for ; Fri, 13 Jan 2017 10:08:37 -0500 (EST) Received: by mail-wm0-f72.google.com with SMTP id r144so16809068wme.0 for ; Fri, 13 Jan 2017 07:08:37 -0800 (PST) Received: from mx2.suse.de (mx2.suse.de. [195.135.220.15]) by mx.google.com with ESMTPS id 34si11526712wrc.11.2017.01.13.07.08.35 for (version=TLS1 cipher=AES128-SHA bits=128/128); Fri, 13 Jan 2017 07:08:36 -0800 (PST) Date: Fri, 13 Jan 2017 16:08:34 +0100 From: Michal Hocko Subject: Re: [PATCH 4/4] lib/show_mem.c: teach show_mem to work with the given nodemask Message-ID: <20170113150834.GN25212@dhcp22.suse.cz> References: <20170112131659.23058-1-mhocko@kernel.org> <20170112131659.23058-5-mhocko@kernel.org> <13903870-92bd-1ea2-aefc-0481c850da19@suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <13903870-92bd-1ea2-aefc-0481c850da19@suse.cz> Sender: owner-linux-mm@kvack.org List-ID: To: Vlastimil Babka Cc: linux-mm@kvack.org, Andrew Morton , Johannes Weiner , Mel Gorman , David Rientjes On Fri 13-01-17 14:08:34, Vlastimil Babka wrote: > On 01/12/2017 02:16 PM, Michal Hocko wrote: > > From: Michal Hocko > > > > show_mem() allows to filter out node specific data which is irrelevant > > to the allocation request via SHOW_MEM_FILTER_NODES. The filtering > > is done in skip_free_areas_node which skips all nodes which are not > > in the mems_allowed of the current process. This works most of the > > time as expected because the nodemask shouldn't be outside of the > > allocating task but there are some exceptions. E.g. memory hotplug might > > want to request allocations from outside of the allowed nodes (see > > new_node_page). > > Hm AFAICS memory hotplug's new_node_page() is restricted both by cpusets (by > using GFP_USER), and by the nodemask it constructs. That's probably a bug in > itself, as it shouldn't matter which task is triggering the offline? yes that is true. A task bound to a node which is offlined would be funny... > Which probably means that if show_mem() wants to be really precise, it would > have to start from nodemask and intersect with cpuset when the allocation in > question cannot escape it. But if we accept that it's ok when we print too > many nodes (because we can filter them out when reading the output by having > also nodemask and mems_allowed printed), and strive only to not miss any > nodes, then this patch could really fix cases when we do miss (although > new_node_page() currently isn't such example). I guess it should be sufficient to add cpuset_print_current_mems_allowed() in warn_alloc. This should give us the full picture without doing too much twiddling. What do you think? -- Michal Hocko SUSE Labs -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wj0-f200.google.com (mail-wj0-f200.google.com [209.85.210.200]) by kanga.kvack.org (Postfix) with ESMTP id 99C5C6B0038 for ; Fri, 13 Jan 2017 10:30:52 -0500 (EST) Received: by mail-wj0-f200.google.com with SMTP id yr2so617077wjc.4 for ; Fri, 13 Jan 2017 07:30:52 -0800 (PST) Received: from mx2.suse.de (mx2.suse.de. [195.135.220.15]) by mx.google.com with ESMTPS id l66si11616098wrc.30.2017.01.13.07.30.51 for (version=TLS1 cipher=AES128-SHA bits=128/128); Fri, 13 Jan 2017 07:30:51 -0800 (PST) Subject: Re: [PATCH 4/4] lib/show_mem.c: teach show_mem to work with the given nodemask References: <20170112131659.23058-1-mhocko@kernel.org> <20170112131659.23058-5-mhocko@kernel.org> <13903870-92bd-1ea2-aefc-0481c850da19@suse.cz> <20170113150834.GN25212@dhcp22.suse.cz> From: Vlastimil Babka Message-ID: Date: Fri, 13 Jan 2017 16:30:49 +0100 MIME-Version: 1.0 In-Reply-To: <20170113150834.GN25212@dhcp22.suse.cz> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: owner-linux-mm@kvack.org List-ID: To: Michal Hocko Cc: linux-mm@kvack.org, Andrew Morton , Johannes Weiner , Mel Gorman , David Rientjes On 01/13/2017 04:08 PM, Michal Hocko wrote: > I guess it should be sufficient to add cpuset_print_current_mems_allowed() > in warn_alloc. This should give us the full picture without doing too > much twiddling. What do you think? Agree! -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f69.google.com (mail-wm0-f69.google.com [74.125.82.69]) by kanga.kvack.org (Postfix) with ESMTP id C52326B0033 for ; Sat, 14 Jan 2017 11:26:19 -0500 (EST) Received: by mail-wm0-f69.google.com with SMTP id c206so21568566wme.3 for ; Sat, 14 Jan 2017 08:26:19 -0800 (PST) Received: from gum.cmpxchg.org (gum.cmpxchg.org. [85.214.110.215]) by mx.google.com with ESMTPS id 82si1306734wmo.19.2017.01.14.08.26.18 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 14 Jan 2017 08:26:18 -0800 (PST) Date: Sat, 14 Jan 2017 11:26:13 -0500 From: Johannes Weiner Subject: Re: [PATCH 1/4] mm, page_alloc: do not report all nodes in show_mem Message-ID: <20170114162613.GE26139@cmpxchg.org> References: <20170112131659.23058-1-mhocko@kernel.org> <20170112131659.23058-2-mhocko@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170112131659.23058-2-mhocko@kernel.org> Sender: owner-linux-mm@kvack.org List-ID: To: Michal Hocko Cc: linux-mm@kvack.org, Andrew Morton , Mel Gorman , David Rientjes , Michal Hocko On Thu, Jan 12, 2017 at 02:16:56PM +0100, Michal Hocko wrote: > From: Michal Hocko > > 599d0c954f91 ("mm, vmscan: move LRU lists to node") has added per numa > node statistics to show_mem but it forgot to add skip_free_areas_node > to fileter out nodes which are outside of the allocating task numa > policy. Add this check to not pollute the output with the pointless > information. > > Signed-off-by: Michal Hocko Acked-by: Johannes Weiner -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f70.google.com (mail-wm0-f70.google.com [74.125.82.70]) by kanga.kvack.org (Postfix) with ESMTP id 8087F6B0033 for ; Sat, 14 Jan 2017 11:29:32 -0500 (EST) Received: by mail-wm0-f70.google.com with SMTP id d140so21596447wmd.4 for ; Sat, 14 Jan 2017 08:29:32 -0800 (PST) Received: from gum.cmpxchg.org (gum.cmpxchg.org. [85.214.110.215]) by mx.google.com with ESMTPS id l2si15278480wrc.6.2017.01.14.08.29.31 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 14 Jan 2017 08:29:31 -0800 (PST) Date: Sat, 14 Jan 2017 11:29:15 -0500 From: Johannes Weiner Subject: Re: [RFC PATCH 3/4] arch, mm: remove arch specific show_mem Message-ID: <20170114162915.GF26139@cmpxchg.org> References: <20170112131659.23058-1-mhocko@kernel.org> <20170112131659.23058-4-mhocko@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170112131659.23058-4-mhocko@kernel.org> Sender: owner-linux-mm@kvack.org List-ID: To: Michal Hocko Cc: linux-mm@kvack.org, Andrew Morton , Mel Gorman , David Rientjes , Michal Hocko , Tony Luck , Fenghua Yu , "James E.J. Bottomley" , Helge Deller , "David S. Miller" , Chris Metcalf , Guan Xuetao , linux-ia64@vger.kernel.org, linux-parisc@vger.kernel.org On Thu, Jan 12, 2017 at 02:16:58PM +0100, Michal Hocko wrote: > From: Michal Hocko > > We have a generic implementation for quite some time already. If there > is any arch specific information to be printed then we should add a > callback called from the generic code rather than duplicate the whole > show_mem. The current code has resulted in the code duplication and > the output divergence which is both confusing and adds maintainance > costs. Let's just get rid of this mess. > > Cc: Tony Luck > Cc: Fenghua Yu > Cc: "James E.J. Bottomley" > Cc: Helge Deller > Cc: "David S. Miller" > Cc: Chris Metcalf > Cc: Guan Xuetao > Cc: linux-ia64@vger.kernel.org > Cc: linux-parisc@vger.kernel.org > Signed-off-by: Michal Hocko Acked-by: Johannes Weiner -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org