From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753477AbcFOIqq (ORCPT ); Wed, 15 Jun 2016 04:46:46 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:38543 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752769AbcFOIqo (ORCPT ); Wed, 15 Jun 2016 04:46:44 -0400 X-IBM-Helo: d28dlp01.in.ibm.com X-IBM-MailFrom: khandual@linux.vnet.ibm.com X-IBM-RcptTo: linux-kernel@vger.kernel.org Date: Wed, 15 Jun 2016 14:16:20 +0530 From: Anshuman Khandual User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Ganesh Mahendran , akpm@linux-foundation.org, vbabka@suse.cz, iamjoonsoo.kim@lge.com, mhocko@suse.com, mina86@mina86.com, minchan@kernel.org CC: linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] mm/compaction: remove unnecessary order check in try_to_compact_pages() References: <1465973568-3496-1-git-send-email-opensource.ganesh@gmail.com> In-Reply-To: <1465973568-3496-1-git-send-email-opensource.ganesh@gmail.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 16061508-4789-0000-0000-000002CB2BD4 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 16061508-4790-0000-0000-0000105D9D89 Message-Id: <576115DC.5030601@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2016-06-15_06:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1604210000 definitions=main-1606150097 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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.