From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753718AbcHPLL2 (ORCPT ); Tue, 16 Aug 2016 07:11:28 -0400 Received: from mail-wm0-f66.google.com ([74.125.82.66]:34314 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753267AbcHPLKp (ORCPT ); Tue, 16 Aug 2016 07:10:45 -0400 Date: Tue, 16 Aug 2016 13:10:13 +0200 From: Michal Hocko To: Vlastimil Babka Cc: Xishi Qiu , 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 Message-ID: <20160816111012.GE17417@dhcp22.suse.cz> References: <57A325CA.9050707@huawei.com> <57A3260F.4050709@huawei.com> <20160816084132.GA17417@dhcp22.suse.cz> <57B2D556.5030201@huawei.com> <20160816092345.GB17417@dhcp22.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.6.0 (2016-04-01) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue 16-08-16 12:12:07, 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). You are right! gfp_zone would disabllow movable zones from the zone list. So we indeed cannot leak the unmovable allocation to the movable zone and then this doesn't really sound all that important to bother with stable backport. It would be really great to have this all in the changelog. This code is far from straightforward so having some assistance from the changelog is more than welcome. -- Michal Hocko SUSE Labs