From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751573AbcFXU6l (ORCPT ); Fri, 24 Jun 2016 16:58:41 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:40528 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751308AbcFXU6k (ORCPT ); Fri, 24 Jun 2016 16:58:40 -0400 Date: Fri, 24 Jun 2016 13:58:39 -0700 From: Andrew Morton To: Anshuman Khandual Cc: Ganesh Mahendran , vbabka@suse.cz, iamjoonsoo.kim@lge.com, mhocko@suse.com, mina86@mina86.com, minchan@kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] mm/compaction: remove unnecessary order check in try_to_compact_pages() Message-Id: <20160624135839.d27727e6ba9ab4b4aff0cc32@linux-foundation.org> In-Reply-To: <576115DC.5030601@linux.vnet.ibm.com> References: <1465973568-3496-1-git-send-email-opensource.ganesh@gmail.com> <576115DC.5030601@linux.vnet.ibm.com> X-Mailer: Sylpheed 3.4.1 (GTK+ 2.24.23; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 15 Jun 2016 14:16:20 +0530 Anshuman Khandual wrote: > On 06/15/2016 12:22 PM, Ganesh Mahendran wrote: > > The caller __alloc_pages_direct_compact() already check (order == 0). > > So no need to check again. > > Yeah, the caller (__alloc_pages_direct_compact) checks if the order of > allocation is 0. But we can remove it there and keep it in here as this > is the actual entry point for direct page compaction. I think the check in __alloc_pages_direct_compact() is OK - it's a bit silly to do a (small) bunch of additional work in __alloc_pages_direct_compact() when orer==0.