From: Randy Dunlap <randy.dunlap@oracle.com>
To: "Michael S. Tsirkin" <mst@dev.mellanox.co.il>
Cc: jgarzik@pobox.com, Maxim <maximlevitsky@gmail.com>,
Jeff Chua <jeff.chua.linux@gmail.com>,
linux-ide@vger.kernel.org,
Torvalds <torvalds@linux-foundation.org>,
gregkh@suse.de, linux-pm@lists.osdl.org,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Len@smtp.osdl.org, Adrian Bunk <bunk@stusta.de>,
linux-acpi@vger.kernel.org, linux-pci@atrey.karlin.mff.cuni.cz,
"Eric W. Biederman" <ebiederm@xmission.com>,
Ingo Molnar <mingo@elte.hu>, Jens Axboe <jens.axboe@oracle.com>,
Thomas Gleixner <tglx@linutronix.de>,
Linus@smtp.osdl.org, Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [3/6] 2.6.21-rc4: known regressions
Date: Wed, 28 Mar 2007 11:35:55 -0700 [thread overview]
Message-ID: <20070328113555.c17bc1da.randy.dunlap@oracle.com> (raw)
In-Reply-To: <20070328180457.GA4253@mellanox.co.il>
On Wed, 28 Mar 2007 20:04:57 +0200 Michael S. Tsirkin wrote:
> > Subject : first disk access after resume takes several minutes
> > ('date' does not advance after resume from RAM, CONFIG_NO_HZ=n)
> > References : http://lkml.org/lkml/2007/3/8/117
> > http://lkml.org/lkml/2007/3/25/20
> > Submitter : Michael S. Tsirkin <mst@mellanox.co.il>
>
> ...
>
> > Subject : after resume: X hangs after drawing a couple of windows
> > References : http://lkml.org/lkml/2007/3/8/117
> > Submitter : Michael S. Tsirkin <mst@mellanox.co.il>
> > Status : unknown
>
> ...
>
> > > > > From: Jeff Chua <jeff.chua.linux@gmail.com>
> > > > > > It's related. I tested without CONFIG_HPET_TIMER, and now my X60 can
> > > > > > suspend and resume from RAM (s2ram). Even better, it works
> > > > > > with/without CONFIG_NO_HZ.
> >
> > Quoting Maxim <maximlevitsky@gmail.com>:
> >
> > Hi,
> > I almost sure Iknow why this happens,
> > The problem is that both hpet clock source
> > and hpet clockevents doesn't have a suspend/resume function
> > On resume we should enable the main counter _and_ enable
> > legacy replacement mode, On my system main counter in
> > enabled, by I think by bios, but legacy replacement mode is
> > not, so if a system doesn't use lapic as a tick source, but
> > use hpet+broadcast, it will hang for sure on resume, and i
> > tested it
> >
> > The patch below is a temporally fix, until
> > clock-events and clocksources will get proper suspend/resume
> > hooks:
> >
> > Regards,
> > Maxim Levitsky
>
> Bingo!
>
> The patch below fixes the two problems (listed above) with
> resume from RAM that I have observed on my T60 with
> 2.6.21-rc5: with this patch applied, and with CONFIG_NO_HZ
> unset, date advances correctly, X functions properly and
> there is no delay on first disk access.
>
> Thanks very much.
>
> ---
> > Add suspend/resume for HPET
> > Signed-off-by: Maxim Levitsky <maximlevisky@gmail.com>
>
> Maxim, do you plan to send this upstream?
with whitespace fixes, please...
> Acked-by: Michael S. Tsirkin <mst@dev.mellanox.co.il>
>
> ---
>
> diff --git a/arch/i386/kernel/hpet.c b/arch/i386/kernel/hpet.c
> index 0fd9fba..a1ec79e 100644
> --- a/arch/i386/kernel/hpet.c
> +++ b/arch/i386/kernel/hpet.c
> @@ -152,6 +152,16 @@ static void hpet_set_mode(enum clock_event_mode mode,
> unsigned long cfg, cmp, now;
> uint64_t delta;
>
> +
> + if ( mode != CLOCK_EVT_MODE_UNUSED && mode != CLOCK_EVT_MODE_SHUTDOWN)
> + {
if (mode != CLOCK_EVT_MODE_UNUSED && mode != CLOCK_EVT_MODE_SHUTDOWN) {
> + unsigned long cfg = hpet_readl(HPET_CFG);
> + cfg |= HPET_CFG_ENABLE | HPET_CFG_LEGACY;
> + hpet_writel(cfg, HPET_CFG);
> +
delete above line.
> + }
> +
> +
> switch(mode) {
> case CLOCK_EVT_MODE_PERIODIC:
> delta = ((uint64_t)(NSEC_PER_SEC/HZ)) * hpet_clockevent.mult;
---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***
next prev parent reply other threads:[~2007-03-28 18:35 UTC|newest]
Thread overview: 66+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <Pine.LNX.4.64.0703160925270.26106@woody.linux-foundation.org>
2007-03-18 18:49 ` [3/6] 2.6.21-rc4: known regressions Adrian Bunk
2007-03-18 19:38 ` Marcus Better
2007-03-26 1:25 ` Jeff Chua
2007-03-26 4:05 ` Adrian Bunk
2007-03-26 5:37 ` Jeff Chua
2007-03-26 16:26 ` Thomas Gleixner
2007-03-26 17:46 ` Jeff Chua
2007-03-28 7:04 ` Thomas Gleixner
2007-03-28 13:43 ` Maxim
2007-03-28 14:41 ` Ingo Molnar
2007-03-28 15:01 ` Maxim
2007-03-28 16:38 ` Linus Torvalds
2007-03-28 19:38 ` David Brownell
2007-03-28 20:19 ` [linux-pm] " Maxim
2007-03-28 20:59 ` David Brownell
2007-03-28 21:27 ` Maxim
2007-03-29 22:33 ` David Brownell
[not found] ` <200703291533.38002.david-b@pacbell.net>
2007-03-29 23:29 ` Maxim Levitsky
2007-03-30 0:09 ` David Brownell
[not found] ` <200703291709.17085.david-b@pacbell.net>
2007-03-30 0:48 ` Maxim Levitsky
2007-03-28 20:42 ` Linus Torvalds
2007-03-28 21:17 ` [linux-pm] " David Brownell
2007-03-28 22:26 ` Maxim
2007-03-29 4:41 ` [ PATCH] Add suspend/resume for HPET was: " Maxim
2007-03-29 5:08 ` Linus Torvalds
2007-03-29 5:47 ` Maxim
2007-03-29 13:20 ` Sergei Shtylyov
2007-03-29 13:31 ` Maxim
2007-03-29 13:46 ` [PATCH v2] Add suspend/resume for HPET Maxim Levitsky
2007-03-29 16:53 ` Linus Torvalds
2007-03-29 17:28 ` Maxim Levitsky
2007-03-29 17:51 ` Ingo Molnar
2007-03-29 20:46 ` Andi Kleen
2007-03-29 18:11 ` Jeff Chua
2007-03-31 15:51 ` Thomas Gleixner
2007-03-31 16:01 ` Jeff Chua
2007-03-31 16:09 ` Thomas Gleixner
2007-03-31 16:09 ` Linus Torvalds
2007-03-31 16:33 ` Thomas Gleixner
2007-03-31 16:41 ` Greg KH
2007-03-31 16:53 ` Linus Torvalds
2007-03-31 17:02 ` Ingo Molnar
2007-03-31 18:18 ` David Brownell
[not found] ` <200703311118.55132.david-b@pacbell.net>
2007-03-31 19:32 ` David Brownell
[not found] ` <200703311232.57505.david-b@pacbell.net>
2007-04-01 3:13 ` Jeff Chua
2007-04-01 4:13 ` David Brownell
2007-03-31 17:08 ` Greg KH
2007-03-31 17:55 ` [linux-pm] " David Brownell
2007-03-31 16:56 ` Maxim Levitsky
2007-03-31 17:09 ` Linus Torvalds
2007-03-31 17:17 ` Ingo Molnar
2007-03-31 17:58 ` Daniel Walker
2007-03-29 16:35 ` [ PATCH] Add suspend/resume for HPET was: Re: [3/6] 2.6.21-rc4: known regressions Linus Torvalds
2007-03-29 16:51 ` Maxim Levitsky
2007-03-29 17:22 ` Linus Torvalds
2007-03-29 17:47 ` [patch, v2] add suspend/resume for HPET Ingo Molnar
2007-03-28 18:04 ` [3/6] 2.6.21-rc4: known regressions Michael S. Tsirkin
2007-03-28 18:32 ` Ingo Molnar
2007-03-28 18:35 ` Randy Dunlap [this message]
2007-03-29 14:24 ` Jeff Chua
2007-03-18 18:49 ` [4/6] " Adrian Bunk
2007-03-23 18:50 ` [3/5] 2.6.21-rc4: known regressions (v2) Adrian Bunk
2007-03-23 19:07 ` Maxim
2007-03-23 20:53 ` Rafael J. Wysocki
[not found] ` <200703261200.25587.marcus@better.se>
[not found] ` <20070326143433.GC16477@stusta.de>
[not found] ` <200703261942.52126.marcus@better.se>
2007-03-26 18:48 ` Adrian Bunk
2007-03-27 9:42 ` Marcus Better
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=20070328113555.c17bc1da.randy.dunlap@oracle.com \
--to=randy.dunlap@oracle.com \
--cc=Len@smtp.osdl.org \
--cc=Linus@smtp.osdl.org \
--cc=akpm@linux-foundation.org \
--cc=bunk@stusta.de \
--cc=ebiederm@xmission.com \
--cc=gregkh@suse.de \
--cc=jeff.chua.linux@gmail.com \
--cc=jens.axboe@oracle.com \
--cc=jgarzik@pobox.com \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-ide@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@atrey.karlin.mff.cuni.cz \
--cc=linux-pm@lists.osdl.org \
--cc=maximlevitsky@gmail.com \
--cc=mingo@elte.hu \
--cc=mst@dev.mellanox.co.il \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox