Commit b0eaef3
authored
CA-421847: set vcpu affinity if node claim succeeded (#6794)
Only set affinity when VM successfully claim pages on a single node:
```
xensource.log:2025-12-15T17:04:34.833013+00:00 host-34 xenopsd-xc: [debug||38 |Async.VM.start R:b195b91f07ac|xenops]
Domain.numa_placement.(fun).set_vcpu_affinity: setting vcpu affinity for domain 43:
[40; 41; 42; 43; 44; 45; 46; 47; 48; 49; 50; 51; 52; 53; 54; 55; 56; \x0A 57; 58; 59; 60; 61; 62; 63; 64; 65; 66; 67; 68; 69; 70; 71; 72; 73; \x0A 74; 75; 76; 77; 78; 79]
xensource.log:2025-12-15T17:04:34.907898+00:00 host-34 xenopsd-xc: [debug||74 |Async.VM.start R:d4600f3c365b|xenops]
Domain.numa_placement.(fun).set_vcpu_affinity: setting vcpu affinity for domain 44:
[0; 1; 2; 3; 4; 5; 6; 7; 8; 9; 10; 11; 12; 13; 14; 15; 16; 17; 18; 19; \x0A 20; 21; 22; 23; 24; 25; 26; 27; 28; 29; 30; 31; 32; 33; 34; 35; 36; \x0A 37; 38; 39]
```
the corresponding nodes the memory was allocated, only VMs that claimed
successfully the node have the vcpu affinity assigned:
```
# xl debug-keys u && xl dmesg | tail -n 30
(XEN) [21080.047304] d43 (total: 5767675):
(XEN) [21080.047305] Node 0: 1
(XEN) [21080.047307] Node 1: 5767678
(XEN) [21080.047309] d44 (total: 5767675):
(XEN) [21080.047311] Node 0: 5767679
(XEN) [21080.047312] Node 1: 0
(XEN) [21080.047315] d45 (total: 5014779):
(XEN) [21080.047317] Node 0: 2637953
(XEN) [21080.047318] Node 1: 2376830
```
and the xl vcpu-list output:
```
# xl vcpu-list
Name ID VCPU CPU State Time(s) Affinity (Hard / Soft)
ws19-x64-clone1 43 0 42 -b- 14.8 all / 40-79
ws19-x64-clone1 43 1 53 -b- 14.3 all / 40-79
ws19-x64-clone1 43 2 57 -b- 19.1 all / 40-79
ws19-x64-clone1 43 3 59 -b- 11.5 all / 40-79
ws19-x64 44 0 6 -b- 18.0 all / 0-39
ws19-x64 44 1 12 -b- 17.5 all / 0-39
ws19-x64 44 2 14 -b- 11.9 all / 0-39
ws19-x64 44 3 3 -b- 11.4 all / 0-39
spread-ws19-x64 45 0 21 -b- 17.9 all / all
spread-ws19-x64 45 1 1 -b- 12.9 all / all
spread-ws19-x64 45 2 5 -b- 15.7 all / all
spread-ws19-x64 45 3 18 -b- 15.3 all / all
```1 file changed
+14
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
967 | 967 | | |
968 | 968 | | |
969 | 969 | | |
970 | | - | |
| 970 | + | |
971 | 971 | | |
972 | 972 | | |
973 | 973 | | |
974 | | - | |
| 974 | + | |
975 | 975 | | |
| 976 | + | |
| 977 | + | |
| 978 | + | |
| 979 | + | |
| 980 | + | |
| 981 | + | |
| 982 | + | |
| 983 | + | |
| 984 | + | |
| 985 | + | |
976 | 986 | | |
977 | 987 | | |
978 | 988 | | |
979 | | - | |
980 | | - | |
| 989 | + | |
981 | 990 | | |
982 | 991 | | |
983 | 992 | | |
| |||
994 | 1003 | | |
995 | 1004 | | |
996 | 1005 | | |
| 1006 | + | |
997 | 1007 | | |
998 | 1008 | | |
999 | 1009 | | |
| |||
0 commit comments