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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0CB11C433F5 for ; Wed, 11 May 2022 01:23:42 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 71F7E6B0071; Tue, 10 May 2022 21:23:42 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 6A7786B0072; Tue, 10 May 2022 21:23:42 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 5211C6B0073; Tue, 10 May 2022 21:23:42 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id 3C9796B0071 for ; Tue, 10 May 2022 21:23:42 -0400 (EDT) Received: from smtpin10.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 1639821D3A for ; Wed, 11 May 2022 01:23:42 +0000 (UTC) X-FDA: 79451715084.10.E521277 Received: from out30-130.freemail.mail.aliyun.com (out30-130.freemail.mail.aliyun.com [115.124.30.130]) by imf09.hostedemail.com (Postfix) with ESMTP id 98793140097 for ; Wed, 11 May 2022 01:23:31 +0000 (UTC) X-Alimail-AntiSpam:AC=PASS;BC=-1|-1;BR=01201311R421e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e04357;MF=baolin.wang@linux.alibaba.com;NM=1;PH=DS;RN=11;SR=0;TI=SMTPD_---0VCt7iBt_1652232209; Received: from 30.30.99.144(mailfrom:baolin.wang@linux.alibaba.com fp:SMTPD_---0VCt7iBt_1652232209) by smtp.aliyun-inc.com(127.0.0.1); Wed, 11 May 2022 09:23:31 +0800 Message-ID: <278d1d30-a7ad-11df-5242-5472a841a3b3@linux.alibaba.com> Date: Wed, 11 May 2022 09:24:09 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.8.1 Subject: Re: [PATCH 1/2] arm64/hugetlb: Use ptep_get() to get the pte value of a huge page To: Muchun Song Cc: catalin.marinas@arm.com, will@kernel.org, mike.kravetz@oracle.com, akpm@linux-foundation.org, willy@infradead.org, anshuman.khandual@arm.com, christophe.leroy@csgroup.eu, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org References: <6aabddaf4cae5ae2205c3a7df9b9e15dbd61b641.1652180088.git.baolin.wang@linux.alibaba.com> From: Baolin Wang In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Authentication-Results: imf09.hostedemail.com; dkim=none; spf=pass (imf09.hostedemail.com: domain of baolin.wang@linux.alibaba.com designates 115.124.30.130 as permitted sender) smtp.mailfrom=baolin.wang@linux.alibaba.com; dmarc=pass (policy=none) header.from=alibaba.com X-Rspam-User: X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: 98793140097 X-Stat-Signature: wetdsy19pi416j6h3fb73aas76ayursx X-HE-Tag: 1652232211-57830 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 5/10/2022 11:55 PM, Muchun Song wrote: > On Tue, May 10, 2022 at 07:12:52PM +0800, Baolin Wang wrote: >> The original huge_ptep_get() on ARM64 is just a wrapper of ptep_get(), >> which will not take into account any contig-PTEs dirty and access bits. >> Meanwhile we will implement a new ARM64-specific huge_ptep_get() >> interface in following patch, which will take into account any contig-PTEs >> dirty and access bits and only be allowed to pass the head pte of >> a contig-PTE/PMD size page. > > IIUC, the huge_ptep_get() you have implemented in patch 2 could > handle non-head pte. It'll return the original pte without potential > AD bit. I admit it is more efficeent to use ptep_get() directly, > but the judgement here should be updated. Ah, right. I missed the 'ncontig' will be 0 if a non-head pte passed. Will update the commit message in next version. Thanks for reviewing. > > With this update. > > Reviewed-by: Muchun Song