Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp6670858iob; Wed, 11 May 2022 02:47:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwt37Nz/e1nweiDbXRQNtyEMdaHzQZ3uctOTnerhEVXcKrDQoW+hIkEOmKKVq9ufMcL3IeA X-Received: by 2002:a63:6705:0:b0:3c1:976d:bd68 with SMTP id b5-20020a636705000000b003c1976dbd68mr20403392pgc.133.1652262468803; Wed, 11 May 2022 02:47:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652262468; cv=none; d=google.com; s=arc-20160816; b=pDVx8rGDQhugp5r79daG0dP8LDGATobM+iYp1ePlzUHGNNmb6LS3m1rpbiMckFEwhu YpimlcZOoCG+lYbxxVIIYJNBhIbW1KYaioLrUQlSQQTeJaYCGqQEoM5LANgH74nAb6fD q9RK7I9SbtH2P9uxVOnLdmlwTSrOdvZnzNH5H0xcVpOCiq+Met1WkYcmQO/1/BmInK8S HekzifyIVfErw75YV9lboEq04gON/+L2lET6GVT20A/R+QoahJIstZRhvQ91U5QN4Hs8 7IRyyVqN9HoatCXjnEqzh0Rg/6AymtMG4LrrTLmQ9/2PKPc0zELJrx1roUTdtZTwkDFi zOJQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:subject:user-agent:mime-version:date:message-id; bh=OzwKLnmHhqEqmX5pToZIgne8MjyW186Q9BPwzf9jOH0=; b=qOJew3CmesItrIPydG/VarALam6B2RfKcgYsaL6VsIEewf0IO5n++CrL/499yfoYf1 omb5SrXvZbYXu7mvHOp5uqBGEVAxNOjNkHLw/popk5S5VoH9kwKS0eWtMI2+wqQO7bLP Y3c6S3hs59JZjgQP5hSAFQHk4g9+HfMSnUtn+B5+1C73cG8SYbEawGp+j1k7uewzjV4+ UANg7vjvQe7AVNkt6M+u4RiRMOXNfB+tDD4Q3J+WE4KRvPY3AaQeB99BZLdGK2KVS7WK KIe2StAOCHTHxe326vkrlCMlxT3LbMcQgBgUS0pcRVrveoNRTP1BVSTJjdDJYyjxfwCT OWLA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m2-20020a170902bb8200b0015d17ba5b65si1773551pls.22.2022.05.11.02.47.33; Wed, 11 May 2022 02:47:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230245AbiEKBXk (ORCPT + 99 others); Tue, 10 May 2022 21:23:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43468 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229595AbiEKBXj (ORCPT ); Tue, 10 May 2022 21:23:39 -0400 Received: from out30-56.freemail.mail.aliyun.com (out30-56.freemail.mail.aliyun.com [115.124.30.56]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0CEF9994C4 for ; Tue, 10 May 2022 18:23:35 -0700 (PDT) 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 X-Spam-Status: No, score=-10.8 required=5.0 tests=BAYES_00, ENV_AND_HDR_SPF_MATCH,NICE_REPLY_A,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE, UNPARSEABLE_RELAY,USER_IN_DEF_SPF_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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