# \[PATCH\] Documentation: update pagemap with SOFT\_DIRTY \& UFFD\_WP shmem issue

- From: Tiberiu A Georgescu \<hidden\>
- Date: 2021-07-30 15:51:57 
- List: linux-doc
- Page: https://ratatoskr.run/linux-doc/2021/07/8526493
- Thread: https://ratatoskr.run/linux-doc/2021/07/8526493/t.md

```text
Mentioning the current missing functionality of the pagemap, in case
someone stumbles upon unexpected behaviour.

Signed-off-by: Tiberiu A Georgescu <redacted>
Reviewed-by: Ivan Teterevkov <redacted>
Reviewed-by: Florian Schmidt <redacted>
Reviewed-by: Carl Waldspurger <redacted>
Reviewed-by: Jonathan Davies <redacted>
---
 Documentation/admin-guide/mm/pagemap.rst | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/Documentation/admin-guide/mm/pagemap.rst b/Documentation/admin-guide/mm/pagemap.rst
index fb578fbbb76c..627f3832b3a2 100644
--- a/Documentation/admin-guide/mm/pagemap.rst
+++ b/Documentation/admin-guide/mm/pagemap.rst
@@ -207,3 +207,9 @@ Before Linux 3.11 pagemap bits 55-60 were used for "page-shift" (which is
 always 12 at most architectures). Since Linux 3.11 their meaning changes
 after first clear of soft-dirty bits. Since Linux 4.2 they are used for
 flags unconditionally.
+
+Note that the page table entries for swappable and non-syncable pages are
+cleared when those pages are zapped or swapped out. This makes information
+about the page disappear from the pagemap.  The location of the swapped
+page can still be retrieved from the page cache, but flags like SOFT_DIRTY
+and UFFD_WP are lost irretrievably.
-- 
2.32.0.380.geb27b338a3

```
