From: Jonathan Corbet <corbet@lwn.net>
To: Tiberiu A Georgescu <tiberiu.georgescu@nutanix.com>,
akpm@linux-foundation.org, peterx@redhat.com, david@redhat.com,
linux-doc@vger.kernel.org, linux-mm@kvack.org,
linux-kernel@vger.kernel.org
Cc: ivan.teterevkov@nutanix.com, florian.schmidt@nutanix.com,
carl.waldspurger@nutanix.com, jonathan.davies@nutanix.com,
chris.riches@nutanix.com,
Tiberiu A Georgescu <tiberiu.georgescu@nutanix.com>
Subject: Re: [PATCH v3 0/1] Documenting shmem as an exception case for the pagemap
Date: Mon, 27 Sep 2021 11:28:08 -0600 [thread overview]
Message-ID: <87o88ehqs7.fsf@meer.lwn.net> (raw)
In-Reply-To: <20210923064618.157046-1-tiberiu.georgescu@nutanix.com>
Tiberiu A Georgescu <tiberiu.georgescu@nutanix.com> writes:
> This patch follows the discussions on previous documentation patch threads
> [1][2]. 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 page info retrieval in user
> space.
>
> In short, the kernel does not keep track of PTEs for swapped out 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][3][4][5]. There
> are also arguments for why this arguably missing information should
> eventually be exposed to the user in either a future pagemap patch, or by
> an alternative tool.
>
> [1]: https://marc.info/?m=162878395426774
> [2]: https://lore.kernel.org/lkml/20210920164931.175411-1-tiberiu.georgescu@nutanix.com/
> [3]: https://lore.kernel.org/lkml/20210730160826.63785-1-tiberiu.georgescu@nutanix.com/
> [4]: https://lore.kernel.org/lkml/20210807032521.7591-1-peterx@redhat.com/
> [5]: https://lore.kernel.org/lkml/20210715201651.212134-1-peterx@redhat.com/
>
> Tiberiu A Georgescu (1):
> Documentation: update pagemap with shmem exceptions
>
> Documentation/admin-guide/mm/pagemap.rst | 22 ++++++++++++++++++++++
> 1 file changed, 22 insertions(+)
Applied, thanks.
jon
prev parent reply other threads:[~2021-09-27 17:44 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-23 6:46 [PATCH v3 0/1] Documenting shmem as an exception case for the pagemap Tiberiu A Georgescu
2021-09-23 6:46 ` [PATCH v3 1/1] Documentation: update pagemap with shmem exceptions Tiberiu A Georgescu
2021-09-23 15:00 ` Peter Xu
2021-09-23 15:02 ` David Hildenbrand
2021-09-27 17:28 ` Jonathan Corbet [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87o88ehqs7.fsf@meer.lwn.net \
--to=corbet@lwn.net \
--cc=akpm@linux-foundation.org \
--cc=carl.waldspurger@nutanix.com \
--cc=chris.riches@nutanix.com \
--cc=david@redhat.com \
--cc=florian.schmidt@nutanix.com \
--cc=ivan.teterevkov@nutanix.com \
--cc=jonathan.davies@nutanix.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=peterx@redhat.com \
--cc=tiberiu.georgescu@nutanix.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).