[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <db29666a-32b8-4bf6-ab13-7de3b09b0da1@redhat.com>
Date: Thu, 7 Mar 2024 11:52:46 +0100
From: David Hildenbrand <david@...hat.com>
To: Richard Weinberger <richard@....at>, linux-mm@...ck.org
Cc: linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-doc@...r.kernel.org, upstream+pagemap@...ma-star.at,
adobriyan@...il.com, wangkefeng.wang@...wei.com, ryan.roberts@....com,
hughd@...gle.com, peterx@...hat.com, avagin@...gle.com, lstoakes@...il.com,
vbabka@...e.cz, akpm@...ux-foundation.org, usama.anjum@...labora.com,
corbet@....net
Subject: Re: [PATCH 2/2] [RFC] pagemap.rst: Document write bit
On 07.03.24 00:23, Richard Weinberger wrote:
> Bit 58 denotes that a PTE is writable.
> The main use case is detecting CoW mappings.
>
> Signed-off-by: Richard Weinberger <richard@....at>
> ---
> Documentation/admin-guide/mm/pagemap.rst | 8 +++++++-
> 1 file changed, 7 insertions(+), 1 deletion(-)
>
> diff --git a/Documentation/admin-guide/mm/pagemap.rst b/Documentation/admin-guide/mm/pagemap.rst
> index f5f065c67615..81ffe3601b96 100644
> --- a/Documentation/admin-guide/mm/pagemap.rst
> +++ b/Documentation/admin-guide/mm/pagemap.rst
> @@ -21,7 +21,8 @@ There are four components to pagemap:
> * Bit 56 page exclusively mapped (since 4.2)
> * Bit 57 pte is uffd-wp write-protected (since 5.13) (see
> Documentation/admin-guide/mm/userfaultfd.rst)
> - * Bits 58-60 zero
> + * Bit 58 pte is writable (since 6.10)
> + * Bits 59-60 zero
> * Bit 61 page is file-page or shared-anon (since 3.5)
> * Bit 62 page swapped
> * Bit 63 page present
> @@ -37,6 +38,11 @@ There are four components to pagemap:
> precisely which pages are mapped (or in swap) and comparing mapped
> pages between processes.
>
> + Bit 58 is useful to detect CoW mappings; however, it does not indicate
> + whether the page mapping is writable or not. If an anonymous mapping is
> + writable but the write bit is not set, it means that the next write access
> + will cause a page fault, and copy-on-write will happen.
That is not true.
--
Cheers,
David / dhildenb
Powered by blists - more mailing lists