Return-Path: Date: Mon, 5 Nov 2018 10:35:50 +0100 From: Michal Hocko To: Baoquan He Cc: Andrew Morton , linux-mm@kvack.org, LKML , Stable tree Subject: Re: [PATCH] mm, memory_hotplug: teach has_unmovable_pages about of LRU migrateable pages Message-ID: <20181105093550.GE4361@dhcp22.suse.cz> References: <20181101091055.GA15166@MiWiFi-R3L-srv> <20181102155528.20358-1-mhocko@kernel.org> <20181105002009.GF27491@MiWiFi-R3L-srv> <20181105091407.GB4361@dhcp22.suse.cz> <20181105092618.GI27491@MiWiFi-R3L-srv> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181105092618.GI27491@MiWiFi-R3L-srv> Sender: owner-linux-mm@kvack.org List-ID: On Mon 05-11-18 17:26:18, Baoquan He wrote: [...] > diff --git a/mm/page_alloc.c b/mm/page_alloc.c > index a919ba5..021e39d 100644 > --- a/mm/page_alloc.c > +++ b/mm/page_alloc.c > @@ -7824,7 +7824,8 @@ bool has_unmovable_pages(struct zone *zone, struct page *page, int count, > if (__PageMovable(page)) > continue; > > - if (!PageLRU(page)) > + if (!PageLRU(page) && > + (get_pageblock_migratetype(page) != MIGRATE_MOVABLE)) > found++; > /* > * If there are RECLAIMABLE pages, we need to check As explained during the private conversion I am not really thrilled by this check. AFAIU this will be the case for basically all pages in the zone_movable. As we have seen already some unexpected ones can lurk in easily. -- Michal Hocko SUSE Labs