lkml.org 
[lkml]   [2019]   [Feb]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [RFC PATCH 01/31] mm: migrate: Add exchange_pages to exchange two lists of pages.
Date
On 18 Feb 2019, at 9:42, Vlastimil Babka wrote:

> On 2/18/19 6:31 PM, Zi Yan wrote:
>> The purpose of proposing exchange_pages() is to avoid allocating any
>> new
>> page,
>> so that we would not trigger any potential page reclaim or memory
>> compaction.
>> Allocating a temporary page defeats the purpose.
>
> Compaction can only happen for order > 0 temporary pages. Even if you
> used
> single order = 0 page to gradually exchange e.g. a THP, it should be
> better than
> u64. Allocating order = 0 should be a non-issue. If it's an issue,
> then the
> system is in a bad state and physically contiguous layout is a
> secondary concern.

You are right if we only need to allocate one order-0 page. But this
also means
we can only exchange two pages at a time. We need to add a lock to make
sure
the temporary page is used exclusively or we need to keep allocating
temporary pages
when multiple exchange_pages() are happening at the same time.

--
Best Regards,
Yan Zi

\
 
 \ /
  Last update: 2019-02-18 18:52    [W:0.059 / U:5.100 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site