All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Xu <peterx@redhat.com>
To: Nadav Amit <nadav.amit@gmail.com>
Cc: Linux MM <linux-mm@kvack.org>,
	Mike Kravetz <mike.kravetz@oracle.com>,
	Hugh Dickins <hughd@google.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Axel Rasmussen <axelrasmussen@google.com>,
	David Hildenbrand <david@redhat.com>,
	Mike Rapoport <rppt@linux.ibm.com>
Subject: Re: [RFC PATCH v2 3/5] userfaultfd: introduce write-likely mode for copy/wp operations
Date: Tue, 21 Jun 2022 14:43:01 -0400	[thread overview]
Message-ID: <YrIRNUln/K55ZExm@xz-m1.local> (raw)
In-Reply-To: <58E53A1D-466C-4A2B-8E10-2993EFF60856@gmail.com>

On Tue, Jun 21, 2022 at 11:30:52AM -0700, Nadav Amit wrote:
> > Only if you agree with what I thought, thanks. And that could be a
> > separate patch for sure out of this one even if to come.
> 
> I do agree. I did not quite understand your second sentence. I guess you
> meant not to combine it into this patchset (or at least that’s what I
> thought and I attribute it to you).

Feel free to not attribute anything to me, even no need on a suggested-by.
But if you plan to post for sure I'd be glad if you copy me, I may be very
willing to either provide a r-b or read about what's missed there on the
thought if that isn't work like that.

So the only purpose of the 2nd sentense is to make sure it shouldn't block
your current series (you explained why you're hurry and catching time), and
that's all I wanted to express.

> 
> >> 
> >> 
> >> I think that perhaps I did not communicate well enough the reason it makes
> >> sense to set the dirty-bit.
> >> 
> >> Setting the access-bit and dirty-bit takes quite some time. So regardless of
> >> whether you set the PageDirty, if you didn’t see access-bit and dirty-bit
> >> and later you access the page - you are going to pay ~550 cycles for
> >> nothing.
> >> 
> >> For reference: https://marc.info/?l=linux-kernel&m=146582237922378&w=2
> >> 
> >> If you want me to allow userspace to provide a hint, let me know.
> > 
> > You did communicate well, so probably it's me that didn't. :)
> > 
> > Yes I think it'll be nicer to allow userspace provide the same hint for
> > UFFDIO_CONTINUE, the reason as I explained in the other thread on the young
> > bit (or say ACCESS_LIKELY), that UFFDIO_CONTINUE can (at least in my
> > current qemu impl [1]) proactively be used to install pgtables even if
> > they're code pages and they may not be accessed in the near future. So
> > IMHO we should treat UFFDIO_CONTINUE the same as UFFDIO_COPY, IMHO, from
> > this point of view.
> > 
> > There's just still some differences on young/dirty here so I'm not sure
> > whether the idea applies to both, but I think at least it applies to young
> > bit (ACCESS_LIKELY).
> > 
> > [1] https://github.com/xzpeter/qemu/commit/b7758ad55af42b5364796362e96f4a06b51d9582
> 
> We have a saying in Hebrew: “When you explain slowly, I understand quickly”.
> Thanks for explaining. I will add hints for UFFDIO_CONTINUE as well.

I'm always happy to learn these interesting idioms, and I'm glad we seem to
be on the same page now.  Thanks!

-- 
Peter Xu



  reply	other threads:[~2022-06-21 18:43 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-19 23:34 [RFC PATCH v2 0/5] userfaultfd: support access/write hints Nadav Amit
2022-06-19 23:34 ` [RFC PATCH v2 1/5] userfaultfd: introduce uffd_flags Nadav Amit
2022-06-21  8:41   ` David Hildenbrand
2022-06-21 15:31     ` Peter Xu
2022-06-21 15:29   ` Peter Xu
2022-06-21 17:41     ` Nadav Amit
2022-06-19 23:34 ` [RFC PATCH v2 2/5] userfaultfd: introduce access-likely mode for copy/wp operations Nadav Amit
2022-06-20 10:33   ` kernel test robot
2022-06-21  8:48   ` David Hildenbrand
2022-06-21 15:42     ` Peter Xu
2022-06-21 17:27     ` Nadav Amit
2022-06-19 23:34 ` [RFC PATCH v2 3/5] userfaultfd: introduce write-likely " Nadav Amit
2022-06-21 16:38   ` Peter Xu
2022-06-21 17:14     ` Nadav Amit
2022-06-21 18:10       ` Peter Xu
2022-06-21 18:30         ` Nadav Amit
2022-06-21 18:43           ` Peter Xu [this message]
2022-06-19 23:34 ` [RFC PATCH v2 4/5] userfaultfd: zero access/write hints Nadav Amit
2022-06-20 18:06   ` kernel test robot
2022-06-21 17:04   ` Peter Xu
2022-06-21 17:17     ` Nadav Amit
2022-06-21 17:56       ` Peter Xu
2022-06-21 17:58         ` Nadav Amit
2022-06-19 23:34 ` [RFC PATCH v2 5/5] selftest/userfaultfd: test read/write hints Nadav Amit

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=YrIRNUln/K55ZExm@xz-m1.local \
    --to=peterx@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=axelrasmussen@google.com \
    --cc=david@redhat.com \
    --cc=hughd@google.com \
    --cc=linux-mm@kvack.org \
    --cc=mike.kravetz@oracle.com \
    --cc=nadav.amit@gmail.com \
    --cc=rppt@linux.ibm.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 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.