kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Peter Xu <peterx@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: linux-kernel@vger.kernel.org, kvm@vger.kernel.org,
	stable@vger.kernel.org
Subject: Re: [PATCH] KVM: selftests: Always run vCPU thread with blocked SIG_IPI
Date: Tue, 20 Apr 2021 12:58:34 -0400	[thread overview]
Message-ID: <20210420165834.GC4440@xz-x1> (raw)
In-Reply-To: <84c52ebe-58a2-6188-270e-c86409e44fa3@redhat.com>

On Tue, Apr 20, 2021 at 06:24:50PM +0200, Paolo Bonzini wrote:
> On 20/04/21 17:32, Peter Xu wrote:
> > On Tue, Apr 20, 2021 at 10:37:39AM -0400, Peter Xu wrote:
> > > On Tue, Apr 20, 2021 at 04:16:14AM -0400, Paolo Bonzini wrote:
> > > > The main thread could start to send SIG_IPI at any time, even before signal
> > > > blocked on vcpu thread.  Therefore, start the vcpu thread with the signal
> > > > blocked.
> > > > 
> > > > Without this patch, on very busy cores the dirty_log_test could fail directly
> > > > on receiving a SIGUSR1 without a handler (when vcpu runs far slower than main).
> > > > 
> > > > Reported-by: Peter Xu <peterx@redhat.com>
> > > > Cc: stable@vger.kernel.org
> > > > Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> > > 
> > > Yes, indeed better! :)
> > > 
> > > Reviewed-by: Peter Xu <peterx@redhat.com>
> > 
> > I just remembered one thing: this will avoid program quits, but still we'll get
> > the signal missing.
> 
> In what sense the signal will be missing?  As long as the thread exists, the
> signal will be accepted (but not delivered because it is blocked); it will
> then be delivered on the first KVM_RUN.

Ah right..  Thanks,

-- 
Peter Xu


      reply	other threads:[~2021-04-20 16:58 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-20  8:16 [PATCH] KVM: selftests: Always run vCPU thread with blocked SIG_IPI Paolo Bonzini
2021-04-20 14:37 ` Peter Xu
2021-04-20 15:32   ` Peter Xu
2021-04-20 16:24     ` Paolo Bonzini
2021-04-20 16:58       ` Peter Xu [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=20210420165834.GC4440@xz-x1 \
    --to=peterx@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=stable@vger.kernel.org \
    /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).