From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754020AbbHNH4H (ORCPT ); Fri, 14 Aug 2015 03:56:07 -0400 Received: from szxga02-in.huawei.com ([119.145.14.65]:41491 "EHLO szxga02-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753283AbbHNH4F (ORCPT ); Fri, 14 Aug 2015 03:56:05 -0400 Message-ID: <55CD9EDF.5090707@huawei.com> Date: Fri, 14 Aug 2015 15:55:11 +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: Dave Hansen CC: Andrew Morton , Mel Gorman , Vlastimil Babka , Johannes Weiner , Michal Hocko , , , , Linux MM , LKML Subject: Re: [PATCH] mm: add the block to the tail of the list in expand() References: <55BB4027.7080200@huawei.com> <55BC0392.2070205@intel.com> <55BECC85.7050206@huawei.com> <55BEE99E.8090901@intel.com> <55C011A6.1090003@huawei.com> <55C0CBC3.2000602@intel.com> <55C1C132.2010805@huawei.com> <55C221EB.7060500@intel.com> In-Reply-To: <55C221EB.7060500@intel.com> Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.177.25.179] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2015/8/5 22:47, Dave Hansen wrote: > On 08/05/2015 12:54 AM, Xishi Qiu wrote: >> I add some debug code like this, but it doesn't trigger the dump_stack(). > ... >> + if (!list_empty(&area->free_list[migratetype])) { >> + printk("expand(), the list is not empty\n"); >> + dump_stack(); >> + } >> + > > That will probably not trigger unless you have allocations that are > falling back and converting other pageblocks from other migratetypes. > Hi Dave, I run some stress test, and trigger the print, it shows that the list is not empty. The reason is than fallback will find the largest possible block of pages in the other list, e.g. 1. we alloc order=2 block, and call __rmqueue_fallback(). 2. we find other list current_order=7 is not empty, and the lists(in the same pageblock) that order from 3~6 are not empty too. 3. then expand() will find the list is not empty. right? Thanks, Xishi Qiu > . >