Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp2036522pxk; Tue, 1 Sep 2020 14:07:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwlq950aCbS8fohv5holxYzYaePOm9GxrhsUT/FmzmqM02gx9Yk8RAUimYc5CCMODMTUWHS X-Received: by 2002:a50:be82:: with SMTP id b2mr3622236edk.303.1598994425325; Tue, 01 Sep 2020 14:07:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598994425; cv=none; d=google.com; s=arc-20160816; b=UVcgI5uwkPCoUYZBLnWaE7a5uraFXlu+jB8aPPt4iFloFPrqpLKKRpejQyKCk6vbox QNM30jfjPiiRiNCl/IMQb0f+hOBtopwo7qQquG/a5cmJUwdkDZ7WScCndwu2tF+y+p0Y 6tNuCwx46/8ryJoTrrZV7DQlqke/1b/VCRiUxTNWFElXtJnw/0H/Gd8Kim+fbygpn0tg ZqPcmVnQcXHVkQ/qpFIyZyqvP/MVzUbevKo1Whsyly2pAD20BnXnBrDZL3sUrP5bbrDI 1EmrQHXa5e+XnFyum/yHY5WJYP+hBFZWeIKQXOylD6qk0OdbJhpYj04id2Zzc9diTJrP 7qDQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=nXG4/CL+hVOi2jIopJ0MFc0Agwfhg8ZWSwan1tEwxp4=; b=f08QcxMbR8yWLTSR8XM91vhYEd6lqc0N03aD1loKXab61Uwkg0spj3W/zqkm52zTck 86Sz5YuUw90pqzaU0XhGklz41GxKHvkaztsJeFq82UpeEWr0tO7WTpNQE+FWvyiZNHu8 QGgX5c84UAePRGs37SQ9o11cOHkMeguKskFtR1OFZ91358KKFnBIlLQ2U/HqG/VjUe2K Xx/BvpJscfL5PyPaks/mbvpDHwHmJT7TexCpiGvCw/LMUItcjq4MwcSUYDEEpMPeM1Sz 5oe/JiZXPJKg8FiLZDQ3JkU5tvfpPdCSgpYeAhwx3mTBKHMOm33mjssqda+cDkquk8RI L2CA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2020-01-29 header.b=EVBdaelk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q24si1280373edb.85.2020.09.01.14.06.40; Tue, 01 Sep 2020 14:07:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2020-01-29 header.b=EVBdaelk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729328AbgIAVFQ (ORCPT + 99 others); Tue, 1 Sep 2020 17:05:16 -0400 Received: from userp2120.oracle.com ([156.151.31.85]:37374 "EHLO userp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726355AbgIAVFN (ORCPT ); Tue, 1 Sep 2020 17:05:13 -0400 Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 081L3Z2O178125; Tue, 1 Sep 2020 21:05:04 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=nXG4/CL+hVOi2jIopJ0MFc0Agwfhg8ZWSwan1tEwxp4=; b=EVBdaelk/wBjPsGKV4go/ME7XRFrsAWxDVSpr6FSNW5MF+HmUPfM8vRl4CVxcXQTdCTS hiZkFOw2UUmRxkwUkvld8+313wUpezgN71VXwPIXV86uMGVKeRj7fqPQhkx84ZUVbZ3C PKkC/j4VovMpniWbFPgUmN2g+q3DZsY9ZRFwzzow0YRir6SwXGWM7ix4jeY71SzIbJIf Jv6umT0S65S50y1RF/dGJqe/gnwA22qtBxg+plfUgBFqPD6geKWGImQYU1ukWayiCIno oIeJVO7lJf9gH0bhmMeVH+aQowLPEkeBylHwGPzukzV9lRbdR9ugEclJrKbZLms/Uy6z 5Q== Received: from userp3020.oracle.com (userp3020.oracle.com [156.151.31.79]) by userp2120.oracle.com with ESMTP id 339dmmwbu7-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 01 Sep 2020 21:05:03 +0000 Received: from pps.filterd (userp3020.oracle.com [127.0.0.1]) by userp3020.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 081L51n4054616; Tue, 1 Sep 2020 21:05:03 GMT Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by userp3020.oracle.com with ESMTP id 3380ssjgr9-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 01 Sep 2020 21:05:03 +0000 Received: from abhmp0007.oracle.com (abhmp0007.oracle.com [141.146.116.13]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id 081L51Uf014522; Tue, 1 Sep 2020 21:05:02 GMT Received: from [192.168.2.112] (/50.38.35.18) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 01 Sep 2020 14:05:01 -0700 Subject: Re: [Patch v4 7/7] mm/hugetlb: take the free hpage during the iteration directly To: Wei Yang , akpm@linux-foundation.org Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, bhe@redhat.com References: <20200901014636.29737-1-richard.weiyang@linux.alibaba.com> <20200901014636.29737-8-richard.weiyang@linux.alibaba.com> From: Mike Kravetz Message-ID: Date: Tue, 1 Sep 2020 14:05:00 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.11.0 MIME-Version: 1.0 In-Reply-To: <20200901014636.29737-8-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=9731 signatures=668679 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxlogscore=999 adultscore=0 phishscore=0 malwarescore=0 mlxscore=0 spamscore=0 bulkscore=0 suspectscore=2 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2009010180 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9731 signatures=668679 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 phishscore=0 mlxlogscore=999 adultscore=0 impostorscore=0 mlxscore=0 suspectscore=2 spamscore=0 clxscore=1015 malwarescore=0 lowpriorityscore=0 priorityscore=1501 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2009010180 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 8/31/20 6:46 PM, Wei Yang wrote: > Function dequeue_huge_page_node_exact() iterates the free list and > return the first valid free hpage. > > 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 Thank you! Reviewed-by: Mike Kravetz -- Mike Kravetz