Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751183AbdCPB3E (ORCPT ); Wed, 15 Mar 2017 21:29:04 -0400 Received: from LGEAMRELO12.lge.com ([156.147.23.52]:55765 "EHLO lgeamrelo12.lge.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750912AbdCPB3C (ORCPT ); Wed, 15 Mar 2017 21:29:02 -0400 X-Original-SENDERIP: 156.147.1.151 X-Original-MAILFROM: iamjoonsoo.kim@lge.com X-Original-SENDERIP: 165.244.249.25 X-Original-MAILFROM: iamjoonsoo.kim@lge.com X-Original-SENDERIP: 10.177.222.138 X-Original-MAILFROM: iamjoonsoo.kim@lge.com Date: Thu, 16 Mar 2017 10:30:19 +0900 From: Joonsoo Kim To: Vlastimil Babka CC: Andrew Morton , , , Johannes Weiner , Mel Gorman , David Rientjes , , Subject: Re: [PATCH v3 2/8] mm, compaction: remove redundant watermark check in compact_finished() Message-ID: <20170316013018.GA14063@js1304-P5Q-DELUXE> References: <20170307131545.28577-1-vbabka@suse.cz> <20170307131545.28577-3-vbabka@suse.cz> MIME-Version: 1.0 In-Reply-To: <20170307131545.28577-3-vbabka@suse.cz> User-Agent: Mutt/1.5.21 (2010-09-15) X-MIMETrack: Itemize by SMTP Server on LGEKRMHUB07/LGE/LG Group(Release 8.5.3FP6|November 21, 2013) at 2017/03/16 10:28:47, Serialize by Router on LGEKRMHUB07/LGE/LG Group(Release 8.5.3FP6|November 21, 2013) at 2017/03/16 10:28:48, Serialize complete at 2017/03/16 10:28:48 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1256 Lines: 27 Hello, On Tue, Mar 07, 2017 at 02:15:39PM +0100, Vlastimil Babka wrote: > When detecting whether compaction has succeeded in forming a high-order page, > __compact_finished() employs a watermark check, followed by an own search for > a suitable page in the freelists. This is not ideal for two reasons: > > - The watermark check also searches high-order freelists, but has a less strict > criteria wrt fallback. It's therefore redundant and waste of cycles. This was > different in the past when high-order watermark check attempted to apply > reserves to high-order pages. Although it looks redundant now, I don't like removal of the watermark check here. Criteria in watermark check would be changed to more strict later and we would easily miss to apply it on compaction side if the watermark check is removed. > > - The watermark check might actually fail due to lack of order-0 pages. > Compaction can't help with that, so there's no point in continuing because of > that. It's possible that high-order page still exists and it terminates. If lack of order-0 pages is the reason for stopping compaction, we need to insert the watermark check for order-0 to break the compaction instead of removing it. Am I missing something? Thanks.