linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Muhammad Usama Anjum <usama.anjum@collabora.com>
To: "Michał Mirosław" <emmir@google.com>, "Andrei Vagin" <avagin@gmail.com>
Cc: Muhammad Usama Anjum <usama.anjum@collabora.com>,
	Peter Xu <peterx@redhat.com>,
	David Hildenbrand <david@redhat.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Danylo Mocherniuk <mdanylo@google.com>,
	Paul Gofman <pgofman@codeweavers.com>,
	Cyrill Gorcunov <gorcunov@gmail.com>,
	Mike Rapoport <rppt@kernel.org>, Nadav Amit <namit@vmware.com>,
	Alexander Viro <viro@zeniv.linux.org.uk>,
	Shuah Khan <shuah@kernel.org>,
	Christian Brauner <brauner@kernel.org>,
	Yang Shi <shy828301@gmail.com>, Vlastimil Babka <vbabka@suse.cz>,
	"Liam R . Howlett" <Liam.Howlett@oracle.com>,
	Yun Zhou <yun.zhou@windriver.com>,
	Suren Baghdasaryan <surenb@google.com>,
	Alex Sierra <alex.sierra@amd.com>,
	Matthew Wilcox <willy@infradead.org>,
	Pasha Tatashin <pasha.tatashin@soleen.com>,
	Axel Rasmussen <axelrasmussen@google.com>,
	"Gustavo A . R . Silva" <gustavoars@kernel.org>,
	Dan Williams <dan.j.williams@intel.com>,
	linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org,
	linux-mm@kvack.org, linux-kselftest@vger.kernel.org,
	Greg KH <gregkh@linuxfoundation.org>,
	kernel@collabora.com
Subject: Re: [PATCH v21 2/5] fs/proc/task_mmu: Implement IOCTL to get and optionally clear info about PTEs
Date: Wed, 28 Jun 2023 00:20:16 +0500	[thread overview]
Message-ID: <6ac9c60e-0a6b-110a-cace-97afbd9708a0@collabora.com> (raw)
In-Reply-To: <CABb0KFGn=3oAYa+wsf=iWr1Ss=en9+m11JOijEibXJLFDAkvjQ@mail.gmail.com>

Thanks Michał for replying.

On 6/27/23 11:52 PM, Michał Mirosław wrote:
> On Tue, 27 Jun 2023 at 11:00, Muhammad Usama Anjum
> <usama.anjum@collabora.com> wrote:
>>
>> Hi Andrei and Michal,
>>
>> Lets resolve last two points. Please reply below.
>>
>> On 6/27/23 6:46 AM, Andrei Vagin wrote:
> [...]
>>> And we need to report an address where it stopped scanning.
>>> We can do that by adding zero length vector.
>> I don't want to do multiplexing the ending address in vec. Can we add
>> end_addr variable in struct pm_scan_arg to always return the ending address?
>>
>> struct pm_scan_arg {
>>         ...
>>         _u64 end_addr;
>> };
> 
> The idea to emit a zero-length entry for the end looks nice. This has
> the disadvantage that we'd need to either reserve one entry for the
> ending marker or stop the walk after the last entry is no longer
> matching.
This is ambiguous.

> 
> Another solution would be to rewrite 'start' and 'len'. The caller
> would be forced to use non-const `pm_scan_arg`, but I expect the `vec`
> pointer would normally be written anyway (unless using only a
> statically-allocated buffer).
> Also, if the 'len' is replaced with 'end' that would make the ioctl
> easily restartable (just call again if start != end).
Nice idea. But returning ending address in len seems a bit strange.

pm_scan_arg already has 11 members. Wouldn't it be okay to add one more? It
would be straight forward as well.

If nobody replies until tomorrow, I'll start returning ending address in len.


> 
> Best Regards
> Michał Mirosław

-- 
BR,
Muhammad Usama Anjum


  reply	other threads:[~2023-06-27 19:20 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-26 11:31 [PATCH v21 0/5] Implement IOCTL to get and optionally clear info about PTEs Muhammad Usama Anjum
2023-06-26 11:31 ` [PATCH v21 1/5] userfaultfd: UFFD_FEATURE_WP_ASYNC Muhammad Usama Anjum
2023-06-26 11:31 ` [PATCH v21 2/5] fs/proc/task_mmu: Implement IOCTL to get and optionally clear info about PTEs Muhammad Usama Anjum
2023-06-27  1:46   ` Andrei Vagin
2023-06-27  9:00     ` Muhammad Usama Anjum
2023-06-27 14:36       ` Andrei Vagin
2023-06-27 18:00         ` Muhammad Usama Anjum
2023-06-27 18:52       ` Michał Mirosław
2023-06-27 19:20         ` Muhammad Usama Anjum [this message]
2023-06-27 19:54           ` Michał Mirosław
2023-06-28  6:03             ` Muhammad Usama Anjum
2023-06-26 11:31 ` [PATCH v21 3/5] tools headers UAPI: Update linux/fs.h with the kernel sources Muhammad Usama Anjum
2023-06-26 11:31 ` [PATCH v21 4/5] mm/pagemap: add documentation of PAGEMAP_SCAN IOCTL Muhammad Usama Anjum
2023-06-26 11:31 ` [PATCH v21 5/5] selftests: mm: add pagemap ioctl tests Muhammad Usama Anjum

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=6ac9c60e-0a6b-110a-cace-97afbd9708a0@collabora.com \
    --to=usama.anjum@collabora.com \
    --cc=Liam.Howlett@oracle.com \
    --cc=akpm@linux-foundation.org \
    --cc=alex.sierra@amd.com \
    --cc=avagin@gmail.com \
    --cc=axelrasmussen@google.com \
    --cc=brauner@kernel.org \
    --cc=dan.j.williams@intel.com \
    --cc=david@redhat.com \
    --cc=emmir@google.com \
    --cc=gorcunov@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=gustavoars@kernel.org \
    --cc=kernel@collabora.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mdanylo@google.com \
    --cc=namit@vmware.com \
    --cc=pasha.tatashin@soleen.com \
    --cc=peterx@redhat.com \
    --cc=pgofman@codeweavers.com \
    --cc=rppt@kernel.org \
    --cc=shuah@kernel.org \
    --cc=shy828301@gmail.com \
    --cc=surenb@google.com \
    --cc=vbabka@suse.cz \
    --cc=viro@zeniv.linux.org.uk \
    --cc=willy@infradead.org \
    --cc=yun.zhou@windriver.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).