[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180214050843.GA2811@jagdpanzerIV>
Date: Wed, 14 Feb 2018 14:08:43 +0900
From: Sergey Senozhatsky <sergey.senozhatsky.work@...il.com>
To: Pavel Tatashin <pasha.tatashin@...cle.com>
Cc: steven.sistare@...cle.com, daniel.m.jordan@...cle.com,
m.mizuma@...fujitsu.com, akpm@...ux-foundation.org,
mhocko@...e.com, catalin.marinas@....com,
takahiro.akashi@...aro.org, gi-oh.kim@...fitbricks.com,
heiko.carstens@...ibm.com, baiyaowei@...s.chinamobile.com,
richard.weiyang@...il.com, paul.burton@...s.com,
miles.chen@...iatek.com, vbabka@...e.cz, mgorman@...e.de,
hannes@...xchg.org, linux-kernel@...r.kernel.org,
linux-mm@...ck.org
Subject: Re: [PATCH v3 1/1] mm: initialize pages on demand during boot
On (02/09/18 14:22), Pavel Tatashin wrote:
[..]
> +/*
> + * If this zone has deferred pages, try to grow it by initializing enough
> + * deferred pages to satisfy the allocation specified by order, rounded up to
> + * the nearest PAGES_PER_SECTION boundary. So we're adding memory in increments
> + * of SECTION_SIZE bytes by initializing struct pages in increments of
> + * PAGES_PER_SECTION * sizeof(struct page) bytes.
> + *
> + * Return true when zone was grown by at least number of pages specified by
> + * order. Otherwise return false.
> + *
> + * Note: We use noinline because this function is needed only during boot, and
> + * it is called from a __ref function _deferred_grow_zone. This way we are
> + * making sure that it is not inlined into permanent text section.
> + */
> +static noinline bool __init
> +deferred_grow_zone(struct zone *zone, unsigned int order)
> +{
> + int zid = zone_idx(zone);
> + int nid = zone->node;
^^^^^^^^^
Should be CONFIG_NUMA dependent
struct zone {
...
#ifdef CONFIG_NUMA
int node;
#endif
...
-ss
Powered by blists - more mailing lists