[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180702034221.GR3223@MiWiFi-R3L-srv>
Date: Mon, 2 Jul 2018 11:42:21 +0800
From: Baoquan He <bhe@...hat.com>
To: Pavel Tatashin <pasha.tatashin@...cle.com>
Cc: Steven Sistare <steven.sistare@...cle.com>,
Daniel Jordan <daniel.m.jordan@...cle.com>,
LKML <linux-kernel@...r.kernel.org>,
Andrew Morton <akpm@...ux-foundation.org>,
kirill.shutemov@...ux.intel.com, Michal Hocko <mhocko@...e.com>,
Linux Memory Management List <linux-mm@...ck.org>,
dan.j.williams@...el.com, jack@...e.cz, jglisse@...hat.com,
Souptick Joarder <jrdr.linux@...il.com>,
gregkh@...uxfoundation.org, Vlastimil Babka <vbabka@...e.cz>,
Wei Yang <richard.weiyang@...il.com>, dave.hansen@...el.com,
rientjes@...gle.com, mingo@...nel.org, osalvador@...hadventures.net
Subject: Re: [PATCH v3 1/2] mm/sparse: add sparse_init_nid()
On 07/01/18 at 11:28pm, Pavel Tatashin wrote:
> > > So, on the first failure, we even stop trying to populate other
> > > sections. No more memory to do so.
> >
> > This is the thing I worry about. In old sparse_mem_maps_populate_node()
> > you can see, when not present or failed to populate, just continue. This
> > is the main difference between yours and the old code. The key logic is
> > changed here.
> >
>
> I do not see how we can succeed after the first failure. We still
> allocate from the same node:
>
> sparse_mem_map_populate() may fail only if we could not allocate large
> enough buffer vmemmap_buf_start earlier.
>
> This means that in:
> sparse_mem_map_populate()
> vmemmap_populate()
> vmemmap_populate_hugepages()
> vmemmap_alloc_block_buf() (no buffer, so call allocator)
> vmemmap_alloc_block(size, node);
> __earlyonly_bootmem_alloc(node, size, size, __pa(MAX_DMA_ADDRESS));
> memblock_virt_alloc_try_nid_raw() -> Nothing changes for
> this call to succeed. So, all consequent calls to
> sparse_mem_map_populate() in this node will fail as well.
Yes, you are right, it's improvement. Thanks.
>
> > >
> > Forgot mentioning it's the vervion in mm/sparse-vmemmap.c
>
> Sorry, I do not understand what is vervion.
Typo, 'version', should be. Sorry for that.
Powered by blists - more mailing lists