Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
dec98900
K
Kernel
项目概览
openeuler
/
Kernel
1 年多 前同步成功
通知
8
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
K
Kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
dec98900
编写于
10月 04, 2017
作者:
P
Paul E. McKenney
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
rcu: Add ->dynticks field to rcu_dyntick trace event
Signed-off-by:
N
Paul E. McKenney
<
paulmck@linux.vnet.ibm.com
>
上级
84585aa8
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
15 addition
and
14 deletion
+15
-14
include/trace/events/rcu.h
include/trace/events/rcu.h
+8
-5
kernel/rcu/tree.c
kernel/rcu/tree.c
+7
-9
未找到文件。
include/trace/events/rcu.h
浏览文件 @
dec98900
...
...
@@ -436,24 +436,27 @@ TRACE_EVENT(rcu_fqs,
*/
TRACE_EVENT
(
rcu_dyntick
,
TP_PROTO
(
const
char
*
polarity
,
long
oldnesting
,
long
newnesting
),
TP_PROTO
(
const
char
*
polarity
,
long
oldnesting
,
long
newnesting
,
atomic_t
dynticks
),
TP_ARGS
(
polarity
,
oldnesting
,
newnesting
),
TP_ARGS
(
polarity
,
oldnesting
,
newnesting
,
dynticks
),
TP_STRUCT__entry
(
__field
(
const
char
*
,
polarity
)
__field
(
long
,
oldnesting
)
__field
(
long
,
newnesting
)
__field
(
int
,
dynticks
)
),
TP_fast_assign
(
__entry
->
polarity
=
polarity
;
__entry
->
oldnesting
=
oldnesting
;
__entry
->
newnesting
=
newnesting
;
__entry
->
dynticks
=
atomic_read
(
&
dynticks
);
),
TP_printk
(
"%s %lx %lx"
,
__entry
->
polarity
,
__entry
->
oldnesting
,
__entry
->
newnesting
)
TP_printk
(
"%s %lx %lx %#3x"
,
__entry
->
polarity
,
__entry
->
oldnesting
,
__entry
->
newnesting
,
__entry
->
dynticks
&
0xfff
)
);
/*
...
...
@@ -801,7 +804,7 @@ TRACE_EVENT(rcu_barrier,
grplo, grphi, gp_tasks) do { } \
while (0)
#define trace_rcu_fqs(rcuname, gpnum, cpu, qsevent) do { } while (0)
#define trace_rcu_dyntick(polarity, oldnesting, newnesting) do { } while (0)
#define trace_rcu_dyntick(polarity, oldnesting, newnesting
, dyntick
) do { } while (0)
#define trace_rcu_prep_idle(reason) do { } while (0)
#define trace_rcu_callback(rcuname, rhp, qlen_lazy, qlen) do { } while (0)
#define trace_rcu_kfree_callback(rcuname, rhp, offset, qlen_lazy, qlen) \
...
...
kernel/rcu/tree.c
浏览文件 @
dec98900
...
...
@@ -761,13 +761,13 @@ static void rcu_eqs_enter_common(bool user)
struct
rcu_dynticks
*
rdtp
=
this_cpu_ptr
(
&
rcu_dynticks
);
lockdep_assert_irqs_disabled
();
trace_rcu_dyntick
(
TPS
(
"Start"
),
rdtp
->
dynticks_nesting
,
0
);
trace_rcu_dyntick
(
TPS
(
"Start"
),
rdtp
->
dynticks_nesting
,
0
,
rdtp
->
dynticks
);
if
(
IS_ENABLED
(
CONFIG_RCU_EQS_DEBUG
)
&&
!
user
&&
!
is_idle_task
(
current
))
{
struct
task_struct
*
idle
__maybe_unused
=
idle_task
(
smp_processor_id
());
trace_rcu_dyntick
(
TPS
(
"Error on entry: not idle task"
),
rdtp
->
dynticks_nesting
,
0
);
trace_rcu_dyntick
(
TPS
(
"Error on entry: not idle task"
),
rdtp
->
dynticks_nesting
,
0
,
rdtp
->
dynticks
);
rcu_ftrace_dump
(
DUMP_ORIG
);
WARN_ONCE
(
1
,
"Current pid: %d comm: %s / Idle pid: %d comm: %s"
,
current
->
pid
,
current
->
comm
,
...
...
@@ -880,15 +880,14 @@ void rcu_nmi_exit(void)
* leave it in non-RCU-idle state.
*/
if
(
rdtp
->
dynticks_nmi_nesting
!=
1
)
{
trace_rcu_dyntick
(
TPS
(
"--="
),
rdtp
->
dynticks_nmi_nesting
,
rdtp
->
dynticks_nmi_nesting
-
2
);
trace_rcu_dyntick
(
TPS
(
"--="
),
rdtp
->
dynticks_nmi_nesting
,
rdtp
->
dynticks_nmi_nesting
-
2
,
rdtp
->
dynticks
);
WRITE_ONCE
(
rdtp
->
dynticks_nmi_nesting
,
/* No store tearing. */
rdtp
->
dynticks_nmi_nesting
-
2
);
return
;
}
/* This NMI interrupted an RCU-idle CPU, restore RCU-idleness. */
trace_rcu_dyntick
(
TPS
(
"Startirq"
),
rdtp
->
dynticks_nmi_nesting
,
0
);
trace_rcu_dyntick
(
TPS
(
"Startirq"
),
rdtp
->
dynticks_nmi_nesting
,
0
,
rdtp
->
dynticks
);
WRITE_ONCE
(
rdtp
->
dynticks_nmi_nesting
,
0
);
/* Avoid store tearing. */
rcu_dynticks_eqs_enter
();
}
...
...
@@ -953,14 +952,13 @@ static void rcu_eqs_exit_common(long newval, int user)
rcu_dynticks_task_exit
();
rcu_dynticks_eqs_exit
();
rcu_cleanup_after_idle
();
trace_rcu_dyntick
(
TPS
(
"End"
),
rdtp
->
dynticks_nesting
,
newval
);
trace_rcu_dyntick
(
TPS
(
"End"
),
rdtp
->
dynticks_nesting
,
newval
,
rdtp
->
dynticks
);
if
(
IS_ENABLED
(
CONFIG_RCU_EQS_DEBUG
)
&&
!
user
&&
!
is_idle_task
(
current
))
{
struct
task_struct
*
idle
__maybe_unused
=
idle_task
(
smp_processor_id
());
trace_rcu_dyntick
(
TPS
(
"Error on exit: not idle task"
),
rdtp
->
dynticks_nesting
,
newval
);
trace_rcu_dyntick
(
TPS
(
"Error on exit: not idle task"
),
rdtp
->
dynticks_nesting
,
newval
,
rdtp
->
dynticks
);
rcu_ftrace_dump
(
DUMP_ORIG
);
WARN_ONCE
(
1
,
"Current pid: %d comm: %s / Idle pid: %d comm: %s"
,
current
->
pid
,
current
->
comm
,
...
...
@@ -1062,7 +1060,7 @@ void rcu_nmi_enter(void)
}
trace_rcu_dyntick
(
incby
==
1
?
TPS
(
"Endirq"
)
:
TPS
(
"++="
),
rdtp
->
dynticks_nmi_nesting
,
rdtp
->
dynticks_nmi_nesting
+
incby
);
rdtp
->
dynticks_nmi_nesting
+
incby
,
rdtp
->
dynticks
);
WRITE_ONCE
(
rdtp
->
dynticks_nmi_nesting
,
/* Prevent store tearing. */
rdtp
->
dynticks_nmi_nesting
+
incby
);
barrier
();
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录