lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Wed, 3 Aug 2016 14:13:10 -0500 From: Reza Arbab <arbab@...ux.vnet.ibm.com> To: Mel Gorman <mgorman@...hsingularity.net> Cc: Andrew Morton <akpm@...ux-foundation.org>, Linux-MM <linux-mm@...ck.org>, Rik van Riel <riel@...riel.com>, Vlastimil Babka <vbabka@...e.cz>, Johannes Weiner <hannes@...xchg.org>, Minchan Kim <minchan@...nel.org>, Joonsoo Kim <iamjoonsoo.kim@....com>, LKML <linux-kernel@...r.kernel.org> Subject: Re: [PATCH 01/34] mm, vmstat: add infrastructure for per-node vmstats On Fri, Jul 08, 2016 at 10:34:37AM +0100, Mel Gorman wrote: > void refresh_zone_stat_thresholds(void) > { [...] >+ /* Zero current pgdat thresholds */ >+ for_each_online_pgdat(pgdat) { >+ for_each_online_cpu(cpu) { >+ per_cpu_ptr(pgdat->per_cpu_nodestats, cpu)->stat_threshold = 0; >+ } >+ } I am oopsing here, for a node whose pgdat->per_cpu_nodestats is NULL. The node in question is memoryless, so in setup_per_cpu_pageset(), the loop over its populated zones doesn't run, and the per_cpu_nodestat struct isn't allocated. This patch fixes things for me: diff --git a/mm/page_alloc.c b/mm/page_alloc.c index ea759b9..5221e17 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -5271,9 +5271,17 @@ static void __meminit setup_zone_pageset(struct zone *zone) void __init setup_per_cpu_pageset(void) { struct zone *zone; + struct pglist_data *pgdat; for_each_populated_zone(zone) setup_zone_pageset(zone); + + for_each_online_pgdat(pgdat) { + if (!pgdat->per_cpu_nodestats) { + pgdat->per_cpu_nodestats = + alloc_percpu(struct per_cpu_nodestat); + } + } } static noinline __init_refok -- Reza Arbab
Powered by blists - more mailing lists