[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] s390x/pv: Retry ioctls on -EINTR
From: |
David Hildenbrand |
Subject: |
Re: [PATCH] s390x/pv: Retry ioctls on -EINTR |
Date: |
Fri, 27 Mar 2020 11:01:35 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.6.0 |
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