Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 54636
b: refs/heads/master
c: 04c9167
h: refs/heads/master
v: v3
  • Loading branch information
Jeremy Fitzhardinge authored and Linus Torvalds committed May 8, 2007
1 parent baf468c commit 4a82ee8
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 966812dc98e6a7fcdf759cbfa0efab77500a8868
refs/heads/master: 04c9167f91e309c9c4ea982992aa08e83b2eb42e
4 changes: 4 additions & 0 deletions trunk/include/linux/sched.h
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,7 @@ extern void scheduler_tick(void);
extern void softlockup_tick(void);
extern void spawn_softlockup_task(void);
extern void touch_softlockup_watchdog(void);
extern void touch_all_softlockup_watchdogs(void);
#else
static inline void softlockup_tick(void)
{
Expand All @@ -236,6 +237,9 @@ static inline void spawn_softlockup_task(void)
static inline void touch_softlockup_watchdog(void)
{
}
static inline void touch_all_softlockup_watchdogs(void)
{
}
#endif


Expand Down
2 changes: 2 additions & 0 deletions trunk/kernel/sched.c
Original file line number Diff line number Diff line change
Expand Up @@ -4750,6 +4750,8 @@ void show_state_filter(unsigned long state_filter)
show_task(p);
} while_each_thread(g, p);

touch_all_softlockup_watchdogs();

read_unlock(&tasklist_lock);
/*
* Only show locks if all tasks are dumped:
Expand Down
15 changes: 13 additions & 2 deletions trunk/kernel/softlockup.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,16 @@ void touch_softlockup_watchdog(void)
}
EXPORT_SYMBOL(touch_softlockup_watchdog);

void touch_all_softlockup_watchdogs(void)
{
int cpu;

/* Cause each CPU to re-update its timestamp rather than complain */
for_each_online_cpu(cpu)
per_cpu(touch_timestamp, cpu) = 0;
}
EXPORT_SYMBOL(touch_all_softlockup_watchdogs);

/*
* This callback runs from the timer interrupt, and checks
* whether the watchdog thread has hung or not:
Expand All @@ -61,9 +71,10 @@ void softlockup_tick(void)
unsigned long print_timestamp;
unsigned long now;

/* watchdog task hasn't updated timestamp yet */
if (touch_timestamp == 0)
if (touch_timestamp == 0) {
touch_softlockup_watchdog();
return;
}

print_timestamp = per_cpu(print_timestamp, this_cpu);

Expand Down

0 comments on commit 4a82ee8

Please sign in to comment.