Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 191005
b: refs/heads/master
c: c68de20
h: refs/heads/master
i:
  191003: bbfe938
v: v3
  • Loading branch information
Paul E. McKenney committed May 10, 2010
1 parent a251a78 commit ac00542
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 55ec936ff4e57cc626db336a7bf33b267390e9b4
refs/heads/master: c68de2097a8799549a3c3bf27cbfeea24a604284
24 changes: 24 additions & 0 deletions trunk/kernel/rcutree.c
Original file line number Diff line number Diff line change
Expand Up @@ -449,6 +449,8 @@ static int rcu_implicit_dynticks_qs(struct rcu_data *rdp)

#ifdef CONFIG_RCU_CPU_STALL_DETECTOR

int rcu_cpu_stall_panicking __read_mostly;

static void record_gp_stall_check_time(struct rcu_state *rsp)
{
rsp->gp_start = jiffies;
Expand Down Expand Up @@ -526,6 +528,8 @@ static void check_cpu_stall(struct rcu_state *rsp, struct rcu_data *rdp)
long delta;
struct rcu_node *rnp;

if (rcu_cpu_stall_panicking)
return;
delta = jiffies - rsp->jiffies_stall;
rnp = rdp->mynode;
if ((rnp->qsmask & rdp->grpmask) && delta >= 0) {
Expand All @@ -540,6 +544,21 @@ static void check_cpu_stall(struct rcu_state *rsp, struct rcu_data *rdp)
}
}

static int rcu_panic(struct notifier_block *this, unsigned long ev, void *ptr)
{
rcu_cpu_stall_panicking = 1;
return NOTIFY_DONE;
}

static struct notifier_block rcu_panic_block = {
.notifier_call = rcu_panic,
};

static void __init check_cpu_stall_init(void)
{
atomic_notifier_chain_register(&panic_notifier_list, &rcu_panic_block);
}

#else /* #ifdef CONFIG_RCU_CPU_STALL_DETECTOR */

static void record_gp_stall_check_time(struct rcu_state *rsp)
Expand All @@ -550,6 +569,10 @@ static void check_cpu_stall(struct rcu_state *rsp, struct rcu_data *rdp)
{
}

static void __init check_cpu_stall_init(void)
{
}

#endif /* #else #ifdef CONFIG_RCU_CPU_STALL_DETECTOR */

/*
Expand Down Expand Up @@ -1934,6 +1957,7 @@ void __init rcu_init(void)
cpu_notifier(rcu_cpu_notify, 0);
for_each_online_cpu(cpu)
rcu_cpu_notify(NULL, CPU_UP_PREPARE, (void *)(long)cpu);
check_cpu_stall_init();
}

#include "rcutree_plugin.h"

0 comments on commit ac00542

Please sign in to comment.