From patchwork Wed Nov 23 05:13:19 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anshuman Khandual X-Patchwork-Id: 24708 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp2601932wrr; Tue, 22 Nov 2022 21:20:04 -0800 (PST) X-Google-Smtp-Source: AA0mqf4W7z0F7vKCjZmmhSmT9elgxvNyi/I1FkI1eFbBPtL3Cg7fSrCOK6ekdRV6nMLDUpQk7kXg X-Received: by 2002:aa7:d999:0:b0:461:7f5a:e04e with SMTP id u25-20020aa7d999000000b004617f5ae04emr7964880eds.389.1669180804671; Tue, 22 Nov 2022 21:20:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669180804; cv=none; d=google.com; s=arc-20160816; b=DeG/tFErIhNXB8SdsldlOCwAbeFJKcYPjVfv8CCxgngCJCirbMRlQxRco1g1oQOWVB s3MNlBo/WzT7k28vtDjRDfnoF/7L43H/gPS38+js47ArPZsToVj40n/pAUNjamh/acak 4NywBwGsUrOJeagRTJvr1iK1WSqm3Sp0054CXrnqLPAxabPIaxv2+f+BpNAHj9iXfEEi z4dTjB2xmAX6reJvjoT5D2qAMPUc5Wzk1wBL+K4FG8hyi7JjbS1cwQaCf2W4+oO1OAMa +hncj5MnPP9wGOyeG6WRq3GqwjZQ09CUr5b0DHPW+v4RtS30NWRXeEnNBXn0geg2Z0se 72OA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=fTss4eTrXm1qkxlquzrHiu8/R23PDPCUu0Q6VW4nTVI=; b=V8PjYyndmQusgbZuTGFUTsY6xau/jWai62fVNI/JA/0yxenMUJX7D4Lga7+tqnosVP qx6PEULepmIaUiElEYgcSfOJUic+ILdhoJQamG9mpbVSzcqKUTf+WbrqpULm+ixlm0hs MJWrKrsbp/IGJ3YQalOwaT80/DcpX09occ6YpqEDD4lR3+G7g/P/9hyRF1609Ft6CFF0 MbnEaePQoMlgZ1PWJp4IpZjrP2z4DOz+Dv09YB71Zm4LJ6T2QHyYYinIyaquyfzWN9+D uR9VZlQUEb8SisAGtKuTN6VWvYD1rGKszqG4yHl6KFSb18SgWEFeQI1YNUvr4/hi5FPi oEww== 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=arm.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id qa17-20020a170907869100b0078239e3f846si3878911ejc.1.2022.11.22.21.19.38; Tue, 22 Nov 2022 21:20:04 -0800 (PST) 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=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235627AbiKWFNe (ORCPT + 99 others); Wed, 23 Nov 2022 00:13:34 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47324 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234151AbiKWFNc (ORCPT ); Wed, 23 Nov 2022 00:13:32 -0500 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 904DF8F3E4; Tue, 22 Nov 2022 21:13:31 -0800 (PST) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id CF33F1FB; Tue, 22 Nov 2022 21:13:37 -0800 (PST) Received: from a077893.blr.arm.com (unknown [10.162.43.6]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 737CC3F73B; Tue, 22 Nov 2022 21:13:28 -0800 (PST) From: Anshuman Khandual To: linux-mm@kvack.org Cc: Anshuman Khandual , Jonathan Corbet , Andrew Morton , Andrea Arcangeli , Mike Rapoport , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] documentation/mm: Update pmd_present() in arch_pgtable_helpers.rst Date: Wed, 23 Nov 2022 10:43:19 +0530 Message-Id: <20221123051319.1312582-1-anshuman.khandual@arm.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_NONE 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1750262931462947874?= X-GMAIL-MSGID: =?utf-8?q?1750262931462947874?= Although pmd_present() might seem to indicate a valid and mapped pmd entry, in reality it returns true when pmd_page() points to a valid page in memory , regardless whether the pmd entry is mapped or not. Andrea Arcangeli had earlier explained [1] the required semantics for pmd_present(). This just updates the documentation for pmd_present() as required. [1] https://lore.kernel.org/lkml/20181017020930.GN30832@redhat.com/ Cc: Jonathan Corbet Cc: Andrew Morton Cc: Andrea Arcangeli Cc: Mike Rapoport Cc: linux-mm@kvack.org Cc: linux-doc@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Anshuman Khandual Acked-by: David Hildenbrand --- This applies on v6.1-rc6 The latest trigger was from an earlier discussion here. https://lore.kernel.org/all/53c0c955-7afe-905b-468a-cd7ac81238c5@arm.com/ Documentation/mm/arch_pgtable_helpers.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/mm/arch_pgtable_helpers.rst b/Documentation/mm/arch_pgtable_helpers.rst index cbaee9e59241..fd2a19df884e 100644 --- a/Documentation/mm/arch_pgtable_helpers.rst +++ b/Documentation/mm/arch_pgtable_helpers.rst @@ -94,7 +94,7 @@ PMD Page Table Helpers +---------------------------+--------------------------------------------------+ | pmd_trans_huge | Tests a Transparent Huge Page (THP) at PMD | +---------------------------+--------------------------------------------------+ -| pmd_present | Tests a valid mapped PMD | +| pmd_present | Tests whether pmd_page() points to valid memory | +---------------------------+--------------------------------------------------+ | pmd_young | Tests a young PMD | +---------------------------+--------------------------------------------------+