Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
kernel_linux
提交
deb34f36
K
kernel_linux
项目概览
OpenHarmony
/
kernel_linux
上一次同步 4 年多
通知
15
Star
8
Fork
2
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
K
kernel_linux
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
deb34f36
编写于
3月 23, 2017
作者:
P
Paul E. McKenney
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
rcu: Improve comments for hotplug/suspend/hibernate functions
Signed-off-by:
N
Paul E. McKenney
<
paulmck@linux.vnet.ibm.com
>
上级
48ac3466
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
37 addition
and
4 deletion
+37
-4
kernel/rcu/tree.c
kernel/rcu/tree.c
+37
-4
未找到文件。
kernel/rcu/tree.c
浏览文件 @
deb34f36
...
@@ -3894,6 +3894,10 @@ rcu_init_percpu_data(int cpu, struct rcu_state *rsp)
...
@@ -3894,6 +3894,10 @@ rcu_init_percpu_data(int cpu, struct rcu_state *rsp)
raw_spin_unlock_irqrestore_rcu_node
(
rnp
,
flags
);
raw_spin_unlock_irqrestore_rcu_node
(
rnp
,
flags
);
}
}
/*
* Invoked early in the CPU-online process, when pretty much all
* services are available. The incoming CPU is not present.
*/
int
rcutree_prepare_cpu
(
unsigned
int
cpu
)
int
rcutree_prepare_cpu
(
unsigned
int
cpu
)
{
{
struct
rcu_state
*
rsp
;
struct
rcu_state
*
rsp
;
...
@@ -3907,6 +3911,9 @@ int rcutree_prepare_cpu(unsigned int cpu)
...
@@ -3907,6 +3911,9 @@ int rcutree_prepare_cpu(unsigned int cpu)
return
0
;
return
0
;
}
}
/*
* Update RCU priority boot kthread affinity for CPU-hotplug changes.
*/
static
void
rcutree_affinity_setting
(
unsigned
int
cpu
,
int
outgoing
)
static
void
rcutree_affinity_setting
(
unsigned
int
cpu
,
int
outgoing
)
{
{
struct
rcu_data
*
rdp
=
per_cpu_ptr
(
rcu_state_p
->
rda
,
cpu
);
struct
rcu_data
*
rdp
=
per_cpu_ptr
(
rcu_state_p
->
rda
,
cpu
);
...
@@ -3914,6 +3921,10 @@ static void rcutree_affinity_setting(unsigned int cpu, int outgoing)
...
@@ -3914,6 +3921,10 @@ static void rcutree_affinity_setting(unsigned int cpu, int outgoing)
rcu_boost_kthread_setaffinity
(
rdp
->
mynode
,
outgoing
);
rcu_boost_kthread_setaffinity
(
rdp
->
mynode
,
outgoing
);
}
}
/*
* Near the end of the CPU-online process. Pretty much all services
* enabled, and the CPU is now very much alive.
*/
int
rcutree_online_cpu
(
unsigned
int
cpu
)
int
rcutree_online_cpu
(
unsigned
int
cpu
)
{
{
sync_sched_exp_online_cleanup
(
cpu
);
sync_sched_exp_online_cleanup
(
cpu
);
...
@@ -3921,13 +3932,19 @@ int rcutree_online_cpu(unsigned int cpu)
...
@@ -3921,13 +3932,19 @@ int rcutree_online_cpu(unsigned int cpu)
return
0
;
return
0
;
}
}
/*
* Near the beginning of the process. The CPU is still very much alive
* with pretty much all services enabled.
*/
int
rcutree_offline_cpu
(
unsigned
int
cpu
)
int
rcutree_offline_cpu
(
unsigned
int
cpu
)
{
{
rcutree_affinity_setting
(
cpu
,
cpu
);
rcutree_affinity_setting
(
cpu
,
cpu
);
return
0
;
return
0
;
}
}
/*
* Near the end of the offline process. We do only tracing here.
*/
int
rcutree_dying_cpu
(
unsigned
int
cpu
)
int
rcutree_dying_cpu
(
unsigned
int
cpu
)
{
{
struct
rcu_state
*
rsp
;
struct
rcu_state
*
rsp
;
...
@@ -3937,6 +3954,9 @@ int rcutree_dying_cpu(unsigned int cpu)
...
@@ -3937,6 +3954,9 @@ int rcutree_dying_cpu(unsigned int cpu)
return
0
;
return
0
;
}
}
/*
* The outgoing CPU is gone and we are running elsewhere.
*/
int
rcutree_dead_cpu
(
unsigned
int
cpu
)
int
rcutree_dead_cpu
(
unsigned
int
cpu
)
{
{
struct
rcu_state
*
rsp
;
struct
rcu_state
*
rsp
;
...
@@ -3954,6 +3974,10 @@ int rcutree_dead_cpu(unsigned int cpu)
...
@@ -3954,6 +3974,10 @@ int rcutree_dead_cpu(unsigned int cpu)
* incoming CPUs are not allowed to use RCU read-side critical sections
* incoming CPUs are not allowed to use RCU read-side critical sections
* until this function is called. Failing to observe this restriction
* until this function is called. Failing to observe this restriction
* will result in lockdep splats.
* will result in lockdep splats.
*
* Note that this function is special in that it is invoked directly
* from the incoming CPU rather than from the cpuhp_step mechanism.
* This is because this function must be invoked at a precise location.
*/
*/
void
rcu_cpu_starting
(
unsigned
int
cpu
)
void
rcu_cpu_starting
(
unsigned
int
cpu
)
{
{
...
@@ -3976,9 +4000,6 @@ void rcu_cpu_starting(unsigned int cpu)
...
@@ -3976,9 +4000,6 @@ void rcu_cpu_starting(unsigned int cpu)
#ifdef CONFIG_HOTPLUG_CPU
#ifdef CONFIG_HOTPLUG_CPU
/*
/*
* The CPU is exiting the idle loop into the arch_cpu_idle_dead()
* function. We now remove it from the rcu_node tree's ->qsmaskinit
* bit masks.
* The CPU is exiting the idle loop into the arch_cpu_idle_dead()
* The CPU is exiting the idle loop into the arch_cpu_idle_dead()
* function. We now remove it from the rcu_node tree's ->qsmaskinit
* function. We now remove it from the rcu_node tree's ->qsmaskinit
* bit masks.
* bit masks.
...
@@ -3997,6 +4018,14 @@ static void rcu_cleanup_dying_idle_cpu(int cpu, struct rcu_state *rsp)
...
@@ -3997,6 +4018,14 @@ static void rcu_cleanup_dying_idle_cpu(int cpu, struct rcu_state *rsp)
raw_spin_unlock_irqrestore_rcu_node
(
rnp
,
flags
);
raw_spin_unlock_irqrestore_rcu_node
(
rnp
,
flags
);
}
}
/*
* The outgoing function has no further need of RCU, so remove it from
* the list of CPUs that RCU must track.
*
* Note that this function is special in that it is invoked directly
* from the outgoing CPU rather than from the cpuhp_step mechanism.
* This is because this function must be invoked at a precise location.
*/
void
rcu_report_dead
(
unsigned
int
cpu
)
void
rcu_report_dead
(
unsigned
int
cpu
)
{
{
struct
rcu_state
*
rsp
;
struct
rcu_state
*
rsp
;
...
@@ -4011,6 +4040,10 @@ void rcu_report_dead(unsigned int cpu)
...
@@ -4011,6 +4040,10 @@ void rcu_report_dead(unsigned int cpu)
}
}
#endif
#endif
/*
* On non-huge systems, use expedited RCU grace periods to make suspend
* and hibernation run faster.
*/
static
int
rcu_pm_notify
(
struct
notifier_block
*
self
,
static
int
rcu_pm_notify
(
struct
notifier_block
*
self
,
unsigned
long
action
,
void
*
hcpu
)
unsigned
long
action
,
void
*
hcpu
)
{
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录