From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.6 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B31F4C433DF for ; Mon, 10 Aug 2020 22:57:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8B029206DA for ; Mon, 10 Aug 2020 22:57:58 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="DIFc2zWa" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727077AbgHJW55 (ORCPT ); Mon, 10 Aug 2020 18:57:57 -0400 Received: from aserp2120.oracle.com ([141.146.126.78]:40450 "EHLO aserp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726877AbgHJW54 (ORCPT ); Mon, 10 Aug 2020 18:57:56 -0400 Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 07AMunLj104298; Mon, 10 Aug 2020 22:57:48 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=subject : to : cc : references : from : message-id : date : mime-version : in-reply-to : content-type : content-transfer-encoding; s=corp-2020-01-29; bh=VoTpB/AZEZ1NyiicGCY9zKoV6jC5PySZWcVocrNfLk4=; b=DIFc2zWaI3Wsxa9NbUwYXjPrOILBSc25WT3SibYWVMvOPHT7qQz/dgNY/JtQI5NKy7kH rgKCq5KGjt6cjYPOX1zuk6aECASBwABOEc5h9bWKNcuWVLtf+CNhSNYDv9D0JWZoMGtz vwU/uvCp8IpcGk4fHr3Lgu4Q9F1Rr9NXfMwOsh5k9EZMcNUWQfM6RMHrQyI98aY+cMwE rIX81S0NINSfJtEas9X7Ycw3u/fyGCflVnQJFWPOame2WuCJAoGhjJWNtysadrQTCmij twZ85iSD7uqJr3l8BX15yiATtGKBjBpG6h4FaclnVqKQA2M3OVSUt/1GWvaErNeET4x+ IQ== Received: from aserp3030.oracle.com (aserp3030.oracle.com [141.146.126.71]) by aserp2120.oracle.com with ESMTP id 32sm0mheg8-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 10 Aug 2020 22:57:48 +0000 Received: from pps.filterd (aserp3030.oracle.com [127.0.0.1]) by aserp3030.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 07AMrTAx163802; Mon, 10 Aug 2020 22:55:48 GMT Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by aserp3030.oracle.com with ESMTP id 32t5mn9c3k-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 10 Aug 2020 22:55:47 +0000 Received: from abhmp0015.oracle.com (abhmp0015.oracle.com [141.146.116.21]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id 07AMtkda028979; Mon, 10 Aug 2020 22:55:46 GMT Received: from [192.168.2.112] (/50.38.35.18) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 10 Aug 2020 22:55:46 +0000 Subject: Re: [PATCH 08/10] mm/hugetlb: return non-isolated page in the loop instead of break and check To: Wei Yang , akpm@linux-foundation.org Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org References: <20200807091251.12129-1-richard.weiyang@linux.alibaba.com> <20200807091251.12129-9-richard.weiyang@linux.alibaba.com> From: Mike Kravetz Message-ID: Date: Mon, 10 Aug 2020 15:55:45 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <20200807091251.12129-9-richard.weiyang@linux.alibaba.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9709 signatures=668679 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 spamscore=0 mlxscore=0 adultscore=0 malwarescore=0 mlxlogscore=999 phishscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2008100157 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9709 signatures=668679 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 clxscore=1015 suspectscore=0 mlxlogscore=999 priorityscore=1501 adultscore=0 impostorscore=0 spamscore=0 bulkscore=0 mlxscore=0 lowpriorityscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2008100157 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 8/7/20 2:12 AM, Wei Yang wrote: > Function dequeue_huge_page_node_exact() iterates the free list and > return the first non-isolated one. > > Instead of break and check the loop variant, we could return in the loop > directly. This could reduce some redundant check. > > Signed-off-by: Wei Yang I agree with Baoquan He in that this is more of a style change. Certainly there is the potential to avoid an extra check and that is always good. The real value in this patch (IMO) is removal of the stale comment. Reviewed-by: Mike Kravetz -- Mike Kravetz