The logic is unused since commit 509879bdb30b8 ("Drivers: hv: Introduce a policy for controlling channel affinity"). This logic assumes that a channel target_cpu doesn't change during the lifetime of a channel, but this assumption is incompatible with the new functionality that allows changing the vCPU a channel will interrupt.
Showing the changes to include/linux (1 of 2 files). Show all
Unified · Split
| @@ -689,11 +689,6 @@ union hv_connection_id { · 688 unmodified lines | ||
| 689 | 689 | } u; |
| 690 | 690 | }; |
| 691 | 691 | |
| 692 | −enum hv_numa_policy { | |
| 693 | − HV_BALANCED = 0, | |
| 694 | − HV_LOCALIZED, | |
| 695 | −}; | |
| 696 | − | |
| 697 | 692 | enum vmbus_device_type { |
| 698 | 693 | HV_IDE = 0, |
| 699 | 694 | HV_SCSI, |
| @@ -808,10 +803,6 @@ struct vmbus_channel { · 108 unmodified lines | ||
| 808 | 803 | u32 target_vp; |
| 809 | 804 | /* The corresponding CPUID in the guest */ |
| 810 | 805 | u32 target_cpu; |
| 811 | − /* | |
| 812 | − * State to manage the CPU affiliation of channels. | |
| 813 | − */ | |
| 814 | − struct cpumask alloced_cpus_in_node; | |
| 815 | 806 | int numa_node; |
| 816 | 807 | /* |
| 817 | 808 | * Support for sub-channels. For high performance devices, |
| @@ -898,18 +889,6 @@ struct vmbus_channel { · 80 unmodified lines | ||
| 898 | 889 | */ |
| 899 | 890 | bool low_latency; |
| 900 | 891 | |
| 901 | − /* | |
| 902 | − * NUMA distribution policy: | |
| 903 | − * We support two policies: | |
| 904 | − * 1) Balanced: Here all performance critical channels are | |
| 905 | − * distributed evenly amongst all the NUMA nodes. | |
| 906 | − * This policy will be the default policy. | |
| 907 | − * 2) Localized: All channels of a given instance of a | |
| 908 | − * performance critical service will be assigned CPUs | |
| 909 | − * within a selected NUMA node. | |
| 910 | − */ | |
| 911 | − enum hv_numa_policy affinity_policy; | |
| 912 | − | |
| 913 | 892 | bool probe_done; |
| 914 | 893 | |
| 915 | 894 | /* |
| @@ -965,12 +944,6 @@ static inline bool is_sub_channel(const struct vmbus_channel *c) · 49 unmodified lines | ||
| 965 | 944 | return c->offermsg.offer.sub_channel_index != 0; |
| 966 | 945 | } |
| 967 | 946 | |
| 968 | −static inline void set_channel_affinity_state(struct vmbus_channel *c, | |
| 969 | − enum hv_numa_policy policy) | |
| 970 | −{ | |
| 971 | − c->affinity_policy = policy; | |
| 972 | −} | |
| 973 | − | |
| 974 | 947 | static inline void set_channel_read_mode(struct vmbus_channel *c, |
| 975 | 948 | enum hv_callback_mode mode) |
| 976 | 949 | { |