From: David Hildenbrand <david@redhat.com>
To: Christian Borntraeger <borntraeger@de.ibm.com>,
qemu-devel <qemu-devel@nongnu.org>,
Cornelia Huck <cohuck@redhat.com>
Cc: Halil Pasic <pasic@linux.ibm.com>,
qemu-s390x <qemu-s390x@nongnu.org>,
Marc Hartmayer <mhartmay@linux.ibm.com>,
Janosch Frank <frankja@linux.ibm.com>,
Richard Henderson <rth@twiddle.net>
Subject: Re: [PATCH] s390x/pv: Retry ioctls on -EINTR
Date: Fri, 27 Mar 2020 11:01:35 +0100 [thread overview]
Message-ID: <b59a2c64-8c54-c2b7-a076-f190758a87a0@redhat.com> (raw)
In-Reply-To: <db0ca7f9-0ab7-f0c8-4b86-ce5bc2a0a14e@de.ibm.com>
On 27.03.20 10:58, Christian Borntraeger wrote:
>>> I fail to see where that is triggered in the kernel.
>>>
>>> t480s: ~/git/linux/arch/s390/kvm (HEAD losgelöst bei next/master) $ git
>>> grep "EINTR"
>>> kvm-s390.c: if (exit_reason == -EINTR) {
>>> kvm-s390.c: return -EINTR;
>>> kvm-s390.c: rc = -EINTR;
>>> vsie.c: if (rc == -EINTR) {
>>>
>>>
>>> Can you help me out? Is that documented?
>>
>> It is related to the kernel patch.
>> ksm_madvise->unmerge_ksm_pages has
>>
>> if (signal_pending(current))
>> err = -ERESTARTSYS;
>>
>>
>> entry.S will retranslate ERESTARTSYS into -EINTR.
>>
>
> In the end both patches fixes an odd-ball case. Marc had a test running
> that in parallel started guests and randomly killing QEMUs with pkill.
> The QEMUs did end with
>
> qemu-system-s390x: KVM PV command 0 (KVM_PV_ENABLE) failed: header rc 0 rrc 0 IOCTL rc: -12
>
> instead of
>
> qemu-system-s390x: terminating on signal 15 from pid 26495 (pkill)
>
I guess the same can happen with a qemu_cpu_kick(), just that the BQL
protects us from that to happen concurrently.
--
Thanks,
David / dhildenb
next prev parent reply other threads:[~2020-03-27 10:03 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-27 9:43 [PATCH] s390x/pv: Retry ioctls on -EINTR Christian Borntraeger
2020-03-27 9:49 ` David Hildenbrand
2020-03-27 9:54 ` Christian Borntraeger
2020-03-27 9:56 ` David Hildenbrand
2020-03-27 9:58 ` Christian Borntraeger
2020-03-27 10:01 ` David Hildenbrand [this message]
2020-03-27 9:49 ` Janosch Frank
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=b59a2c64-8c54-c2b7-a076-f190758a87a0@redhat.com \
--to=david@redhat.com \
--cc=borntraeger@de.ibm.com \
--cc=cohuck@redhat.com \
--cc=frankja@linux.ibm.com \
--cc=mhartmay@linux.ibm.com \
--cc=pasic@linux.ibm.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-s390x@nongnu.org \
--cc=rth@twiddle.net \
/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).