Repository navigation
Commit ddd6914
committed
cgroup: drop unnecessary RCU dancing from __put_css_set()
__put_css_set() does RCU read access on @CGRP across dropping
@cgrp->count so that it can continue accessing @CGRP even if the count
reached zero and destruction of the cgroup commenced. Given that both
sides - __css_put() and cgroup_destroy_locked() - are cold paths, this
is unnecessary. Just making cgroup_destroy_locked() grab css_set_lock
while checking @cgrp->count is enough.
Remove the RCU read locking from __put_css_set() and make
cgroup_destroy_locked() read-lock css_set_lock when checking
@cgrp->count. This will also allow removing @cgrp->count.
Signed-off-by: Tejun Heo <tj@kernel.org>
Acked-by: Li Zefan <lizefan@huawei.com>1 parent 54766d4 commit ddd6914
1 file changed
Lines changed: 10 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
407 | 407 | | |
408 | 408 | | |
409 | 409 | | |
410 | | - | |
411 | | - | |
412 | | - | |
413 | | - | |
414 | | - | |
415 | | - | |
| 410 | + | |
416 | 411 | | |
417 | 412 | | |
418 | 413 | | |
419 | 414 | | |
420 | 415 | | |
421 | 416 | | |
422 | | - | |
423 | 417 | | |
424 | 418 | | |
425 | 419 | | |
| |||
4370 | 4364 | | |
4371 | 4365 | | |
4372 | 4366 | | |
| 4367 | + | |
4373 | 4368 | | |
4374 | 4369 | | |
4375 | 4370 | | |
4376 | 4371 | | |
4377 | | - | |
| 4372 | + | |
| 4373 | + | |
| 4374 | + | |
| 4375 | + | |
| 4376 | + | |
| 4377 | + | |
| 4378 | + | |
| 4379 | + | |
4378 | 4380 | | |
4379 | 4381 | | |
4380 | 4382 | | |
| |||
5051 | 5053 | | |
5052 | 5054 | | |
5053 | 5055 | | |
5054 | | - | |
5055 | | - | |
5056 | 5056 | | |
5057 | 5057 | | |
5058 | 5058 | | |
| |||
0 commit comments