From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753360AbdBNQfT (ORCPT ); Tue, 14 Feb 2017 11:35:19 -0500 Received: from gum.cmpxchg.org ([85.214.110.215]:35260 "EHLO gum.cmpxchg.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753126AbdBNQfH (ORCPT ); Tue, 14 Feb 2017 11:35:07 -0500 Date: Tue, 14 Feb 2017 11:34:53 -0500 From: Johannes Weiner To: Vlastimil Babka Cc: linux-mm@kvack.org, Joonsoo Kim , David Rientjes , Mel Gorman , linux-kernel@vger.kernel.org, kernel-team@fb.com Subject: Re: [PATCH v2 02/10] mm, compaction: remove redundant watermark check in compact_finished() Message-ID: <20170214163453.GC2450@cmpxchg.org> References: <20170210172343.30283-1-vbabka@suse.cz> <20170210172343.30283-3-vbabka@suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170210172343.30283-3-vbabka@suse.cz> User-Agent: Mutt/1.7.2 (2016-11-26) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Feb 10, 2017 at 06:23:35PM +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. > > - 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. > > This patch therefore removes the watermark check. This should save some cycles > and terminate compaction sooner in some cases. > > Signed-off-by: Vlastimil Babka Acked-by: Johannes Weiner