[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20171024074436.563sn3hfa5png3jt@dhcp22.suse.cz>
Date: Tue, 24 Oct 2017 09:44:36 +0200
From: Michal Hocko <mhocko@...nel.org>
To: Joonsoo Kim <iamjoonsoo.kim@....com>
Cc: linux-mm@...ck.org, Michael Ellerman <mpe@...erman.id.au>,
Vlastimil Babka <vbabka@...e.cz>,
Andrew Morton <akpm@...ux-foundation.org>,
KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>,
Reza Arbab <arbab@...ux.vnet.ibm.com>,
Yasuaki Ishimatsu <yasu.isimatu@...il.com>,
qiuxishi@...wei.com, Igor Mammedov <imammedo@...hat.com>,
Vitaly Kuznetsov <vkuznets@...hat.com>,
LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 1/2] mm: drop migrate type checks from has_unmovable_pages
On Tue 24-10-17 13:44:23, Joonsoo Kim wrote:
> On Mon, Oct 23, 2017 at 10:10:09AM +0200, Michal Hocko wrote:
[...]
> > My intuitive understanding of set_migratetype_isolate is that it either
> > suceeds and that means that the given pfn range can be isolated for the
> > given type of allocation (be it movable or cma). No new pages will be
> > allocated from this range to allow converging into a free range in a
> > finit amount of time. At least this is how the hotplug code would like
> > to use it and I suppose that the alloc_contig_range would like to
> > guarantee the same to not rely on a fixed amount of migration attempts.
>
> Yes, alloc_contig_range() also want to guarantee the similar thing.
> Major difference between them is 'given pfn range'. memory hotplug
> works by pageblock unit but alloc_contig_range() doesn't.
> alloc_contig_range() works by the page unit. However, there is no easy
> way to isolate individual page so it uses pageblock isolation
> regardless of 'given pfn range'.
I am still confused. So when is it safe to isolate a page from the CMA
pageblock for something that is not a CMA allocation request? Don't we
lose a CMA guanratee that way?
[...]
> > That being said, I would much rather see MIGRATE_CMA case special cased
> > than duplicate the already confusing API but I will not insist of
> > course.
>
> Okay. I atteach the patch. Andrew, could you revert Michal's series
> and apply this patch first? Perhaps, Michal will resend his series on
> top of this one.
I am not convinced about this approach but I will not argue about the
patch though. If this is seen as a right way forward, I will rebase
my patches on top.
--
Michal Hocko
SUSE Labs
Powered by blists - more mailing lists