Repository navigation
Commit a93ace4
committed
percpu: move region iterations out of pcpu_[de]populate_chunk()
Previously, pcpu_[de]populate_chunk() were called with the range which
may contain multiple target regions in it and
pcpu_[de]populate_chunk() iterated over the regions. This has the
benefit of batching up cache flushes for all the regions; however,
we're planning to add more bookkeeping logic around [de]population to
support atomic allocations and this delegation of iterations gets in
the way.
This patch moves the region iterations out of
pcpu_[de]populate_chunk() into its callers - pcpu_alloc() and
pcpu_reclaim() - so that we can later add logic to track more states
around them. This change may make cache and tlb flushes more frequent
but multi-region [de]populations are rare anyway and if this actually
becomes a problem, it's not difficult to factor out cache flushes as
separate callbacks which are directly invoked from percpu.c.
Signed-off-by: Tejun Heo <tj@kernel.org>1 parent dca4964 commit a93ace4
3 files changed
Lines changed: 28 additions & 54 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | | - | |
| 36 | + | |
| 37 | + | |
37 | 38 | | |
38 | 39 | | |
39 | 40 | | |
40 | 41 | | |
41 | | - | |
| 42 | + | |
| 43 | + | |
42 | 44 | | |
43 | 45 | | |
44 | 46 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
261 | 261 | | |
262 | 262 | | |
263 | 263 | | |
264 | | - | |
265 | | - | |
| 264 | + | |
| 265 | + | |
266 | 266 | | |
267 | 267 | | |
268 | 268 | | |
269 | 269 | | |
270 | 270 | | |
271 | 271 | | |
272 | 272 | | |
273 | | - | |
| 273 | + | |
| 274 | + | |
274 | 275 | | |
275 | | - | |
276 | | - | |
277 | | - | |
278 | 276 | | |
279 | | - | |
280 | 277 | | |
281 | 278 | | |
282 | 279 | | |
283 | 280 | | |
284 | 281 | | |
285 | | - | |
286 | | - | |
287 | | - | |
288 | | - | |
289 | | - | |
290 | | - | |
291 | | - | |
| 282 | + | |
| 283 | + | |
292 | 284 | | |
293 | | - | |
294 | | - | |
295 | | - | |
296 | | - | |
297 | | - | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
298 | 288 | | |
299 | 289 | | |
300 | 290 | | |
301 | 291 | | |
302 | | - | |
303 | | - | |
304 | | - | |
305 | | - | |
306 | | - | |
307 | | - | |
308 | | - | |
309 | | - | |
310 | | - | |
311 | | - | |
312 | 292 | | |
313 | 293 | | |
314 | 294 | | |
315 | 295 | | |
316 | 296 | | |
317 | | - | |
318 | | - | |
| 297 | + | |
| 298 | + | |
319 | 299 | | |
320 | 300 | | |
321 | | - | |
322 | | - | |
| 301 | + | |
323 | 302 | | |
324 | 303 | | |
325 | 304 | | |
326 | 305 | | |
327 | | - | |
| 306 | + | |
| 307 | + | |
328 | 308 | | |
329 | | - | |
330 | | - | |
331 | 309 | | |
332 | | - | |
333 | 310 | | |
334 | 311 | | |
335 | 312 | | |
| |||
342 | 319 | | |
343 | 320 | | |
344 | 321 | | |
345 | | - | |
346 | | - | |
| 322 | + | |
347 | 323 | | |
348 | 324 | | |
349 | 325 | | |
350 | | - | |
351 | | - | |
| 326 | + | |
352 | 327 | | |
353 | 328 | | |
354 | 329 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
807 | 807 | | |
808 | 808 | | |
809 | 809 | | |
810 | | - | |
811 | | - | |
812 | | - | |
813 | | - | |
| 810 | + | |
814 | 811 | | |
815 | 812 | | |
816 | | - | |
| 813 | + | |
817 | 814 | | |
818 | 815 | | |
819 | 816 | | |
820 | 817 | | |
821 | 818 | | |
822 | 819 | | |
823 | | - | |
| 820 | + | |
824 | 821 | | |
825 | 822 | | |
826 | 823 | | |
| |||
919 | 916 | | |
920 | 917 | | |
921 | 918 | | |
922 | | - | |
923 | | - | |
924 | | - | |
925 | | - | |
926 | | - | |
| 919 | + | |
927 | 920 | | |
| 921 | + | |
| 922 | + | |
| 923 | + | |
| 924 | + | |
928 | 925 | | |
929 | 926 | | |
930 | 927 | | |
| |||
0 commit comments