All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/1] Documenting shmem as an exception case for the pagemap
@ 2021-09-20 16:49 Tiberiu A Georgescu
  2021-09-20 16:49 ` [PATCH v2 1/1] Documentation: update pagemap with shmem exceptions Tiberiu A Georgescu
  0 siblings, 1 reply; 9+ messages in thread
From: Tiberiu A Georgescu @ 2021-09-20 16:49 UTC (permalink / raw)
  To: akpm, corbet, peterx, david, linux-doc, linux-mm, linux-kernel
  Cc: ivan.teterevkov, florian.schmidt, carl.waldspurger,
	jonathan.davies, Tiberiu A Georgescu

This patch follows the discussions on a previous documentation patch
thread [1]. It presents the exception case of shared memory management from
the pagemap's point of view. It briefly describes what is missing, why it
is missing and alternatives to the pagemap for swap info retrieval.

In short, the kernel does not keep track of PTEs for shared pages within
the processes that references them. Thus, the proc/pid/pagemap tool cannot
print the swap destination of the shared memory pages, instead setting the
pagemap entry to zero for both non-allocated and swapped out pages. This
can create confusion for users who need information on swapped out pages.

The reasons why maintaining the PTEs of all swapped out shared pages among
all processes while maintaining similar performance is not a trivial task,
or a desirable change have been discussed extensively [1][2][3][4]. There
are also arguments for why this arguably missing information should be
exposed to the user in either a future pagemap patch, or an alternative.

[1]: https://marc.info/?m=162878395426774
[2]: https://lore.kernel.org/lkml/20210730160826.63785-1-tiberiu.georgescu@nutanix.com/
[3]: https://lore.kernel.org/lkml/20210807032521.7591-1-peterx@redhat.com/
[4]: https://lore.kernel.org/lkml/20210715201651.212134-1-peterx@redhat.com/

Kind regards,
Tibi

Tiberiu A Georgescu (1):
  Documentation: update pagemap with shmem exceptions

 Documentation/admin-guide/mm/pagemap.rst | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

-- 
2.33.0.363.g4c719308ce


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2021-09-21 17:10 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-20 16:49 [PATCH v2 0/1] Documenting shmem as an exception case for the pagemap Tiberiu A Georgescu
2021-09-20 16:49 ` [PATCH v2 1/1] Documentation: update pagemap with shmem exceptions Tiberiu A Georgescu
2021-09-20 17:36   ` David Hildenbrand
2021-09-20 19:07   ` Peter Xu
2021-09-21  8:52     ` Tiberiu Georgescu
2021-09-21 15:04       ` Peter Xu
2021-09-21 16:08         ` Tiberiu Georgescu
2021-09-21 16:30           ` Peter Xu
2021-09-21 17:09             ` Tiberiu Georgescu

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.