forked from torvalds/linux
Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
mld: convert ifmcaddr6 to RCU
The ifmcaddr6 has been protected by inet6_dev->lock(rwlock) so that the critical section is atomic context. In order to switch this context, changing locking is needed. The ifmcaddr6 actually already protected by RTNL So if it's converted to use RCU, its control path context can be switched to sleepable. Because of this conversion, the locking scenario can be changed. So, the locking scenario is changed to the following. 1. ifmcaddr6->mca_lock only protects following resources. a) ifmcaddr6->mca_flags b) ifmcaddr6->mca_work. c) ifmcaddr6->mca_sources->sf_gsresp 2. inet6_dev->lock only protects following resources. a) inet6_dev->mc_gq_running b) inet6_dev->mc_gq_work c) inet6_dev->mc_ifc_count d) inet6_dev->mc_ifc_work e) inet6_dev->mc_delerec_work 3. Other resources are protected by RTNL and RCU. There are only two atomic context locks, they are ifmcaddr6->mca_lock and inet6_dev->lock. These locks are protecting resources, they are written on the datapath. RTNL can't be used on the datapath, these locks are used. Suggested-by: Cong Wang <xiyou.wangcong@gmail.com> Signed-off-by: Taehee Yoo <ap420073@gmail.com>
- Loading branch information
1 parent
50d689e
commit 05d3b96bdcaec52bc3f2ef1f96e571dc17bf9f5a
Showing
7 changed files
with
169 additions
and
201 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.