Commit 4ef44c3
committed
Subject: [PATCH] balloons: preserve requested exact reserved cpuset across allocation
In hard-exact reserved CPU mode, the code passed the requested cpuset
by pointer into AllocateCpus() and then compared/logged using the same
variable afterwards.
AllocateCpus() may mutate the preferred/requested cpuset argument while
performing allocation. As a result, startup could fail with an error
like:
failed to allocate exact reserved cpuset: requested "", got "0-7,..."
even though the configured reserved cpuset was correct and the allocator
returned exactly that cpuset.
Fix this by keeping an immutable copy of the requested exact cpuset for:
- comparison after allocation
- error reporting
This keeps hard-exact startup from falsely failing due to mutation of
the temporary cpuset variable.1 parent 8013fa4 commit 4ef44c3
1 file changed
Lines changed: 12 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1104 | 1104 | | |
1105 | 1105 | | |
1106 | 1106 | | |
1107 | | - | |
1108 | | - | |
| 1107 | + | |
| 1108 | + | |
1109 | 1109 | | |
1110 | 1110 | | |
1111 | | - | |
1112 | | - | |
| 1111 | + | |
| 1112 | + | |
1113 | 1113 | | |
1114 | | - | |
| 1114 | + | |
| 1115 | + | |
| 1116 | + | |
| 1117 | + | |
1115 | 1118 | | |
1116 | | - | |
| 1119 | + | |
1117 | 1120 | | |
1118 | | - | |
1119 | | - | |
| 1121 | + | |
| 1122 | + | |
| 1123 | + | |
1120 | 1124 | | |
1121 | 1125 | | |
1122 | 1126 | | |
| |||
0 commit comments