[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190919003047.GA20697@richard>
Date: Thu, 19 Sep 2019 08:30:47 +0800
From: Wei Yang <richardw.yang@...ux.intel.com>
To: Yunfeng Ye <yeyunfeng@...wei.com>
Cc: Wei Yang <richardw.yang@...ux.intel.com>, rppt@...ux.ibm.com,
akpm@...ux-foundation.org, osalvador@...e.de, mhocko@...e.co,
dan.j.williams@...el.com, david@...hat.com, cai@....pw,
linux-mm@...ck.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mm: Support memblock alloc on the exact node for
sparse_buffer_init()
On Wed, Sep 18, 2019 at 03:08:41PM +0800, Yunfeng Ye wrote:
>
>
>On 2019/9/18 14:51, Wei Yang wrote:
>> On Wed, Sep 18, 2019 at 12:22:29PM +0800, Yunfeng Ye wrote:
>>> Currently, when memblock_find_in_range_node() fail on the exact node, it
>>> will use %NUMA_NO_NODE to find memblock from other nodes. At present,
>>> the work is good, but when the large memory is insufficient and the
>>> small memory is enough, we want to allocate the small memory of this
>>> node first, and do not need to allocate large memory from other nodes.
>>>
>>> In sparse_buffer_init(), it will prepare large chunks of memory for page
>>> structure. The page management structure requires a lot of memory, but
>>> if the node does not have enough memory, it can be converted to a small
>>> memory allocation without having to allocate it from other nodes.
>>>
>>> Add %MEMBLOCK_ALLOC_EXACT_NODE flag for this situation. Normally, the
>>> behavior is the same with %MEMBLOCK_ALLOC_ACCESSIBLE, only that it will
>>> not allocate from other nodes when a single node fails to allocate.
>>>
>>> If large contiguous block memory allocated fail in sparse_buffer_init(),
>>> it will allocates small block memmory section by section later.
>>>
>>
>> Looks this changes current behavior even it fall back to section based
>> allocation.
>>
>When fall back to section allocation, it still use %MEMBLOCK_ALLOC_ACCESSIBLE
>,I think the behavior is not change, Can you tell me the detail about the
>changes. thanks.
>
You pass MEMBLOCK_ALLOC_EXACT_NODE for the first round allocation, which
forbid it allocates from other node. This is different from current behavior.
Am I right?
Powered by blists - more mailing lists