LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Pavel Machek <pavel@ucw.cz>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: kernel list <linux-kernel@vger.kernel.org>,
jikos@suse.cz, Ingo Molnar <mingo@elte.hu>,
"Rafael J. Wysocki" <rjw@sisk.pl>, Andrew Morton <akpm@osdl.org>
Subject: Re: tsc breaks atkbd suspend
Date: Mon, 18 Feb 2008 15:37:57 +0100 [thread overview]
Message-ID: <20080218143757.GB1960@elf.ucw.cz> (raw)
In-Reply-To: <alpine.LFD.1.00.0802181515070.7583@apollo.tec.linutronix.de>
Hi!
> > I'm trying to use the "sleepy test" here, unfortunately it locks for
> > 10-or-so seconds.
> >
> > Problem is in wait_event_timeout: timeouts take about 100x as long as
> > they should. Code in drivers/input/serio/libps2.c:
> >
> > + printk("ps2_command waiting event: %d\n", timeout);
> > timeout = wait_event_timeout(ps2dev->wait,
> > !(ps2dev->flags & PS2_FLAG_CMD1),timeout);
> >
> > if (ps2dev->cmdcnt && timeout > 0) {
> > + printk("wait_event returned: %d\n", timeout);
> >
> > timeout = ps2_adjust_timeout(ps2dev, command, timeout);
> > +
> > + printk("ps2_command adjust timeout: %d\n", timeout);
> > wait_event_timeout(ps2dev->wait,
> > !(ps2dev->flags & PS2_FLAG_CMD), timeout);
> > }
> >
> > + printk("ps2_command receiving\n");
> >
> >
> > ...and I get hang after "ps2_command adjust timeout" for 10 seconds,
> > while it should wait 10msec or so.
>
> When is this code called ?
from serio_suspend. It is normal device, not a sysdev, AFAICT.
> > nohz=off fixes that.
> >
> > notsc fixes that, too... On my system (thinkpad x60 in UP mode) tsc is
> > normally marked unstable very shortly after boot, so only sleepy test
> > can trigger this.
>
> I do not understand, what you mean. When exactly is "sleeppy test"
> running ?
from late_initcall().
> Also the TSC unstable detection is in a 500ms timeframe, so you should
> never get a 10s delay.
I'd not expect TSC instability detection to be ran while system is
suspending, plus "wrong for 500msec" is still wrong.
Plus TSC unstable detection is heuristic that can easily go wrong, right?
> > I believe fix is very simple:
>
> NAK.
>
> This kills TSC on machines which have a working TSC and never go into
> suspend.
Apart from OLPC, which machines have working TSC?
Anything that has cpufreq does not.
Anything that enters C2 does not.
Anything that is SMP does not.
So, how many machines do you have with working TSC?
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
next prev parent reply other threads:[~2008-02-18 14:37 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-18 13:38 Pavel Machek
2008-02-18 14:26 ` Thomas Gleixner
2008-02-18 14:37 ` Pavel Machek [this message]
2008-02-18 15:12 ` Thomas Gleixner
2008-02-19 9:20 ` Pavel Machek
2008-02-19 9:37 ` Pavel Machek
2008-02-19 10:00 ` Pavel Machek
2008-02-19 14:05 ` Ingo Molnar
2008-02-19 16:51 ` Thomas Gleixner
2008-02-20 0:17 ` Len Brown
2008-02-20 6:51 ` Thomas Gleixner
2008-02-19 10:02 ` notsc is ignored on common configurations Pavel Machek
2008-02-19 11:26 ` Ingo Molnar
2008-02-19 11:29 ` Pavel Machek
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=20080218143757.GB1960@elf.ucw.cz \
--to=pavel@ucw.cz \
--cc=akpm@osdl.org \
--cc=jikos@suse.cz \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=rjw@sisk.pl \
--cc=tglx@linutronix.de \
--subject='Re: tsc breaks atkbd suspend' \
/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
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).