[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <fd9ddd43-6737-88bd-4054-3d5b94534271@collabora.com>
Date: Wed, 26 Apr 2023 12:06:23 +0500
From: Muhammad Usama Anjum <usama.anjum@...labora.com>
To: Peter Xu <peterx@...hat.com>, Paul Gofman <pgofman@...eweavers.com>
Cc: Muhammad Usama Anjum <usama.anjum@...labora.com>,
Alexander Viro <viro@...iv.linux.org.uk>,
Shuah Khan <shuah@...nel.org>,
Christian Brauner <brauner@...nel.org>,
Yang Shi <shy828301@...il.com>,
Vlastimil Babka <vbabka@...e.cz>,
"Liam R . Howlett" <Liam.Howlett@...cle.com>,
Yun Zhou <yun.zhou@...driver.com>,
Cyrill Gorcunov <gorcunov@...il.com>,
Michał Mirosław <emmir@...gle.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Suren Baghdasaryan <surenb@...gle.com>,
Andrei Vagin <avagin@...il.com>,
Alex Sierra <alex.sierra@....com>,
Matthew Wilcox <willy@...radead.org>,
Pasha Tatashin <pasha.tatashin@...een.com>,
Danylo Mocherniuk <mdanylo@...gle.com>,
Axel Rasmussen <axelrasmussen@...gle.com>,
"Gustavo A . R . Silva" <gustavoars@...nel.org>,
David Hildenbrand <david@...hat.com>,
Dan Williams <dan.j.williams@...el.com>,
linux-kernel@...r.kernel.org, Mike Rapoport <rppt@...nel.org>,
linux-fsdevel@...r.kernel.org, linux-mm@...ck.org,
linux-kselftest@...r.kernel.org,
Greg KH <gregkh@...uxfoundation.org>, kernel@...labora.com,
Nadav Amit <namit@...are.com>
Subject: Re: [PATCH RESEND v15 2/5] fs/proc/task_mmu: Implement IOCTL to get
and optionally clear info about PTEs
On 4/20/23 11:01 AM, Muhammad Usama Anjum wrote:
> +/* Supported flags */
> +#define PM_SCAN_OP_GET (1 << 0)
> +#define PM_SCAN_OP_WP (1 << 1)
We have only these flag options available in PAGEMAP_SCAN IOCTL.
PM_SCAN_OP_GET must always be specified for this IOCTL. PM_SCAN_OP_WP can
be specified as need. But PM_SCAN_OP_WP cannot be specified without
PM_SCAN_OP_GET. (This was removed after you had asked me to not duplicate
functionality which can be achieved by UFFDIO_WRITEPROTECT.)
1) PM_SCAN_OP_GET | PM_SCAN_OP_WP
vs
2) UFFDIO_WRITEPROTECT
After removing the usage of uffd_wp_range() from PAGEMAP_SCAN IOCTL, we are
getting really good performance which is comparable just like we are
depending on SOFT_DIRTY flags in the PTE. But when we want to perform wp,
PM_SCAN_OP_GET | PM_SCAN_OP_WP is more desirable than UFFDIO_WRITEPROTECT
performance and behavior wise.
I've got the results from someone else that UFFDIO_WRITEPROTECT block
pagefaults somehow which PAGEMAP_IOCTL doesn't. I still need to verify this
as I don't have tests comparing them one-to-one.
What are your thoughts about it? Have you thought about making
UFFDIO_WRITEPROTECT perform better?
I'm sorry to mention the word "performance" here. Actually we want better
performance to emulate Windows syscall. That is why we are adding this
functionality. So either we need to see what can be improved in
UFFDIO_WRITEPROTECT or can I please add only PM_SCAN_OP_WP back in
pagemap_ioctl?
Thank you so much for the help.
--
BR,
Muhammad Usama Anjum
Powered by blists - more mailing lists