From: Vitaly Kuznetsov <vkuznets@redhat.com>
To: KY Srinivasan <kys@microsoft.com>
Cc: "devel\@linuxdriverproject.org" <devel@linuxdriverproject.org>,
"linux-kernel\@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Haiyang Zhang <haiyangz@microsoft.com>,
"Alex Ng \(LIS\)" <alexng@microsoft.com>,
"Radim Krcmar" <rkrcmar@redhat.com>,
Cathy Avery <cavery@redhat.com>
Subject: Re: [PATCH] Drivers: hv: vmbus: handle various crash scenarios
Date: Tue, 22 Mar 2016 10:47:36 +0100 [thread overview]
Message-ID: <874mby9747.fsf@vitty.brq.redhat.com> (raw)
In-Reply-To: <SN2PR03MB214219E2FCCA0B1FD176A27BA08F0@SN2PR03MB2142.namprd03.prod.outlook.com> (KY Srinivasan's message of "Mon, 21 Mar 2016 22:44:41 +0000")
KY Srinivasan <kys@microsoft.com> writes:
>> -----Original Message-----
>> From: Vitaly Kuznetsov [mailto:vkuznets@redhat.com]
>> Sent: Monday, March 21, 2016 12:52 AM
>> To: KY Srinivasan <kys@microsoft.com>
>> Cc: devel@linuxdriverproject.org; linux-kernel@vger.kernel.org; Haiyang
>> Zhang <haiyangz@microsoft.com>; Alex Ng (LIS) <alexng@microsoft.com>;
>> Radim Krcmar <rkrcmar@redhat.com>; Cathy Avery <cavery@redhat.com>
>> Subject: Re: [PATCH] Drivers: hv: vmbus: handle various crash scenarios
>>
>> KY Srinivasan <kys@microsoft.com> writes:
>>
>> >> -----Original Message-----
>> >> From: Vitaly Kuznetsov [mailto:vkuznets@redhat.com]
>> >> Sent: Friday, March 18, 2016 5:33 AM
>> >> To: devel@linuxdriverproject.org
>> >> Cc: linux-kernel@vger.kernel.org; KY Srinivasan <kys@microsoft.com>;
>> >> Haiyang Zhang <haiyangz@microsoft.com>; Alex Ng (LIS)
>> >> <alexng@microsoft.com>; Radim Krcmar <rkrcmar@redhat.com>; Cathy
>> >> Avery <cavery@redhat.com>
>> >> Subject: [PATCH] Drivers: hv: vmbus: handle various crash scenarios
>> >>
>> >> Kdump keeps biting. Turns out CHANNELMSG_UNLOAD_RESPONSE is
>> always
>> >> delivered to CPU0 regardless of what CPU we're sending
>> >> CHANNELMSG_UNLOAD
>> >> from. vmbus_wait_for_unload() doesn't account for the fact that in case
>> >> we're crashing on some other CPU and CPU0 is still alive and operational
>> >> CHANNELMSG_UNLOAD_RESPONSE will be delivered there completing
>> >> vmbus_connection.unload_event, our wait on the current CPU will never
>> >> end.
>> >
>> > What was the host you were testing on?
>> >
>>
>> I was testing on both 2012R2 and 2016TP4. The bug is easily reproducible
>> by forcing crash on a secondary CPU, e.g.:
>
> Prior to 2012R2, all messages would be delivered on CPU0 and this includes CHANNELMSG_UNLOAD_RESPONSE.
> For this reason we don't support kexec on pre-2012 R2 hosts. On 2012. From 2012 R2 on, all vmbus
> messages (responses) will be delivered on the CPU that we initially set up - look at the code in
> vmbus_negotiate_version().
Ok, missed that. In that case we need to remember which CPU it was --
I'll add this in v2.
> So on post 2012 R2 hosts, the response to CHANNELMSG_UNLOAD_RESPONSE
> will be delivered on the CPU where we initiate the contact with the host - CHANNELMSG_INITIATE_CONTACT message.
> So, maybe we can stash away the CPU on which we made the initial contact and poll the state on that CPU
> to make forward progress in the case of crash.
Yes, we can't have any expectation about other CPUs on crash as they can
be in any state (crashing also, hanging on some mutex/spinlock/...,) so
we need to use current CPU only. I'll fix and resend.
Thanks!
--
Vitaly
next prev parent reply other threads:[~2016-03-22 9:47 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-18 12:33 [PATCH] Drivers: hv: vmbus: handle various crash scenarios Vitaly Kuznetsov
2016-03-18 15:20 ` Radim Krcmar
2016-03-18 15:53 ` Vitaly Kuznetsov
2016-03-18 16:11 ` Radim Krcmar
2016-03-18 18:02 ` KY Srinivasan
2016-03-21 7:51 ` Vitaly Kuznetsov
2016-03-21 22:44 ` KY Srinivasan
2016-03-22 9:47 ` Vitaly Kuznetsov [this message]
2016-03-22 14:00 ` Vitaly Kuznetsov
2016-03-22 14:18 ` KY Srinivasan
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=874mby9747.fsf@vitty.brq.redhat.com \
--to=vkuznets@redhat.com \
--cc=alexng@microsoft.com \
--cc=cavery@redhat.com \
--cc=devel@linuxdriverproject.org \
--cc=haiyangz@microsoft.com \
--cc=kys@microsoft.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rkrcmar@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