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 11:32:23 -0400	[thread overview]
Message-ID: <20210420153223.GB4440@xz-x1> (raw)
In-Reply-To: <20210420143739.GA4440@xz-x1>

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.  From that pov I slightly prefer the old patch.  However
not a big deal so far as only dirty ring uses SIG_IPI, so there's always ring
full which will just delay the kick. It's just we need to remember this when we
extend IPI to non-dirty-ring tests as the kick is prone to be lost then.

Thanks,

-- 
Peter Xu


  reply	other threads:[~2021-04-20 15:32 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 [this message]
2021-04-20 16:24     ` Paolo Bonzini
2021-04-20 16:58       ` 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=20210420153223.GB4440@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).