qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Peter Xu <peterx@redhat.com>
To: Andrey Gruzdev <andrey.gruzdev@virtuozzo.com>
Cc: Juan Quintela <quintela@redhat.com>,
	Markus Armbruster <armbru@redhat.com>,
	qemu-devel@nongnu.org,
	"Dr . David Alan Gilbert" <dgilbert@redhat.com>,
	Paolo Bonzini <pbonzini@redhat.com>, Den Lunev <den@openvz.org>
Subject: Re: [PATCH v11 5/5] migration: introduce 'userfaultfd-wrlat.py' script
Date: Thu, 21 Jan 2021 10:37:22 -0500	[thread overview]
Message-ID: <20210121153722.GC260413@xz-x1> (raw)
In-Reply-To: <b51af344-856a-cb27-5aa8-c25e6aaf536e@virtuozzo.com>

On Thu, Jan 21, 2021 at 04:12:23PM +0300, Andrey Gruzdev wrote:
> > > +/* KRETPROBE for handle_userfault(). */
> > > +int retprobe_handle_userfault(struct pt_regs *ctx)
> > > +{
> > > +    u64 pid = (u32) bpf_get_current_pid_tgid();
> > > +    u64 *addr_p;
> > > +
> > > +    /*
> > > +     * Here we just ignore the return value. In case of spurious wakeup
> > > +     * or pending signal we'll still get (at least for v5.8.0 kernel)
> > > +     * VM_FAULT_RETRY or (VM_FAULT_RETRY | VM_FAULT_MAJOR) here.
> > > +     * Anyhow, handle_userfault() would be re-entered if such case happens,
> > > +     * keeping initial timestamp unchanged for the faulting thread.
> > AFAIU this comment is not matching what the code does.  But I agree it's not a
> > big problem because we won't miss any long delays (because the one long delayed
> > sample will just be split into two or multiple delays, which will still be
> > reflected in the histogram at last).  Or am I wrong?
> 
> Mm, not really sure about comment.. I need to read kernel code again.

Not relevant to kernel; I was only talking about the last sentence where we
won't "keeping initial timestamp unchanged" but we'll do the statistic anyways.
Because exactly as you said we'll get VM_FAULT_RETRY unconditionally while we
won't be able to identify whether the page fault request is resolved or not.

-- 
Peter Xu



  reply	other threads:[~2021-01-21 15:38 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-06 15:21 [PATCH v11 0/5] UFFD write-tracking migration/snapshots Andrey Gruzdev via
2021-01-06 15:21 ` [PATCH v11 1/5] migration: introduce 'background-snapshot' migration capability Andrey Gruzdev via
2021-01-06 15:21 ` [PATCH v11 2/5] migration: introduce UFFD-WP low-level interface helpers Andrey Gruzdev via
2021-01-06 15:21 ` [PATCH v11 3/5] migration: support UFFD write fault processing in ram_save_iterate() Andrey Gruzdev via
2021-01-19 17:49   ` Dr. David Alan Gilbert
2021-01-21  8:48     ` Andrey Gruzdev
2021-01-21 10:09       ` Dr. David Alan Gilbert
2021-01-21 11:12         ` Andrey Gruzdev
2021-01-06 15:21 ` [PATCH v11 4/5] migration: implementation of background snapshot thread Andrey Gruzdev via
2021-01-19 18:49   ` Dr. David Alan Gilbert
2021-01-21  8:58     ` Andrey Gruzdev
2021-01-21  9:56       ` Dr. David Alan Gilbert
2021-01-21 11:08         ` Andrey Gruzdev
2021-01-21 16:11           ` Dr. David Alan Gilbert
2021-01-21 17:28             ` Andrey Gruzdev
2021-01-21 17:48               ` Dr. David Alan Gilbert
2021-01-21 18:29                 ` Andrey Gruzdev
2021-01-06 15:21 ` [PATCH v11 5/5] migration: introduce 'userfaultfd-wrlat.py' script Andrey Gruzdev via
2021-01-19 21:01   ` Peter Xu
2021-01-21 13:12     ` Andrey Gruzdev
2021-01-21 15:37       ` Peter Xu [this message]
2021-01-21 17:15         ` Andrey Gruzdev
2021-01-15 11:34 ` [PATCH v11 0/5] UFFD write-tracking migration/snapshots Andrey Gruzdev
2021-01-15 14:54   ` Peter Xu

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=20210121153722.GC260413@xz-x1 \
    --to=peterx@redhat.com \
    --cc=andrey.gruzdev@virtuozzo.com \
    --cc=armbru@redhat.com \
    --cc=den@openvz.org \
    --cc=dgilbert@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=quintela@redhat.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).