Andrea Parri (Microsoft)
afaa33da08
Drivers: hv: vmbus: Resolve more races involving init_vp_index()
...
init_vp_index() uses the (per-node) hv_numa_map[] masks to record the
CPUs allocated for channel interrupts at a given time, and distribute
the performance-critical channels across the available CPUs: in part.,
the mask of "candidate" target CPUs in a given NUMA node, for a newly
offered channel, is determined by XOR-ing the node's CPU mask and the
node's hv_numa_map. This operation/mechanism assumes that no offline
CPUs is set in the hv_numa_map mask, an assumption that does not hold
since such mask is currently not updated when a channel is removed or
assigned to a different CPU.
To address the issues described above, this adds hooks in the channel
removal path (hv_process_channel_removal()) and in target_cpu_store()
in order to clear, resp. to update, the hv_numa_map[] masks as needed.
This also adds a (missed) update of the masks in init_vp_index() (cf.,
e.g., the memory-allocation failure path in this function).
Like in the case of init_vp_index(), such hooks require to determine
if the given channel is performance critical. init_vp_index() does
this by parsing the channel's offer, it can not rely on the device
data structure (device_obj) to retrieve such information because the
device data structure has not been allocated/linked with the channel
by the time that init_vp_index() executes. A similar situation may
hold in hv_is_alloced_cpu() (defined below); the adopted approach is
to "cache" the device type of the channel, as computed by parsing the
channel's offer, in the channel structure itself.
Fixes: 7527810573 ("Drivers: hv: vmbus: Introduce the CHANNELMSG_MODIFYCHANNEL message type")
Signed-off-by: Andrea Parri (Microsoft) <parri.andrea@gmail.com >
Reviewed-by: Michael Kelley <mikelley@microsoft.com >
Link: https://lore.kernel.org/r/20200522171901.204127-3-parri.andrea@gmail.com
Signed-off-by: Wei Liu <wei.liu@kernel.org >
2020-05-23 09:07:00 +00:00
..
2020-04-01 08:03:28 +02:00
2020-04-18 15:44:54 -05:00
2020-03-30 12:42:42 +02:00
2020-03-24 16:19:01 -07:00
2020-04-03 15:05:35 -07:00
2020-04-01 14:47:40 -07:00
2020-03-31 21:29:04 +02:00
2020-04-08 21:25:49 -07:00
2020-04-16 10:28:12 +01:00
2020-04-08 21:29:10 -07:00
2020-04-01 18:18:18 -07:00
2020-03-26 14:45:31 +01:00
2020-03-30 10:14:19 +02:00
2020-03-15 15:20:16 +01:00
2020-03-15 15:20:16 +01:00
2020-03-15 15:20:16 +01:00
2020-03-15 15:20:16 +01:00
2020-03-15 15:20:16 +01:00
2020-03-17 22:50:30 +00:00
2020-03-19 13:59:46 +01:00
2020-03-31 22:08:54 +02:00
2020-04-18 15:44:55 -05:00
2020-04-10 15:36:22 -07:00
2020-03-30 11:45:18 -07:00
2020-03-24 07:57:08 -06:00
2020-03-18 21:57:20 +00:00
2020-04-18 15:44:56 -05:00
2020-04-03 15:05:35 -07:00
2020-03-20 19:25:14 +05:30
2020-04-07 19:44:52 -07:00
2020-04-07 13:51:39 -07:00
2020-03-16 22:08:34 -04:00
2020-04-02 15:50:04 -07:00
2020-04-08 21:03:40 -07:00
2020-03-28 13:19:05 -05:00
2020-03-31 10:05:01 -07:00
2020-03-25 10:03:36 -05:00
2020-04-18 15:44:54 -05:00
2020-03-12 15:48:37 -07:00
2020-04-07 10:43:42 -07:00
2020-04-07 10:43:43 -07:00
2020-04-18 15:44:54 -05:00
2020-04-01 14:56:44 -06:00
2020-04-18 15:44:54 -05:00
2020-03-30 11:43:51 -07:00
2020-03-30 01:34:00 +02:00
2020-03-30 01:34:00 +02:00
2020-03-30 14:59:53 -07:00
2020-03-30 17:36:33 -07:00
2020-03-30 19:52:37 -07:00
2020-03-27 16:07:24 -07:00
2020-04-15 23:58:48 -04:00
2020-04-03 11:30:20 -07:00
2020-03-25 17:38:23 -07:00
2020-03-21 15:23:56 +01:00
2020-04-10 15:36:21 -07:00
2020-03-31 11:04:05 -07:00
2020-04-07 10:43:42 -07:00
2020-04-07 10:43:42 -07:00
2020-03-21 16:00:24 +01:00
2020-03-17 15:26:43 +01:00
2020-03-21 15:23:53 +01:00
2020-03-21 11:32:20 +01:00
2020-04-18 15:44:55 -05:00
2020-03-28 11:42:55 +01:00
2020-03-16 15:48:54 +00:00
2020-03-20 13:06:18 +01:00
2020-04-03 11:32:13 -04:00
2020-04-02 19:15:03 -07:00
2020-04-01 14:47:40 -07:00
2020-04-07 10:45:15 +02:00
2020-03-25 08:35:03 +09:00
2020-04-02 19:15:03 -07:00
2020-04-08 11:00:00 -07:00
2020-04-18 15:44:54 -05:00
2020-04-18 15:44:54 -05:00
2020-03-16 10:48:12 +01:00
2020-03-20 14:57:54 +01:00
2020-03-31 11:04:05 -07:00
2020-03-21 15:24:00 +01:00
2020-04-18 15:44:54 -05:00
2020-04-18 15:44:54 -05:00
2020-03-22 23:06:34 +01:00
2020-04-18 15:44:54 -05:00
2020-03-19 07:41:01 +01:00
2020-03-25 08:16:13 +09:00
2020-03-22 21:16:28 -07:00
2020-03-25 23:17:16 +01:00
2020-03-20 08:47:27 -06:00
2020-03-13 12:49:51 -07:00
2020-03-20 14:54:04 +01:00
2020-04-04 11:58:55 -07:00
2020-03-19 21:56:54 -07:00
2020-03-25 10:27:16 +01:00
2020-03-25 10:27:16 +01:00
2020-04-18 15:44:54 -05:00
2020-03-30 11:20:13 -07:00
2020-04-07 10:43:38 -07:00
2020-03-21 16:03:53 +01:00
2020-03-17 17:25:06 +01:00
2020-03-27 20:19:24 -03:00
2020-04-07 10:43:39 -07:00
2020-04-02 09:35:32 -07:00
2020-04-10 15:36:21 -07:00
2020-05-23 09:07:00 +00:00
2020-04-15 11:48:21 +02:00
2020-03-29 21:25:29 -07:00
2020-04-18 15:44:55 -05:00
2020-04-18 15:44:55 -05:00
2020-03-12 07:43:57 -04:00
2020-03-12 22:34:48 -07:00
2020-03-13 14:25:46 +01:00
2020-03-12 07:07:38 -06:00
2020-03-27 11:14:52 +01:00
2020-03-23 22:00:02 -07:00
2020-03-29 22:30:57 -07:00
2020-03-21 16:00:24 +01:00
2020-04-19 11:23:33 -07:00
2020-03-17 19:13:32 +01:00
2020-04-01 13:20:14 +02:00
2020-03-21 15:23:58 +01:00
2020-04-02 09:35:30 -07:00
2020-03-16 15:53:47 -04:00
2020-03-29 12:40:41 +01:00
2020-04-02 09:35:25 -07:00
2020-03-30 18:51:47 -07:00
2020-03-31 10:48:03 -04:00
2020-04-06 22:55:27 +02:00
2020-03-26 10:28:20 -06:00
2020-03-17 12:23:21 -07:00
2020-03-31 17:29:33 -07:00
2020-04-18 15:44:55 -05:00
2020-03-17 17:25:06 +01:00
2020-03-23 18:40:25 +01:00
2020-03-30 01:34:00 +02:00
2020-03-31 17:29:33 -07:00
2020-03-21 15:23:56 +01:00
2020-03-17 22:51:16 -07:00
2020-04-10 15:36:21 -07:00
2020-04-18 15:44:55 -05:00
2020-04-10 15:36:21 -07:00
2020-04-07 10:43:40 -07:00
2020-04-02 09:35:31 -07:00
2020-04-08 21:03:40 -07:00
2020-03-26 15:51:07 +01:00
2020-03-26 14:33:38 -03:00
2020-03-15 17:10:14 -07:00
2020-03-19 07:41:02 +01:00
2020-04-07 10:43:38 -07:00
2020-04-07 10:43:41 -07:00
2020-04-10 15:36:21 -07:00
2020-04-08 21:03:40 -07:00
2020-05-20 09:13:59 +00:00
2020-03-24 13:42:44 +01:00
2020-03-24 07:57:08 -06:00
2020-03-21 16:00:24 +01:00
2020-03-13 21:08:19 -04:00
2020-03-26 20:17:36 -07:00
2020-03-30 19:52:37 -07:00
2020-03-18 16:35:48 -07:00
2020-03-25 18:58:11 -07:00
2020-04-06 13:56:33 -04:00
2020-04-01 13:37:57 -04:00
2020-04-07 13:51:39 -07:00
2020-04-04 09:09:39 +02:00
2020-03-19 07:41:02 +01:00
2020-04-02 09:35:27 -07:00
2020-04-07 10:43:39 -07:00
2020-04-07 10:43:38 -07:00
2020-04-07 10:43:38 -07:00
2020-03-25 09:50:09 -06:00
2020-04-03 14:25:02 -07:00
2020-03-28 13:19:04 -05:00
2020-04-02 17:57:10 +01:00
2020-04-02 17:57:10 +01:00
2020-04-03 14:25:02 -07:00
2020-04-07 10:43:43 -07:00
2020-03-27 10:41:44 -03:00
2020-03-23 22:00:02 -07:00
2020-03-30 11:52:27 -07:00
2020-04-09 12:15:35 -05:00
2020-04-01 08:06:54 +02:00
2020-03-17 18:31:05 +01:00
2020-04-18 15:44:55 -05:00
2020-04-10 13:18:57 -07:00
2020-04-07 10:43:42 -07:00
2020-04-02 11:22:17 -07:00
2020-03-20 13:06:18 +01:00
2020-03-20 13:06:19 +01:00
2020-03-30 11:16:38 -07:00
2020-03-18 15:05:57 +00:00
2020-03-30 16:55:26 +02:00
2020-03-21 16:00:22 +01:00
2020-04-08 12:05:07 +02:00
2020-03-25 22:29:45 -07:00
2020-03-27 16:39:01 -04:00
2020-04-18 15:44:56 -05:00
2020-04-18 15:44:56 -05:00
2020-04-02 18:47:30 +02:00
2020-03-21 16:00:24 +01:00
2020-03-21 16:00:24 +01:00
2020-04-02 11:22:17 -07:00
2020-03-31 15:49:51 -07:00
2020-04-07 10:43:42 -07:00
2020-03-17 15:58:00 +01:00
2020-03-12 17:16:42 +01:00
2020-04-07 10:43:38 -07:00
2020-03-26 14:41:22 -04:00
2020-04-18 15:44:56 -05:00
2020-04-10 15:36:20 -07:00
2020-03-30 12:18:49 -07:00
2020-03-21 16:00:24 +01:00
2020-03-21 16:00:24 +01:00
2020-04-07 10:43:43 -07:00
2020-03-18 09:50:20 +00:00
2020-03-23 13:41:55 +01:00
2020-04-18 15:44:56 -05:00
2020-04-07 10:43:41 -07:00
2020-04-05 11:34:35 -07:00
2020-03-29 22:14:48 -07:00
2020-03-12 11:56:53 +01:00
2020-03-21 17:48:13 +01:00
2020-04-18 15:44:56 -05:00
2020-03-30 18:51:47 -07:00
2020-03-21 15:23:58 +01:00
2020-03-21 15:23:57 +01:00
2020-03-30 14:59:53 -07:00
2020-04-02 09:35:26 -07:00
2020-04-18 15:44:56 -05:00
2020-03-19 17:48:36 -04:00
2020-03-18 12:34:10 +01:00
2020-04-07 10:43:39 -07:00
2020-03-23 17:01:47 +01:00
2020-04-01 12:06:26 -04:00
2020-03-24 09:32:41 -06:00
2020-04-01 12:06:26 -04:00
2020-04-07 10:43:38 -07:00
2020-03-21 18:56:06 -07:00
2020-04-01 12:06:26 -04:00
2020-04-03 12:27:36 -07:00
2020-03-12 17:42:08 -04:00
2020-04-18 15:44:56 -05:00