Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
kernel_linux
提交
bea2de44
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看板
提交
bea2de44
编写于
1月 28, 2016
作者:
P
Paul E. McKenney
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
rcu: Add funnel-locking tracing for expedited grace periods
Signed-off-by:
N
Paul E. McKenney
<
paulmck@linux.vnet.ibm.com
>
上级
e087816d
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
30 addition
and
4 deletion
+30
-4
kernel/rcu/tree.c
kernel/rcu/tree.c
+27
-4
kernel/rcu/tree_plugin.h
kernel/rcu/tree_plugin.h
+3
-0
未找到文件。
kernel/rcu/tree.c
浏览文件 @
bea2de44
...
@@ -3584,10 +3584,18 @@ static bool sync_exp_work_done(struct rcu_state *rsp, struct rcu_node *rnp,
...
@@ -3584,10 +3584,18 @@ static bool sync_exp_work_done(struct rcu_state *rsp, struct rcu_node *rnp,
atomic_long_t
*
stat
,
unsigned
long
s
)
atomic_long_t
*
stat
,
unsigned
long
s
)
{
{
if
(
rcu_exp_gp_seq_done
(
rsp
,
s
))
{
if
(
rcu_exp_gp_seq_done
(
rsp
,
s
))
{
if
(
rnp
)
if
(
rnp
)
{
mutex_unlock
(
&
rnp
->
exp_funnel_mutex
);
mutex_unlock
(
&
rnp
->
exp_funnel_mutex
);
else
if
(
rdp
)
trace_rcu_exp_funnel_lock
(
rsp
->
name
,
rnp
->
level
,
rnp
->
grplo
,
rnp
->
grphi
,
TPS
(
"rel"
));
}
else
if
(
rdp
)
{
mutex_unlock
(
&
rdp
->
exp_funnel_mutex
);
mutex_unlock
(
&
rdp
->
exp_funnel_mutex
);
trace_rcu_exp_funnel_lock
(
rsp
->
name
,
rdp
->
mynode
->
level
+
1
,
rdp
->
cpu
,
rdp
->
cpu
,
TPS
(
"rel"
));
}
/* Ensure test happens before caller kfree(). */
/* Ensure test happens before caller kfree(). */
smp_mb__before_atomic
();
/* ^^^ */
smp_mb__before_atomic
();
/* ^^^ */
atomic_long_inc
(
stat
);
atomic_long_inc
(
stat
);
...
@@ -3619,6 +3627,9 @@ static struct rcu_node *exp_funnel_lock(struct rcu_state *rsp, unsigned long s)
...
@@ -3619,6 +3627,9 @@ static struct rcu_node *exp_funnel_lock(struct rcu_state *rsp, unsigned long s)
if
(
sync_exp_work_done
(
rsp
,
rnp0
,
NULL
,
if
(
sync_exp_work_done
(
rsp
,
rnp0
,
NULL
,
&
rdp
->
expedited_workdone0
,
s
))
&
rdp
->
expedited_workdone0
,
s
))
return
NULL
;
return
NULL
;
trace_rcu_exp_funnel_lock
(
rsp
->
name
,
rnp0
->
level
,
rnp0
->
grplo
,
rnp0
->
grphi
,
TPS
(
"acq"
));
return
rnp0
;
return
rnp0
;
}
}
}
}
...
@@ -3634,16 +3645,28 @@ static struct rcu_node *exp_funnel_lock(struct rcu_state *rsp, unsigned long s)
...
@@ -3634,16 +3645,28 @@ static struct rcu_node *exp_funnel_lock(struct rcu_state *rsp, unsigned long s)
if
(
sync_exp_work_done
(
rsp
,
NULL
,
NULL
,
&
rdp
->
expedited_workdone1
,
s
))
if
(
sync_exp_work_done
(
rsp
,
NULL
,
NULL
,
&
rdp
->
expedited_workdone1
,
s
))
return
NULL
;
return
NULL
;
mutex_lock
(
&
rdp
->
exp_funnel_mutex
);
mutex_lock
(
&
rdp
->
exp_funnel_mutex
);
trace_rcu_exp_funnel_lock
(
rsp
->
name
,
rdp
->
mynode
->
level
+
1
,
rdp
->
cpu
,
rdp
->
cpu
,
TPS
(
"acq"
));
rnp0
=
rdp
->
mynode
;
rnp0
=
rdp
->
mynode
;
for
(;
rnp0
!=
NULL
;
rnp0
=
rnp0
->
parent
)
{
for
(;
rnp0
!=
NULL
;
rnp0
=
rnp0
->
parent
)
{
if
(
sync_exp_work_done
(
rsp
,
rnp1
,
rdp
,
if
(
sync_exp_work_done
(
rsp
,
rnp1
,
rdp
,
&
rdp
->
expedited_workdone2
,
s
))
&
rdp
->
expedited_workdone2
,
s
))
return
NULL
;
return
NULL
;
mutex_lock
(
&
rnp0
->
exp_funnel_mutex
);
mutex_lock
(
&
rnp0
->
exp_funnel_mutex
);
if
(
rnp1
)
trace_rcu_exp_funnel_lock
(
rsp
->
name
,
rnp0
->
level
,
rnp0
->
grplo
,
rnp0
->
grphi
,
TPS
(
"acq"
));
if
(
rnp1
)
{
mutex_unlock
(
&
rnp1
->
exp_funnel_mutex
);
mutex_unlock
(
&
rnp1
->
exp_funnel_mutex
);
else
trace_rcu_exp_funnel_lock
(
rsp
->
name
,
rnp1
->
level
,
rnp1
->
grplo
,
rnp1
->
grphi
,
TPS
(
"rel"
));
}
else
{
mutex_unlock
(
&
rdp
->
exp_funnel_mutex
);
mutex_unlock
(
&
rdp
->
exp_funnel_mutex
);
trace_rcu_exp_funnel_lock
(
rsp
->
name
,
rdp
->
mynode
->
level
+
1
,
rdp
->
cpu
,
rdp
->
cpu
,
TPS
(
"rel"
));
}
rnp1
=
rnp0
;
rnp1
=
rnp0
;
}
}
if
(
sync_exp_work_done
(
rsp
,
rnp1
,
rdp
,
if
(
sync_exp_work_done
(
rsp
,
rnp1
,
rdp
,
...
...
kernel/rcu/tree_plugin.h
浏览文件 @
bea2de44
...
@@ -767,6 +767,9 @@ void synchronize_rcu_expedited(void)
...
@@ -767,6 +767,9 @@ void synchronize_rcu_expedited(void)
/* Clean up and exit. */
/* Clean up and exit. */
rcu_exp_gp_seq_end
(
rsp
);
rcu_exp_gp_seq_end
(
rsp
);
mutex_unlock
(
&
rnp_unlock
->
exp_funnel_mutex
);
mutex_unlock
(
&
rnp_unlock
->
exp_funnel_mutex
);
trace_rcu_exp_funnel_lock
(
rsp
->
name
,
rnp_unlock
->
level
,
rnp_unlock
->
grplo
,
rnp_unlock
->
grphi
,
TPS
(
"rel"
));
}
}
EXPORT_SYMBOL_GPL
(
synchronize_rcu_expedited
);
EXPORT_SYMBOL_GPL
(
synchronize_rcu_expedited
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录