Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1456020
| From | Reza Arbab <arbab@linux.vnet.ibm.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 01/34] mm, vmstat: add infrastructure for per-node vmstats |
| Date | 2016-08-03 22:50 +0200 |
| Message-ID | <s2bgZ-7xN-5@gated-at.bofh.it> (permalink) |
| References | <rSAqm-2Tv-3@gated-at.bofh.it> <rSAqm-2Tv-25@gated-at.bofh.it> |
| Organization | IBM Linux Technology Center |
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
Back to linux.kernel | Previous | Next | Find similar | Unroll thread
Re: [PATCH 01/34] mm, vmstat: add infrastructure for per-node vmstats Reza Arbab <arbab@linux.vnet.ibm.com> - 2016-08-03 22:50 +0200
csiph-web