[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87acc80a-8a9a-5037-8efc-9bb64ddaaffb@intel.com>
Date: Thu, 1 Feb 2018 06:15:45 -0800
From: Dave Hansen <dave.hansen@...el.com>
To: Baoquan He <bhe@...hat.com>, linux-kernel@...r.kernel.org
Cc: linux-mm@...ck.org, akpm@...ux-foundation.org,
kirill.shutemov@...ux.intel.com, mhocko@...e.com,
tglx@...utronix.de, douly.fnst@...fujitsu.com
Subject: Re: [PATCH 1/2] mm/sparsemem: Defer the ms->section_mem_map clearing
a little later
On 01/31/2018 11:19 PM, Baoquan He wrote:
> for_each_present_section_nr(0, pnum) {
> + struct mem_section *ms;
> + ms = __nr_to_section(pnum);
> usemap = usemap_map[pnum];
> - if (!usemap)
> + if (!usemap) {
> +#ifdef CONFIG_SPARSEMEM_ALLOC_MEM_MAP_TOGETHER
> + ms->section_mem_map = 0;
> +#endif
> continue;
> + }
>
> #ifdef CONFIG_SPARSEMEM_ALLOC_MEM_MAP_TOGETHER
> map = map_map[pnum];
> #else
> map = sparse_early_mem_map_alloc(pnum);
> #endif
> - if (!map)
> + if (!map) {
> +#ifdef CONFIG_SPARSEMEM_ALLOC_MEM_MAP_TOGETHER
> + ms->section_mem_map = 0;
> +#endif
> continue;
> + }
This is starting to look like code that only a mother could love. Can
this be cleaned up a bit?
Powered by blists - more mailing lists