From: Jason Wessel <jason.wessel@windriver.com>
To: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>,
linux-kernel@vger.kernel.org,
kgdb-bugreport@lists.sourceforge.net, "Deng,
Dongdong" <Dongdong.Deng@windriver.com>,
peterz@infradead.org
Subject: Re: [PATCH 1/3] softlockup: add sched_clock_tick() to avoid kernel warning on kgdb resume
Date: Fri, 29 Jan 2010 08:51:34 -0600 [thread overview]
Message-ID: <4B62F5F6.3040401@windriver.com> (raw)
In-Reply-To: <20100129080706.GJ14636@elte.hu>
Ingo Molnar wrote:
> * Jason Wessel <jason.wessel@windriver.com> wrote:
>
>
>> @@ -118,6 +125,14 @@ void softlockup_tick(void)
>> }
>>
>> if (touch_ts == 0) {
>> + if (unlikely(per_cpu(softlock_touch_sync, this_cpu))) {
>> + /*
>> + * If the time stamp was touched atomically
>> + * make sure the scheduler tick is up to date.
>> + */
>> + per_cpu(softlock_touch_sync, this_cpu) = false;
>> + sched_clock_tick();
>> + }
>> __touch_softlockup_watchdog();
>> return;
>>
>
> Shouldnt just all of touch_softlockup_watchdog() gain this new
> sched_clock_tick() call, instead of doing this ugly flaggery? Or would that
> lock up or misbehave in other ways in some cases?
>
> That would also make the patch much simpler i guess, as we'd only have the
> chunk above.
>
We have already been down that road, and it breaks other cases.
http://lkml.org/lkml/2009/7/28/204
Specifically the test case of:
echo 3 > /proc/sys/kernel/softlockup_thresh
And then some kernel code in a thread like:
local_irq_disable();
printk("Disable local irq for 11 seconds\n");
mdelay(11000);
local_irq_enable();
I could consider calling sched_cpu_clock() before returning the kernel
to normal execution, but that didn't look very safe to call from the
exception context, which is why it was delayed until the next time the
soft lockup code ran.
Resuming from a long sleep is a ugly problem, so I am open to short term
and long term suggestions, including a polling time API (obviously we
would prefer not to go down that rat hole :-)
Jason.
next prev parent reply other threads:[~2010-01-29 14:52 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-27 22:25 [PATCH 0/3] V2 kgdb regression fixes for 2.6.33 Jason Wessel
2010-01-27 22:25 ` [PATCH 1/3] softlockup: add sched_clock_tick() to avoid kernel warning on kgdb resume Jason Wessel
2010-01-29 8:07 ` Ingo Molnar
2010-01-29 14:51 ` Jason Wessel [this message]
2010-02-01 5:53 ` Dongdong Deng
2010-02-01 6:05 ` Jason Wessel
2010-02-01 6:41 ` Dongdong Deng
2010-02-01 7:27 ` [tip:core/urgent] softlockup: Add " tip-bot for Jason Wessel
2010-01-27 22:25 ` [PATCH 2/3] x86,hw_breakpoint,kgdb: kgdb to use hw_breakpoint API Jason Wessel
2010-01-27 22:25 ` [PATCH 3/3] perf,hw_breakpoint,kgdb: No mutex taken for kernel debugger Jason Wessel
2010-01-28 17:33 ` Frederic Weisbecker
2010-01-28 17:49 ` [PATCH 3/3] perf,hw_breakpoint,kgdb: No mutex taken for kerneldebugger Jason Wessel
2010-01-28 20:09 ` Frederic Weisbecker
2010-01-28 20:38 ` [PATCH 3/3] perf,hw_breakpoint,kgdb: No mutex taken forkerneldebugger Jason Wessel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4B62F5F6.3040401@windriver.com \
--to=jason.wessel@windriver.com \
--cc=Dongdong.Deng@windriver.com \
--cc=kgdb-bugreport@lists.sourceforge.net \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.