From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751769AbcHPGkq (ORCPT ); Tue, 16 Aug 2016 02:40:46 -0400 Received: from LGEAMRELO13.lge.com ([156.147.23.53]:37752 "EHLO lgeamrelo13.lge.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750940AbcHPGkp (ORCPT ); Tue, 16 Aug 2016 02:40:45 -0400 X-Original-SENDERIP: 156.147.1.126 X-Original-MAILFROM: iamjoonsoo.kim@lge.com X-Original-SENDERIP: 10.177.222.138 X-Original-MAILFROM: iamjoonsoo.kim@lge.com Date: Tue, 16 Aug 2016 15:46:31 +0900 From: Joonsoo Kim To: Vlastimil Babka Cc: Andrew Morton , Michal Hocko , Mel Gorman , David Rientjes , Rik van Riel , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v6 10/11] mm, compaction: require only min watermarks for non-costly orders Message-ID: <20160816064630.GH17448@js1304-P5Q-DELUXE> References: <20160810091226.6709-1-vbabka@suse.cz> <20160810091226.6709-11-vbabka@suse.cz> <20160816061636.GF17448@js1304-P5Q-DELUXE> <484d17e5-7294-4724-f5f9-0a15167d47ee@suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <484d17e5-7294-4724-f5f9-0a15167d47ee@suse.cz> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Aug 16, 2016 at 08:36:12AM +0200, Vlastimil Babka wrote: > On 08/16/2016 08:16 AM, Joonsoo Kim wrote: > >On Wed, Aug 10, 2016 at 11:12:25AM +0200, Vlastimil Babka wrote: > >>diff --git a/mm/page_alloc.c b/mm/page_alloc.c > >>index 621e4211ce16..a5c0f914ec00 100644 > >>--- a/mm/page_alloc.c > >>+++ b/mm/page_alloc.c > >>@@ -2492,7 +2492,7 @@ int __isolate_free_page(struct page *page, unsigned int order) > >> > >> if (!is_migrate_isolate(mt)) { > >> /* Obey watermarks as if the page was being allocated */ > >>- watermark = low_wmark_pages(zone) + (1 << order); > >>+ watermark = min_wmark_pages(zone) + (1UL << order); > > > >This '1 << order' also needs some comment. Why can't we use > >compact_gap() in this case? > > This is just short-cutting the high-order watermark check to check > only order-0, because we already know the high-order page exists. > We can't use compact_gap() as that's too high to use for a single > allocation watermark, since we can be already holding some free > pages on the list. So it would defeat the gap purpose. Oops. I missed that. Thanks for clarifying it. Thanks.