Commit 4ef420b
cgroup: replace global cgroup_file_kn_lock with per-cgroup_file lock
Replace the global cgroup_file_kn_lock with a per-cgroup_file spinlock
to eliminate cross-cgroup contention as it is not really protecting
data shared between different cgroups.
The lock is initialized in cgroup_add_file() alongside timer_setup().
No lock acquisition is needed during initialization since the cgroup
directory is being populated under cgroup_mutex and no concurrent
accessors exist at that point.
Reported-by: Jakub Kicinski <[email protected]>
Signed-off-by: Shakeel Butt <[email protected]>
Signed-off-by: Tejun Heo <[email protected]>1 parent 4616120 commit 4ef420b
2 files changed
Lines changed: 9 additions & 16 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
167 | 167 | | |
168 | 168 | | |
169 | 169 | | |
| 170 | + | |
170 | 171 | | |
171 | 172 | | |
172 | 173 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
99 | 99 | | |
100 | 100 | | |
101 | 101 | | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | 102 | | |
109 | 103 | | |
110 | 104 | | |
| |||
1693 | 1687 | | |
1694 | 1688 | | |
1695 | 1689 | | |
1696 | | - | |
| 1690 | + | |
1697 | 1691 | | |
1698 | | - | |
| 1692 | + | |
1699 | 1693 | | |
1700 | 1694 | | |
1701 | 1695 | | |
| |||
4373 | 4367 | | |
4374 | 4368 | | |
4375 | 4369 | | |
4376 | | - | |
4377 | | - | |
4378 | | - | |
4379 | | - | |
| 4370 | + | |
| 4371 | + | |
4380 | 4372 | | |
4381 | 4373 | | |
4382 | 4374 | | |
| |||
4645 | 4637 | | |
4646 | 4638 | | |
4647 | 4639 | | |
4648 | | - | |
| 4640 | + | |
4649 | 4641 | | |
4650 | 4642 | | |
4651 | 4643 | | |
4652 | 4644 | | |
4653 | 4645 | | |
4654 | | - | |
| 4646 | + | |
4655 | 4647 | | |
4656 | 4648 | | |
4657 | 4649 | | |
| |||
4669 | 4661 | | |
4670 | 4662 | | |
4671 | 4663 | | |
4672 | | - | |
| 4664 | + | |
4673 | 4665 | | |
4674 | 4666 | | |
4675 | | - | |
| 4667 | + | |
4676 | 4668 | | |
4677 | 4669 | | |
4678 | 4670 | | |
| |||
0 commit comments