Commit 6462dd5
committed
sched_ext: Compact struct bpf_iter_scx_dsq_kern
struct scx_iter_scx_dsq is defined as 6 u64's and scx_dsq_iter_kern was
using 5 of them. We want to add two more u64 fields but it's better if we do
so while staying within scx_iter_scx_dsq to maintain binary compatibility.
The way scx_iter_scx_dsq_kern is laid out is rather inefficient - the node
field takes up three u64's but only one bit of the last u64 is used. Turn
the bool into u32 flags and only use the lower 16 bits freeing up 48 bits -
16 bits for flags, 32 bits for a u32 - for use by struct
bpf_iter_scx_dsq_kern.
This allows moving the dsq_seq and flags fields of bpf_iter_scx_dsq_kern
into the cursor field reducing the struct size by a full u64.
No behavior changes intended.
Signed-off-by: Tejun Heo <tj@kernel.org>1 parent cf3e944 commit 6462dd5
2 files changed
+21
-12
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
119 | 119 | | |
120 | 120 | | |
121 | 121 | | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
122 | 129 | | |
123 | 130 | | |
124 | | - | |
| 131 | + | |
| 132 | + | |
125 | 133 | | |
126 | 134 | | |
127 | 135 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1191 | 1191 | | |
1192 | 1192 | | |
1193 | 1193 | | |
1194 | | - | |
| 1194 | + | |
1195 | 1195 | | |
1196 | 1196 | | |
1197 | 1197 | | |
| |||
1209 | 1209 | | |
1210 | 1210 | | |
1211 | 1211 | | |
1212 | | - | |
| 1212 | + | |
1213 | 1213 | | |
1214 | | - | |
| 1214 | + | |
| 1215 | + | |
1215 | 1216 | | |
1216 | 1217 | | |
1217 | 1218 | | |
1218 | 1219 | | |
1219 | 1220 | | |
1220 | | - | |
1221 | | - | |
1222 | 1221 | | |
1223 | 1222 | | |
1224 | 1223 | | |
| |||
1256 | 1255 | | |
1257 | 1256 | | |
1258 | 1257 | | |
| 1258 | + | |
| 1259 | + | |
| 1260 | + | |
1259 | 1261 | | |
1260 | 1262 | | |
1261 | 1263 | | |
| |||
6285 | 6287 | | |
6286 | 6288 | | |
6287 | 6289 | | |
6288 | | - | |
| 6290 | + | |
6289 | 6291 | | |
6290 | 6292 | | |
6291 | 6293 | | |
6292 | 6294 | | |
6293 | 6295 | | |
6294 | 6296 | | |
6295 | 6297 | | |
6296 | | - | |
6297 | | - | |
6298 | | - | |
| 6298 | + | |
| 6299 | + | |
6299 | 6300 | | |
6300 | 6301 | | |
6301 | 6302 | | |
| |||
6309 | 6310 | | |
6310 | 6311 | | |
6311 | 6312 | | |
6312 | | - | |
| 6313 | + | |
6313 | 6314 | | |
6314 | 6315 | | |
6315 | 6316 | | |
| |||
6330 | 6331 | | |
6331 | 6332 | | |
6332 | 6333 | | |
6333 | | - | |
| 6334 | + | |
6334 | 6335 | | |
6335 | 6336 | | |
6336 | 6337 | | |
| |||
0 commit comments