Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
raspberrypi-kernel
提交
4f415302
R
raspberrypi-kernel
项目概览
openeuler
/
raspberrypi-kernel
通知
13
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
raspberrypi-kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
4f415302
编写于
1月 28, 2016
作者:
P
Paul E. McKenney
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
rcu: Add expedited-grace-period event tracing
Signed-off-by:
N
Paul E. McKenney
<
paulmck@linux.vnet.ibm.com
>
上级
bea2de44
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
16 addition
and
7 deletion
+16
-7
kernel/rcu/tree.c
kernel/rcu/tree.c
+13
-7
kernel/rcu/tree_plugin.h
kernel/rcu/tree_plugin.h
+3
-0
未找到文件。
kernel/rcu/tree.c
浏览文件 @
4f415302
...
...
@@ -3584,17 +3584,18 @@ static bool sync_exp_work_done(struct rcu_state *rsp, struct rcu_node *rnp,
atomic_long_t
*
stat
,
unsigned
long
s
)
{
if
(
rcu_exp_gp_seq_done
(
rsp
,
s
))
{
trace_rcu_exp_grace_period
(
rsp
->
name
,
s
,
TPS
(
"done"
));
if
(
rnp
)
{
mutex_unlock
(
&
rnp
->
exp_funnel_mutex
);
trace_rcu_exp_funnel_lock
(
rsp
->
name
,
rnp
->
level
,
rnp
->
grplo
,
rnp
->
grphi
,
TPS
(
"rel"
));
mutex_unlock
(
&
rnp
->
exp_funnel_mutex
);
}
else
if
(
rdp
)
{
mutex_unlock
(
&
rdp
->
exp_funnel_mutex
);
trace_rcu_exp_funnel_lock
(
rsp
->
name
,
rdp
->
mynode
->
level
+
1
,
rdp
->
cpu
,
rdp
->
cpu
,
TPS
(
"rel"
));
mutex_unlock
(
&
rdp
->
exp_funnel_mutex
);
}
/* Ensure test happens before caller kfree(). */
smp_mb__before_atomic
();
/* ^^^ */
...
...
@@ -3624,12 +3625,12 @@ static struct rcu_node *exp_funnel_lock(struct rcu_state *rsp, unsigned long s)
rnp0
=
rcu_get_root
(
rsp
);
if
(
!
mutex_is_locked
(
&
rnp0
->
exp_funnel_mutex
))
{
if
(
mutex_trylock
(
&
rnp0
->
exp_funnel_mutex
))
{
if
(
sync_exp_work_done
(
rsp
,
rnp0
,
NULL
,
&
rdp
->
expedited_workdone0
,
s
))
return
NULL
;
trace_rcu_exp_funnel_lock
(
rsp
->
name
,
rnp0
->
level
,
rnp0
->
grplo
,
rnp0
->
grphi
,
TPS
(
"acq"
));
if
(
sync_exp_work_done
(
rsp
,
rnp0
,
NULL
,
&
rdp
->
expedited_workdone0
,
s
))
return
NULL
;
return
rnp0
;
}
}
...
...
@@ -3656,16 +3657,16 @@ static struct rcu_node *exp_funnel_lock(struct rcu_state *rsp, unsigned long s)
trace_rcu_exp_funnel_lock
(
rsp
->
name
,
rnp0
->
level
,
rnp0
->
grplo
,
rnp0
->
grphi
,
TPS
(
"acq"
));
if
(
rnp1
)
{
mutex_unlock
(
&
rnp1
->
exp_funnel_mutex
);
trace_rcu_exp_funnel_lock
(
rsp
->
name
,
rnp1
->
level
,
rnp1
->
grplo
,
rnp1
->
grphi
,
TPS
(
"rel"
));
mutex_unlock
(
&
rnp1
->
exp_funnel_mutex
);
}
else
{
mutex_unlock
(
&
rdp
->
exp_funnel_mutex
);
trace_rcu_exp_funnel_lock
(
rsp
->
name
,
rdp
->
mynode
->
level
+
1
,
rdp
->
cpu
,
rdp
->
cpu
,
TPS
(
"rel"
));
mutex_unlock
(
&
rdp
->
exp_funnel_mutex
);
}
rnp1
=
rnp0
;
}
...
...
@@ -3895,16 +3896,21 @@ void synchronize_sched_expedited(void)
/* Take a snapshot of the sequence number. */
s
=
rcu_exp_gp_seq_snap
(
rsp
);
trace_rcu_exp_grace_period
(
rsp
->
name
,
s
,
TPS
(
"snap"
));
rnp
=
exp_funnel_lock
(
rsp
,
s
);
if
(
rnp
==
NULL
)
return
;
/* Someone else did our work for us. */
rcu_exp_gp_seq_start
(
rsp
);
trace_rcu_exp_grace_period
(
rsp
->
name
,
s
,
TPS
(
"start"
));
sync_rcu_exp_select_cpus
(
rsp
,
sync_sched_exp_handler
);
synchronize_sched_expedited_wait
(
rsp
);
rcu_exp_gp_seq_end
(
rsp
);
trace_rcu_exp_grace_period
(
rsp
->
name
,
s
,
TPS
(
"end"
));
trace_rcu_exp_funnel_lock
(
rsp
->
name
,
rnp
->
level
,
rnp
->
grplo
,
rnp
->
grphi
,
TPS
(
"rel"
));
mutex_unlock
(
&
rnp
->
exp_funnel_mutex
);
}
EXPORT_SYMBOL_GPL
(
synchronize_sched_expedited
);
...
...
kernel/rcu/tree_plugin.h
浏览文件 @
4f415302
...
...
@@ -750,12 +750,14 @@ void synchronize_rcu_expedited(void)
}
s
=
rcu_exp_gp_seq_snap
(
rsp
);
trace_rcu_exp_grace_period
(
rsp
->
name
,
s
,
TPS
(
"snap"
));
rnp_unlock
=
exp_funnel_lock
(
rsp
,
s
);
if
(
rnp_unlock
==
NULL
)
return
;
/* Someone else did our work for us. */
rcu_exp_gp_seq_start
(
rsp
);
trace_rcu_exp_grace_period
(
rsp
->
name
,
s
,
TPS
(
"start"
));
/* Initialize the rcu_node tree in preparation for the wait. */
sync_rcu_exp_select_cpus
(
rsp
,
sync_rcu_exp_handler
);
...
...
@@ -766,6 +768,7 @@ void synchronize_rcu_expedited(void)
/* Clean up and exit. */
rcu_exp_gp_seq_end
(
rsp
);
trace_rcu_exp_grace_period
(
rsp
->
name
,
s
,
TPS
(
"end"
));
mutex_unlock
(
&
rnp_unlock
->
exp_funnel_mutex
);
trace_rcu_exp_funnel_lock
(
rsp
->
name
,
rnp_unlock
->
level
,
rnp_unlock
->
grplo
,
rnp_unlock
->
grphi
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录