From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753163AbcHPKVS (ORCPT ); Tue, 16 Aug 2016 06:21:18 -0400 Received: from szxga03-in.huawei.com ([119.145.14.66]:52591 "EHLO szxga03-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750928AbcHPKVR (ORCPT ); Tue, 16 Aug 2016 06:21:17 -0400 Message-ID: <57B2E8F8.8080408@huawei.com> Date: Tue, 16 Aug 2016 18:20:40 +0800 From: Xishi Qiu User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:12.0) Gecko/20120428 Thunderbird/12.0.1 MIME-Version: 1.0 To: Vlastimil Babka , Michal Hocko CC: Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , Mel Gorman , Andrew Morton , David Rientjes , Joonsoo Kim , Taku Izumi , "'Kirill A . Shutemov'" , Kamezawa Hiroyuki , Linux MM , LKML Subject: Re: [PATCH 1/3] mm: fix set pageblock migratetype in deferred struct page init References: <57A325CA.9050707@huawei.com> <57A3260F.4050709@huawei.com> <20160816084132.GA17417@dhcp22.suse.cz> <57B2D556.5030201@huawei.com> <20160816092345.GB17417@dhcp22.suse.cz> In-Reply-To: Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.177.25.179] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A020201.57B2E910.0105,ss=1,re=0.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0, ip=0.0.0.0, so=2013-05-26 15:14:31, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: 70e9d26c47df41f341321da50cdfff83 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2016/8/16 18:12, Vlastimil Babka wrote: > On 08/16/2016 11:23 AM, Michal Hocko wrote: >> On Tue 16-08-16 16:56:54, Xishi Qiu wrote: >>> On 2016/8/16 16:41, Michal Hocko wrote: >>> >>>> On Thu 04-08-16 19:25:03, Xishi Qiu wrote: >>>>> MAX_ORDER_NR_PAGES is usually 4M, and a pageblock is usually 2M, so we only >>>>> set one pageblock's migratetype in deferred_free_range() if pfn is aligned >>>>> to MAX_ORDER_NR_PAGES. >>>> >>>> Do I read the changelog correctly and the bug causes leaking unmovable >>>> allocations into movable zones? >>> >>> Hi Michal, >>> >>> This bug will cause uninitialized migratetype, you can see from >>> "cat /proc/pagetypeinfo", almost half blocks are Unmovable. >> >> Please add that information to the changelog. Leaking unmovable >> allocations to the movable zones defeats the whole purpose of the >> movable zone so I guess we really want to mark this for stable. > > Note that it's not as severe. Pageblock migratetype is just heuristic against fragmentation. It should not allow unmovable allocations from movable zones (although I can't find what really does govern it). > Yes, leaking unmovable migratetype to movable zone is fine for mem-offline, we will check every page in offline_pages(). But as I pointed that we missed to free the last block in deferred_init_memmap(), this will lead to mem-offline fail. Thanks, Xishi Qiu >> AFAICS it should also note: >> Fixes: ac5d2539b238 ("mm: meminit: reduce number of times pageblocks are set during struct page init") >> and stable 4.2+ > > > > > . >