Hi all,
This is a follow-up on the RFC submission [1]. The series introduces
changes in the VMBus drivers to reassign the CPU that a VMbus channel
will interrupt. This feature can be used for load balancing or other
purposes (e.g. CPU offlining). The submission integrates feedback in
the RFC to amend the handling of the 'array of channels' (patch #3).
Thanks,
Andrea
[1] https://lkml.kernel.org/r/[email protected]
Cc: "David S. Miller" <[email protected]>
Cc: Lorenzo Pieralisi <[email protected]>
Cc: Andrew Murray <[email protected]>
Cc: Bjorn Helgaas <[email protected]>
Cc: "James E.J. Bottomley" <[email protected]>
Cc: "Martin K. Petersen" <[email protected]>
Andrea Parri (Microsoft) (11):
Drivers: hv: vmbus: Always handle the VMBus messages on CPU0
Drivers: hv: vmbus: Don't bind the offer&rescind works to a specific
CPU
Drivers: hv: vmbus: Replace the per-CPU channel lists with a global
array of channels
hv_netvsc: Disable NAPI before closing the VMBus channel
hv_utils: Always execute the fcopy and vss callbacks in a tasklet
Drivers: hv: vmbus: Use a spin lock for synchronizing channel
scheduling vs. channel removal
PCI: hv: Prepare hv_compose_msi_msg() for the
VMBus-channel-interrupt-to-vCPU reassignment functionality
Drivers: hv: vmbus: Remove the unused HV_LOCALIZED channel affinity
logic
Drivers: hv: vmbus: Synchronize init_vp_index() vs. CPU hotplug
Drivers: hv: vmbus: Introduce the CHANNELMSG_MODIFYCHANNEL message
type
scsi: storvsc: Re-init stor_chns when a channel interrupt is
re-assigned
drivers/hv/channel.c | 58 +++--
drivers/hv/channel_mgmt.c | 347 +++++++++++++++-------------
drivers/hv/connection.c | 58 +----
drivers/hv/hv.c | 16 +-
drivers/hv/hv_fcopy.c | 2 +-
drivers/hv/hv_snapshot.c | 2 +-
drivers/hv/hv_trace.h | 19 ++
drivers/hv/hyperv_vmbus.h | 32 ++-
drivers/hv/vmbus_drv.c | 241 +++++++++++++++----
drivers/net/hyperv/netvsc.c | 7 +-
drivers/pci/controller/pci-hyperv.c | 44 ++--
drivers/scsi/storvsc_drv.c | 95 +++++++-
include/linux/hyperv.h | 51 ++--
13 files changed, 620 insertions(+), 352 deletions(-)
--
2.24.0
On Mon, Apr 13, 2020 at 04:48:36PM +0100, Wei Liu wrote:
> On Mon, Apr 06, 2020 at 02:15:03AM +0200, Andrea Parri (Microsoft) wrote:
> > Hi all,
> >
> > This is a follow-up on the RFC submission [1]. The series introduces
> > changes in the VMBus drivers to reassign the CPU that a VMbus channel
> > will interrupt. This feature can be used for load balancing or other
> > purposes (e.g. CPU offlining). The submission integrates feedback in
> > the RFC to amend the handling of the 'array of channels' (patch #3).
> >
> > Thanks,
> > Andrea
> >
> > [1] https://lkml.kernel.org/r/[email protected]
> >
> > Cc: "David S. Miller" <[email protected]>
> > Cc: Lorenzo Pieralisi <[email protected]>
> > Cc: Andrew Murray <[email protected]>
> > Cc: Bjorn Helgaas <[email protected]>
> > Cc: "James E.J. Bottomley" <[email protected]>
> > Cc: "Martin K. Petersen" <[email protected]>
> >
> > Andrea Parri (Microsoft) (11):
> > Drivers: hv: vmbus: Always handle the VMBus messages on CPU0
> > Drivers: hv: vmbus: Don't bind the offer&rescind works to a specific
> > CPU
> > Drivers: hv: vmbus: Replace the per-CPU channel lists with a global
> > array of channels
> > hv_netvsc: Disable NAPI before closing the VMBus channel
> > hv_utils: Always execute the fcopy and vss callbacks in a tasklet
> > Drivers: hv: vmbus: Use a spin lock for synchronizing channel
> > scheduling vs. channel removal
> > PCI: hv: Prepare hv_compose_msi_msg() for the
> > VMBus-channel-interrupt-to-vCPU reassignment functionality
> > Drivers: hv: vmbus: Remove the unused HV_LOCALIZED channel affinity
> > logic
> > Drivers: hv: vmbus: Synchronize init_vp_index() vs. CPU hotplug
> > Drivers: hv: vmbus: Introduce the CHANNELMSG_MODIFYCHANNEL message
> > type
> > scsi: storvsc: Re-init stor_chns when a channel interrupt is
> > re-assigned
> >
>
> Applied to hyperv-next. Thanks.
>
> This hunk in patch 10 doesn't apply cleanly because it conflicts with
> Vitaly's patch.
>
> diff --git a/drivers/hv/channel_mgmt.c b/drivers/hv/channel_mgmt.c
> index 3785beead503d..1058c814ab06e 100644
> --- a/drivers/hv/channel_mgmt.c
> +++ b/drivers/hv/channel_mgmt.c
> @@ -1377,7 +1377,7 @@ channel_message_table[CHANNELMSG_COUNT] = {
> { CHANNELMSG_19, 0, NULL },
> { CHANNELMSG_20, 0, NULL },
> { CHANNELMSG_TL_CONNECT_REQUEST, 0, NULL },
> - { CHANNELMSG_22, 0, NULL },
> + { CHANNELMSG_MODIFYCHANNEL, 0, NULL },
> { CHANNELMSG_TL_CONNECT_RESULT, 0, NULL },
> };
>
> I have fixed it up. New hunk looks like:
>
> diff --git a/drivers/hv/channel_mgmt.c b/drivers/hv/channel_mgmt.c
> index a6b21838e2de..9c62eb5e4135 100644
> --- a/drivers/hv/channel_mgmt.c
> +++ b/drivers/hv/channel_mgmt.c
> @@ -1380,7 +1380,7 @@ channel_message_table[CHANNELMSG_COUNT] = {
> { CHANNELMSG_19, 0, NULL, 0},
> { CHANNELMSG_20, 0, NULL, 0},
> { CHANNELMSG_TL_CONNECT_REQUEST, 0, NULL, 0},
> - { CHANNELMSG_22, 0, NULL, 0},
> + { CHANNELMSG_MODIFYCHANNEL, 0, NULL, 0},
> { CHANNELMSG_TL_CONNECT_RESULT, 0, NULL, 0},
> };
The fix looks good to me. Thank you Wei!
Thanks,
Andrea
On Mon, Apr 06, 2020 at 02:15:03AM +0200, Andrea Parri (Microsoft) wrote:
> Hi all,
>
> This is a follow-up on the RFC submission [1]. The series introduces
> changes in the VMBus drivers to reassign the CPU that a VMbus channel
> will interrupt. This feature can be used for load balancing or other
> purposes (e.g. CPU offlining). The submission integrates feedback in
> the RFC to amend the handling of the 'array of channels' (patch #3).
>
> Thanks,
> Andrea
>
> [1] https://lkml.kernel.org/r/[email protected]
>
> Cc: "David S. Miller" <[email protected]>
> Cc: Lorenzo Pieralisi <[email protected]>
> Cc: Andrew Murray <[email protected]>
> Cc: Bjorn Helgaas <[email protected]>
> Cc: "James E.J. Bottomley" <[email protected]>
> Cc: "Martin K. Petersen" <[email protected]>
>
> Andrea Parri (Microsoft) (11):
> Drivers: hv: vmbus: Always handle the VMBus messages on CPU0
> Drivers: hv: vmbus: Don't bind the offer&rescind works to a specific
> CPU
> Drivers: hv: vmbus: Replace the per-CPU channel lists with a global
> array of channels
> hv_netvsc: Disable NAPI before closing the VMBus channel
> hv_utils: Always execute the fcopy and vss callbacks in a tasklet
> Drivers: hv: vmbus: Use a spin lock for synchronizing channel
> scheduling vs. channel removal
> PCI: hv: Prepare hv_compose_msi_msg() for the
> VMBus-channel-interrupt-to-vCPU reassignment functionality
> Drivers: hv: vmbus: Remove the unused HV_LOCALIZED channel affinity
> logic
> Drivers: hv: vmbus: Synchronize init_vp_index() vs. CPU hotplug
> Drivers: hv: vmbus: Introduce the CHANNELMSG_MODIFYCHANNEL message
> type
> scsi: storvsc: Re-init stor_chns when a channel interrupt is
> re-assigned
>
Applied to hyperv-next. Thanks.
This hunk in patch 10 doesn't apply cleanly because it conflicts with
Vitaly's patch.
diff --git a/drivers/hv/channel_mgmt.c b/drivers/hv/channel_mgmt.c
index 3785beead503d..1058c814ab06e 100644
--- a/drivers/hv/channel_mgmt.c
+++ b/drivers/hv/channel_mgmt.c
@@ -1377,7 +1377,7 @@ channel_message_table[CHANNELMSG_COUNT] = {
{ CHANNELMSG_19, 0, NULL },
{ CHANNELMSG_20, 0, NULL },
{ CHANNELMSG_TL_CONNECT_REQUEST, 0, NULL },
- { CHANNELMSG_22, 0, NULL },
+ { CHANNELMSG_MODIFYCHANNEL, 0, NULL },
{ CHANNELMSG_TL_CONNECT_RESULT, 0, NULL },
};
I have fixed it up. New hunk looks like:
diff --git a/drivers/hv/channel_mgmt.c b/drivers/hv/channel_mgmt.c
index a6b21838e2de..9c62eb5e4135 100644
--- a/drivers/hv/channel_mgmt.c
+++ b/drivers/hv/channel_mgmt.c
@@ -1380,7 +1380,7 @@ channel_message_table[CHANNELMSG_COUNT] = {
{ CHANNELMSG_19, 0, NULL, 0},
{ CHANNELMSG_20, 0, NULL, 0},
{ CHANNELMSG_TL_CONNECT_REQUEST, 0, NULL, 0},
- { CHANNELMSG_22, 0, NULL, 0},
+ { CHANNELMSG_MODIFYCHANNEL, 0, NULL, 0},
{ CHANNELMSG_TL_CONNECT_RESULT, 0, NULL, 0},
};
Let me know if I messed it up.
Wei.