Messages in this thread | | | Date | Mon, 27 Jul 2009 16:25:32 -0500 | From | Jason Wessel <> | Subject | Re: [PATCH] softlockup: fix problem with long kernel pauses from kgdb |
| |
Peter Zijlstra wrote: > On Mon, 2009-07-27 at 15:03 -0500, Jason Wessel wrote: > >> The fix is to simply invoke sched_clock_tick() to update "cpu sched >> clock" on exit from kgdb_handle_exception. >> > > Is that a regular IRQ context, or is that NMI context? > >
The patch text there is incorrect (which I can fix), because there were 3 other versions of this particular patch. The version of this patch that tried to use sched_clock_tick() from the exception context hung the system because there was lock contention for CPUs that were not in the running state.
In this version, the sched_clock_tick() added in the softlockup_tick(), which did not result in a hard hang. I am pretty sure that softlockup_tick() runs as a part of the timer interrupt processing from run_local_timers(), so there was no further need to turn off the interrupts.
Jason.
>> Signed-off-by: Dongdong Deng <Dongdong.Deng@windriver.com> >> Signed-off-by: Jason Wessel <jason.wessel@windriver.com> >> Cc: Ingo Molnar <mingo@elte.hu> >> Cc: peterz@infradead.org >> --- >> kernel/softlockup.c | 3 +++ >> 1 file changed, 3 insertions(+) >> >> --- a/kernel/softlockup.c >> +++ b/kernel/softlockup.c >> @@ -118,6 +118,9 @@ void softlockup_tick(void) >> } >> >> if (touch_timestamp == 0) { >> + /* If the time stamp was touched externally make sure the >> + * scheduler tick is up to date as well */ >> + sched_clock_tick(); >> __touch_softlockup_watchdog(); >> return; >> } >> >> > > Aside from the funny comment style (please fix) the fix does look > sensible. >
No problem.
Thanks, Jason.
| |