Commit 89c7c402 authored by Daniel Jordan's avatar Daniel Jordan Committed by Linus Torvalds

mm: don't track number of pages during deferred initialization

Deferred page init used to report the number of pages initialized:

  node 0 initialised, 32439114 pages in 97ms

Tracking this makes the code more complicated when using multiple threads.
Given that the statistic probably has limited value, especially since a
zone grows on demand so that the page count can vary, just remove it.

The boot message now looks like

  node 0 deferred pages initialised in 97ms
Suggested-by: default avatarAlexander Duyck <alexander.h.duyck@linux.intel.com>
Signed-off-by: default avatarDaniel Jordan <daniel.m.jordan@oracle.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Reviewed-by: default avatarAlexander Duyck <alexander.h.duyck@linux.intel.com>
Cc: Alex Williamson <alex.williamson@redhat.com>
Cc: Dan Williams <dan.j.williams@intel.com>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: David Hildenbrand <david@redhat.com>
Cc: Herbert Xu <herbert@gondor.apana.org.au>
Cc: Jason Gunthorpe <jgg@ziepe.ca>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Josh Triplett <josh@joshtriplett.org>
Cc: Kirill Tkhai <ktkhai@virtuozzo.com>
Cc: Michal Hocko <mhocko@kernel.org>
Cc: Pavel Machek <pavel@ucw.cz>
Cc: Pavel Tatashin <pasha.tatashin@soleen.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Randy Dunlap <rdunlap@infradead.org>
Cc: Robert Elliott <elliott@hpe.com>
Cc: Shile Zhang <shile.zhang@linux.alibaba.com>
Cc: Steffen Klassert <steffen.klassert@secunet.com>
Cc: Steven Sistare <steven.sistare@oracle.com>
Cc: Tejun Heo <tj@kernel.org>
Cc: Zi Yan <ziy@nvidia.com>
Link: http://lkml.kernel.org/r/20200527173608.2885243-6-daniel.m.jordan@oracle.comSigned-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 004ed426
...@@ -1820,7 +1820,7 @@ static int __init deferred_init_memmap(void *data) ...@@ -1820,7 +1820,7 @@ static int __init deferred_init_memmap(void *data)
{ {
pg_data_t *pgdat = data; pg_data_t *pgdat = data;
const struct cpumask *cpumask = cpumask_of_node(pgdat->node_id); const struct cpumask *cpumask = cpumask_of_node(pgdat->node_id);
unsigned long spfn = 0, epfn = 0, nr_pages = 0; unsigned long spfn = 0, epfn = 0;
unsigned long first_init_pfn, flags; unsigned long first_init_pfn, flags;
unsigned long start = jiffies; unsigned long start = jiffies;
struct zone *zone; struct zone *zone;
...@@ -1869,15 +1869,15 @@ static int __init deferred_init_memmap(void *data) ...@@ -1869,15 +1869,15 @@ static int __init deferred_init_memmap(void *data)
* allocator. * allocator.
*/ */
while (spfn < epfn) { while (spfn < epfn) {
nr_pages += deferred_init_maxorder(&i, zone, &spfn, &epfn); deferred_init_maxorder(&i, zone, &spfn, &epfn);
cond_resched(); cond_resched();
} }
zone_empty: zone_empty:
/* Sanity check that the next zone really is unpopulated */ /* Sanity check that the next zone really is unpopulated */
WARN_ON(++zid < MAX_NR_ZONES && populated_zone(++zone)); WARN_ON(++zid < MAX_NR_ZONES && populated_zone(++zone));
pr_info("node %d initialised, %lu pages in %ums\n", pr_info("node %d deferred pages initialised in %ums\n",
pgdat->node_id, nr_pages, jiffies_to_msecs(jiffies - start)); pgdat->node_id, jiffies_to_msecs(jiffies - start));
pgdat_init_report_one_done(); pgdat_init_report_one_done();
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment