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: 13053053 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 92F33C4332F for ; Wed, 23 Nov 2022 05:13:35 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id EB2A16B0071; Wed, 23 Nov 2022 00:13:34 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id E63166B0073; Wed, 23 Nov 2022 00:13:34 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D527C8E0001; Wed, 23 Nov 2022 00:13:34 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id C57486B0071 for ; Wed, 23 Nov 2022 00:13:34 -0500 (EST) Received: from smtpin29.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 874591606E9 for ; Wed, 23 Nov 2022 05:13:34 +0000 (UTC) X-FDA: 80163539148.29.396EAD9 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by imf12.hostedemail.com (Postfix) with ESMTP id DCEDD40008 for ; Wed, 23 Nov 2022 05:13:33 +0000 (UTC) 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 ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1669180414; a=rsa-sha256; cv=none; b=LbO3heo5IKMthBsOvVtCe1SCkOxXOl2H4Z4v1JvMrnDGoGh+fdb7XunxH3X0yAut3Iw9k1 ZFGmmFMsisOxHi6q1GgyVQuakbTZyM99cwqM54ZsRd13wHGTA7XVdZzkCYz6c2QIHpn6oH k4ykcrX2q/eRNFq086Vrr1PxY3JWyr0= ARC-Authentication-Results: i=1; imf12.hostedemail.com; dkim=none; dmarc=pass (policy=none) header.from=arm.com; spf=pass (imf12.hostedemail.com: domain of anshuman.khandual@arm.com designates 217.140.110.172 as permitted sender) smtp.mailfrom=anshuman.khandual@arm.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1669180414; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:references; bh=fTss4eTrXm1qkxlquzrHiu8/R23PDPCUu0Q6VW4nTVI=; b=gNXx9+cn14y2aQAKna8mpmH6itzHuAE8SvaNqnwWBtM8vpDMzPhvIjb7dJ0LnMWPQbJqkN 41BXjVL5w6lO9vwowMeia/6EFueDZefmqRlMzU7dFgKD7FCXI3PnL0KFEEX1UvCtORGRYy ERHZkleCD0ep+lth+cPwDNwpAna8cH8= Authentication-Results: imf12.hostedemail.com; dkim=none; dmarc=pass (policy=none) header.from=arm.com; spf=pass (imf12.hostedemail.com: domain of anshuman.khandual@arm.com designates 217.140.110.172 as permitted sender) smtp.mailfrom=anshuman.khandual@arm.com X-Stat-Signature: xympkzcufj7x7jiwdumaw8aqwu7xppme X-Rspamd-Queue-Id: DCEDD40008 X-Rspam-User: X-Rspamd-Server: rspam11 X-HE-Tag: 1669180413-124072 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: 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 | +---------------------------+--------------------------------------------------+