Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
bea2de44
Commit
bea2de44
authored
Jan 28, 2016
by
Paul E. McKenney
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rcu: Add funnel-locking tracing for expedited grace periods
Signed-off-by:
Paul E. McKenney
<
paulmck@linux.vnet.ibm.com
>
parent
e087816d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
4 deletions
+30
-4
kernel/rcu/tree.c
kernel/rcu/tree.c
+27
-4
kernel/rcu/tree_plugin.h
kernel/rcu/tree_plugin.h
+3
-0
No files found.
kernel/rcu/tree.c
View file @
bea2de44
...
...
@@ -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
)
{
if
(
rcu_exp_gp_seq_done
(
rsp
,
s
))
{
if
(
rnp
)
if
(
rnp
)
{
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
);
trace_rcu_exp_funnel_lock
(
rsp
->
name
,
rdp
->
mynode
->
level
+
1
,
rdp
->
cpu
,
rdp
->
cpu
,
TPS
(
"rel"
));
}
/* Ensure test happens before caller kfree(). */
smp_mb__before_atomic
();
/* ^^^ */
atomic_long_inc
(
stat
);
...
...
@@ -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
,
&
rdp
->
expedited_workdone0
,
s
))
return
NULL
;
trace_rcu_exp_funnel_lock
(
rsp
->
name
,
rnp0
->
level
,
rnp0
->
grplo
,
rnp0
->
grphi
,
TPS
(
"acq"
));
return
rnp0
;
}
}
...
...
@@ -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
))
return
NULL
;
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
;
for
(;
rnp0
!=
NULL
;
rnp0
=
rnp0
->
parent
)
{
if
(
sync_exp_work_done
(
rsp
,
rnp1
,
rdp
,
&
rdp
->
expedited_workdone2
,
s
))
return
NULL
;
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
);
else
trace_rcu_exp_funnel_lock
(
rsp
->
name
,
rnp1
->
level
,
rnp1
->
grplo
,
rnp1
->
grphi
,
TPS
(
"rel"
));
}
else
{
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
;
}
if
(
sync_exp_work_done
(
rsp
,
rnp1
,
rdp
,
...
...
kernel/rcu/tree_plugin.h
View file @
bea2de44
...
...
@@ -767,6 +767,9 @@ void synchronize_rcu_expedited(void)
/* Clean up and exit. */
rcu_exp_gp_seq_end
(
rsp
);
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
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment