From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752549AbbAaIcF (ORCPT ); Sat, 31 Jan 2015 03:32:05 -0500 Received: from cantor2.suse.de ([195.135.220.15]:51363 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751213AbbAaIcB (ORCPT ); Sat, 31 Jan 2015 03:32:01 -0500 Message-ID: <54CC92FD.5000601@suse.cz> Date: Sat, 31 Jan 2015 09:31:57 +0100 From: Vlastimil Babka User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: Zhang Yanfei , Joonsoo Kim , Andrew Morton CC: Mel Gorman , David Rientjes , Rik van Riel , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Joonsoo Kim Subject: Re: [PATCH v2 2/4] mm/compaction: stop the isolation when we isolate enough freepage References: <1422621252-29859-1-git-send-email-iamjoonsoo.kim@lge.com> <1422621252-29859-3-git-send-email-iamjoonsoo.kim@lge.com> In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 01/31/2015 08:49 AM, Zhang Yanfei wrote: > Hello, > > At 2015/1/30 20:34, Joonsoo Kim wrote: > > Reviewed-by: Zhang Yanfei > > IMHO, the patch making the free scanner move slower makes both scanners > meet further. Before this patch, if we isolate too many free pages and even > after we release the unneeded free pages later the free scanner still already > be there and will be moved forward again next time -- the free scanner just > cannot be moved back to grab the free pages we released before no matter where > the free pages in, pcp or buddy. It can be actually moved back. If we are releasing free pages, it means the current compaction is terminating, and it will set zone->compact_cached_free_pfn back to the position of the released free page that was furthest back. The next compaction will start from the cached free pfn. It is however possible that another compaction runs in parallel and has progressed further and overwrites the cached free pfn.