From: Dexuan Cui <decui@microsoft.com>
To: "gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"driverdev-devel@linuxdriverproject.org"
<driverdev-devel@linuxdriverproject.org>,
"olaf@aepfle.de" <olaf@aepfle.de>,
"apw@canonical.com" <apw@canonical.com>,
"jasowang@redhat.com" <jasowang@redhat.com>,
KY Srinivasan <kys@microsoft.com>
Subject: RE: [PATCH] Drivers: hv: vmbus: fix init_vp_index() for reloading hv_netvsc
Date: Wed, 12 Aug 2015 12:29:46 +0000 [thread overview]
Message-ID: <df758dc5629e421cb6089e85516384e4@SIXPR30MB031.064d.mgd.msft.net> (raw)
In-Reply-To: <1439387326-32427-1-git-send-email-decui@microsoft.com>
> From: devel [mailto:driverdev-devel-bounces@linuxdriverproject.org] On Behalf
> Of Dexuan Cui
> Sent: Wednesday, August 12, 2015 21:49
> To: gregkh@linuxfoundation.org; linux-kernel@vger.kernel.org; driverdev-
> devel@linuxdriverproject.org; olaf@aepfle.de; apw@canonical.com;
> jasowang@redhat.com; KY Srinivasan <kys@microsoft.com>
> Subject: [PATCH] Drivers: hv: vmbus: fix init_vp_index() for reloading hv_netvsc
>
> This fixes the recent commit:
> Drivers: hv: vmbus: Further improve CPU affiliation logic
>
> Without the fix, reloading hv_netvsc hangs the guest.
>
> Signed-off-by: Dexuan Cui <decui@microsoft.com>
> ---
> drivers/hv/channel_mgmt.c | 13 +++++++++++++
> 1 file changed, 13 insertions(+)
>
> diff --git a/drivers/hv/channel_mgmt.c b/drivers/hv/channel_mgmt.c
> index 2f9aead..f61bd07 100644
> --- a/drivers/hv/channel_mgmt.c
> +++ b/drivers/hv/channel_mgmt.c
> @@ -458,6 +458,19 @@ static void init_vp_index(struct vmbus_channel
> *channel, const uuid_le *type_gui
> continue;
> }
>
> + if (cpumask_weight(&primary->alloced_cpus_in_node) ==
> + cpumask_weight(cpumask_of_node(primary->numa_node))) {
> + /*
> + * We have cycled through all the CPUs in the node;
> + * reset the alloced map.
> + * This is necessary because we never clear
> + * primary->alloced_cpus_in_node in other places.
> + * We need this to "break" the loop when reloading
> + * hv_netvsc in SMP guest.
> + */
> + cpumask_clear(&primary->alloced_cpus_in_node);
> + }
> +
> if (!cpumask_test_cpu(cur_cpu,
> &primary->alloced_cpus_in_node)) {
> cpumask_set_cpu(cur_cpu,
> --
Sorry, please drop the patch.
I shouldn't simply clear primary->alloced_cpus_in_node -- I didn't realize
reloading hv_netvsc doesn't invoke init_vp_index() for the primary channel.
I'll make a V2 patch.
Thanks,
-- Dexuan
next prev parent reply other threads:[~2015-08-12 12:45 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-12 13:48 Dexuan Cui
2015-08-12 12:29 ` Dexuan Cui [this message]
2015-08-12 13:05 ` Dan Carpenter
2015-08-12 13:35 ` Dexuan Cui
2015-08-12 14:11 ` Dan Carpenter
2015-08-12 15:50 ` Dexuan Cui
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=df758dc5629e421cb6089e85516384e4@SIXPR30MB031.064d.mgd.msft.net \
--to=decui@microsoft.com \
--cc=apw@canonical.com \
--cc=driverdev-devel@linuxdriverproject.org \
--cc=gregkh@linuxfoundation.org \
--cc=jasowang@redhat.com \
--cc=kys@microsoft.com \
--cc=linux-kernel@vger.kernel.org \
--cc=olaf@aepfle.de \
/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
all inboxes | Powered by JetHome®