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=ham 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 BC455C433E0 for ; Mon, 10 Aug 2020 22:57:51 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 7C81B20734 for ; Mon, 10 Aug 2020 22:57:51 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="DIFc2zWa" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7C81B20734 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=oracle.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 187476B0006; Mon, 10 Aug 2020 18:57:51 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 1383E6B0007; Mon, 10 Aug 2020 18:57:51 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 0749F6B0008; Mon, 10 Aug 2020 18:57:51 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0239.hostedemail.com [216.40.44.239]) by kanga.kvack.org (Postfix) with ESMTP id E586D6B0006 for ; Mon, 10 Aug 2020 18:57:50 -0400 (EDT) Received: from smtpin20.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id A7687181AEF00 for ; Mon, 10 Aug 2020 22:57:50 +0000 (UTC) X-FDA: 77136173100.20.vein72_63107ea26fde Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin20.hostedemail.com (Postfix) with ESMTP id 7D94E180C07AB for ; Mon, 10 Aug 2020 22:57:50 +0000 (UTC) X-HE-Tag: vein72_63107ea26fde X-Filterd-Recvd-Size: 4217 Received: from aserp2120.oracle.com (aserp2120.oracle.com [141.146.126.78]) by imf36.hostedemail.com (Postfix) with ESMTP for ; Mon, 10 Aug 2020 22:57:49 +0000 (UTC) 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 X-Rspamd-Queue-Id: 7D94E180C07AB X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam03 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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