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 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C5E96C433EF for ; Fri, 17 Jun 2022 00:55:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=zvAhtImV21OFZAEJwqBCy57YjIXOESe2fMvBLop+pVA=; b=tjO3o5sYZdY+lY iylmF8yzcb9/wp/mZdZ67TuHdUjBy8BTOtc1upHriyGDaXolp7TcFghRDxVtBEdDzzO0T/BnVxND+ d/1Ws75B2geJpUWiSDc1nsjn0XMkMQCsJtMvR23eaDTvz4Ru6W+sWQzPWzp+dQebTReQtncA1+1Sk nDin9Apu5YvMnfAF7sHymgFceDSivYFC4G2JzrAR7IZsT3yOGVPPwJldq46RWX2NnZQ7AlYGe6Ith LiM1t0e8WeZTaamlbhpGUb02WHvJeqVDDVaRjQtVl5Tr4ujIRN+Oz6SVFCnZyVuHQ29XBmMkrBZMn ODgIsAlmJUk9/2Jjmmtw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1o20FJ-004vt4-9k; Fri, 17 Jun 2022 00:53:57 +0000 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1o20FF-004vsG-5u for linux-arm-kernel@lists.infradead.org; Fri, 17 Jun 2022 00:53:54 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1655427230; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=cqh/xCqSrPT5XnCWpPALZ1TXJ2uqqL1RdR3h2gkY1hY=; b=H6oO8HSk9uLpp3wiU/C5hhh9FWFCPdSTnCsjxMmytaoqKdKNv92xlyAbK12lMEZnMaioEZ Lcqv5uWABP7SZumyoZe+WLxDvzdYRJ5YgxZtZ4bKfSNF/xctF3WhToMjj+6Iq85o4e7c7a 3/F9JZicYTWwmAqh12Uz/fvE7pGhp74= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-330-GYj60yb7M1-KQMb4ur2GSw-1; Thu, 16 Jun 2022 20:53:47 -0400 X-MC-Unique: GYj60yb7M1-KQMb4ur2GSw-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id E9E00801756; Fri, 17 Jun 2022 00:53:46 +0000 (UTC) Received: from localhost (ovpn-12-181.pek2.redhat.com [10.72.12.181]) by smtp.corp.redhat.com (Postfix) with ESMTPS id E54F740EC002; Fri, 17 Jun 2022 00:53:45 +0000 (UTC) Date: Fri, 17 Jun 2022 08:53:41 +0800 From: Baoquan He To: Mike Kravetz Cc: Baolin Wang , songmuchun@bytedance.com, akpm@linux-foundation.org, catalin.marinas@arm.com, will@kernel.org, anshuman.khandual@arm.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [PATCH] arm64/hugetlb: Implement arm64 specific hugetlb_mask_last_hp Message-ID: References: <7256dbe078d7231f45b0f47c2c52a3bd3aa10da7.1655350193.git.baolin.wang@linux.alibaba.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-Scanned-By: MIMEDefang 2.84 on 10.11.54.2 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220616_175353_577778_8E3DCEEE X-CRM114-Status: GOOD ( 28.34 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 06/16/22 at 10:35am, Mike Kravetz wrote: > On 06/16/22 20:05, Baoquan He wrote: > > On 06/16/22 at 11:34am, Baolin Wang wrote: > > > The HugeTLB address ranges are linearly scanned during fork, unmap and > > > remap operations, and the linear scan can skip to the end of range mapped > > > by the page table page if hitting a non-present entry, which can help > > > to speed linear scanning of the HugeTLB address ranges. > > > > > > So hugetlb_mask_last_hp() is introduced to help to update the address in > > > the loop of HugeTLB linear scanning with getting the last huge page mapped > > > by the associated page table page[1], when a non-present entry is encountered. > > > > > > Considering ARM64 specific cont-pte/pmd size HugeTLB, this patch implemented > > > an ARM64 specific hugetlb_mask_last_hp() to help this case. > > > > > > [1] https://lore.kernel.org/linux-mm/20220527225849.284839-1-mike.kravetz@oracle.com/ > > > > > > Signed-off-by: Baolin Wang > > > --- > > > Note: this patch is based on the series: "hugetlb: speed up linear > > > address scanning" from Mike. Mike, please fold it into your series. > > > Thanks. > > > --- > > > arch/arm64/mm/hugetlbpage.c | 20 ++++++++++++++++++++ > > > 1 file changed, 20 insertions(+) > > > > > > diff --git a/arch/arm64/mm/hugetlbpage.c b/arch/arm64/mm/hugetlbpage.c > > > index e2a5ec9..958935c 100644 > > > --- a/arch/arm64/mm/hugetlbpage.c > > > +++ b/arch/arm64/mm/hugetlbpage.c > > > @@ -368,6 +368,26 @@ pte_t *huge_pte_offset(struct mm_struct *mm, > > > return NULL; > > > } > > > > > > +unsigned long hugetlb_mask_last_hp(struct hstate *h) > > > +{ > > > + unsigned long hp_size = huge_page_size(h); > > > > hp_size may not be a good name, it reminds me of hotplug. I would name > > it hpage_size even though a little more characters are added. > > > > How about just hugetlb_mask_last_page? Since the routine is prefixed > with 'hugetlb' and we are passing in a pointer to a hstate, I think there > is enough context to know we are talking about a huge page mask as > opposed to a base page mask. Agree, hugetlb_mask_last_page looks good to me regarding the function name, thx. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel