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
319362c9
Commit
319362c9
authored
May 19, 2015
by
Paul E. McKenney
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rcu: Provide more diagnostics for stalled GP kthread
Signed-off-by:
Paul E. McKenney
<
paulmck@linux.vnet.ibm.com
>
parent
d770e558
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
3 deletions
+13
-3
kernel/rcu/tree.c
kernel/rcu/tree.c
+8
-2
kernel/rcu/tree.h
kernel/rcu/tree.h
+5
-1
No files found.
kernel/rcu/tree.c
View file @
319362c9
...
...
@@ -1178,9 +1178,11 @@ static void rcu_check_gp_kthread_starvation(struct rcu_state *rsp)
j
=
jiffies
;
gpa
=
READ_ONCE
(
rsp
->
gp_activity
);
if
(
j
-
gpa
>
2
*
HZ
)
pr_err
(
"%s kthread starved for %ld jiffies! g%lu c%lu f%#x
\n
"
,
pr_err
(
"%s kthread starved for %ld jiffies! g%lu c%lu f%#x
s%d ->state=%#lx
\n
"
,
rsp
->
name
,
j
-
gpa
,
rsp
->
gpnum
,
rsp
->
completed
,
rsp
->
gp_flags
);
rsp
->
gpnum
,
rsp
->
completed
,
rsp
->
gp_flags
,
rsp
->
gp_state
,
rsp
->
gp_kthread
?
rsp
->
gp_kthread
->
state
:
0
);
}
/*
...
...
@@ -2041,6 +2043,7 @@ static int __noreturn rcu_gp_kthread(void *arg)
wait_event_interruptible
(
rsp
->
gp_wq
,
READ_ONCE
(
rsp
->
gp_flags
)
&
RCU_GP_FLAG_INIT
);
rsp
->
gp_state
=
RCU_GP_DONE_GPS
;
/* Locking provides needed memory barrier. */
if
(
rcu_gp_init
(
rsp
))
break
;
...
...
@@ -2073,6 +2076,7 @@ static int __noreturn rcu_gp_kthread(void *arg)
(
!
READ_ONCE
(
rnp
->
qsmask
)
&&
!
rcu_preempt_blocked_readers_cgp
(
rnp
)),
j
);
rsp
->
gp_state
=
RCU_GP_DONE_FQS
;
/* Locking provides needed memory barriers. */
/* If grace period done, leave loop. */
if
(
!
READ_ONCE
(
rnp
->
qsmask
)
&&
...
...
@@ -2110,7 +2114,9 @@ static int __noreturn rcu_gp_kthread(void *arg)
}
/* Handle grace-period end. */
rsp
->
gp_state
=
RCU_GP_CLEANUP
;
rcu_gp_cleanup
(
rsp
);
rsp
->
gp_state
=
RCU_GP_CLEANED
;
}
}
...
...
kernel/rcu/tree.h
View file @
319362c9
...
...
@@ -527,7 +527,11 @@ struct rcu_state {
/* Values for rcu_state structure's gp_flags field. */
#define RCU_GP_WAIT_INIT 0
/* Initial state. */
#define RCU_GP_WAIT_GPS 1
/* Wait for grace-period start. */
#define RCU_GP_WAIT_FQS 2
/* Wait for force-quiescent-state time. */
#define RCU_GP_DONE_GPS 2
/* Wait done for grace-period start. */
#define RCU_GP_WAIT_FQS 3
/* Wait for force-quiescent-state time. */
#define RCU_GP_DONE_FQS 4
/* Wait done for force-quiescent-state time. */
#define RCU_GP_CLEANUP 5
/* Grace-period cleanup started. */
#define RCU_GP_CLEANED 6
/* Grace-period cleanup complete. */
extern
struct
list_head
rcu_struct_flavors
;
...
...
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