Repository navigation
Commit 3042f83
rcu: Support reclaim for head-less object
Update the kvfree_call_rcu() function with head-less support.
This allows RCU to reclaim objects without an embedded rcu_head.
tree-RCU:
We introduce two chains of arrays to store SLAB-backed and vmalloc
pointers, each. Storage in either of these arrays does not require
embedding an rcu_head within the object.
Maintaining the arrays may become impossible due to high memory
pressure. For such cases there is an emergency path. Objects with
rcu_head inside are just queued on a backup rcu_head list. Later on
that list is drained. As for the head-less variant, as the current
context can sleep, the following emergency measures are applied:
a) Synchronously wait until a grace period has elapsed.
b) Call kvfree().
tiny-RCU:
For double argument calls, there are no new changes in behavior. For
single argument call, kvfree() is directly inlined on the current
stack after a synchronize_rcu() call. Note that for tiny-RCU, any
call to synchronize_rcu() is actually a quiescent state, therefore
it does nothing.
Reviewed-by: Joel Fernandes (Google) <joel@joelfernandes.org>
Signed-off-by: Uladzislau Rezki (Sony) <urezki@gmail.com>
Signed-off-by: Joel Fernandes (Google) <joel@joelfernandes.org>
Co-developed-by: Joel Fernandes (Google) <joel@joelfernandes.org>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>1 parent ce4dce1 commit 3042f83
2 files changed
Lines changed: 60 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
37 | 45 | | |
38 | 46 | | |
39 | | - | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
40 | 56 | | |
41 | 57 | | |
42 | 58 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3314 | 3314 | | |
3315 | 3315 | | |
3316 | 3316 | | |
| 3317 | + | |
| 3318 | + | |
| 3319 | + | |
| 3320 | + | |
| 3321 | + | |
| 3322 | + | |
| 3323 | + | |
3317 | 3324 | | |
3318 | 3325 | | |
3319 | 3326 | | |
| |||
3353 | 3360 | | |
3354 | 3361 | | |
3355 | 3362 | | |
| 3363 | + | |
3356 | 3364 | | |
3357 | 3365 | | |
| 3366 | + | |
| 3367 | + | |
| 3368 | + | |
| 3369 | + | |
| 3370 | + | |
| 3371 | + | |
| 3372 | + | |
| 3373 | + | |
| 3374 | + | |
| 3375 | + | |
| 3376 | + | |
| 3377 | + | |
| 3378 | + | |
| 3379 | + | |
3358 | 3380 | | |
3359 | | - | |
3360 | 3381 | | |
3361 | 3382 | | |
3362 | 3383 | | |
3363 | 3384 | | |
3364 | 3385 | | |
3365 | 3386 | | |
| 3387 | + | |
| 3388 | + | |
| 3389 | + | |
3366 | 3390 | | |
3367 | 3391 | | |
3368 | 3392 | | |
3369 | 3393 | | |
3370 | 3394 | | |
3371 | 3395 | | |
3372 | 3396 | | |
3373 | | - | |
| 3397 | + | |
| 3398 | + | |
| 3399 | + | |
| 3400 | + | |
| 3401 | + | |
| 3402 | + | |
3374 | 3403 | | |
3375 | 3404 | | |
3376 | 3405 | | |
| 3406 | + | |
3377 | 3407 | | |
3378 | 3408 | | |
3379 | 3409 | | |
| |||
3387 | 3417 | | |
3388 | 3418 | | |
3389 | 3419 | | |
| 3420 | + | |
| 3421 | + | |
| 3422 | + | |
| 3423 | + | |
| 3424 | + | |
| 3425 | + | |
| 3426 | + | |
| 3427 | + | |
| 3428 | + | |
| 3429 | + | |
| 3430 | + | |
3390 | 3431 | | |
3391 | 3432 | | |
3392 | 3433 | | |
| |||
0 commit comments