From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753292AbcGVJCW (ORCPT ); Fri, 22 Jul 2016 05:02:22 -0400 Received: from szxga01-in.huawei.com ([58.251.152.64]:36525 "EHLO szxga01-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752976AbcGVJCT (ORCPT ); Fri, 22 Jul 2016 05:02:19 -0400 Message-ID: <5791DFD4.5080207@huawei.com> Date: Fri, 22 Jul 2016 16:56:52 +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: "mel@csn.ul.ie" , Vlastimil Babka , "David Rientjes" , Joonsoo Kim , Mel Gorman CC: Linux MM , LKML Subject: mm/compact: why use low watermark to determine whether compact is finished instead of use high watermark? Content-Type: text/plain; charset="ISO-8859-1" 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.0A090205.5791DFE5.004F,ss=1,re=0.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0, ip=0.0.0.0, so=2013-06-18 04:22:30, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: 822a293debfbc271f07871ea61ed584f Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, I find all the watermarks in mm/compaction.c are low_wmark_pages(), so why not use high watermark to determine whether compact is finished? e.g. __alloc_pages_nodemask() get_page_from_freelist() this is fast path, use use low_wmark_pages() in __zone_watermark_ok() __alloc_pages_slowpath() this is slow path, usually use min_wmark_pages() kswapd balance_pgdat() use high_wmark_pages() to determine whether zone is balanced Thanks, Xishi Qiu