[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20100603080556.46d2d671@notabene.brown>
Date: Thu, 3 Jun 2010 08:05:56 +1000
From: Neil Brown <neilb@...e.de>
To: "Rafael J. Wysocki" <rjw@...k.pl>
Cc: Thomas Gleixner <tglx@...utronix.de>,
Alan Stern <stern@...land.harvard.edu>,
Felipe Balbi <felipe.balbi@...ia.com>,
Arve Hjønnevåg <arve@...roid.com>,
Peter Zijlstra <peterz@...radead.org>,
"Paul@...p1.linux-foundation.org" <Paul@...p1.linux-foundation.org>,
LKML <linux-kernel@...r.kernel.org>,
Florian Mickler <florian@...kler.org>,
Linux OMAP Mailing List <linux-omap@...r.kernel.org>,
Linux PM <linux-pm@...ts.linux-foundation.org>,
Alan Cox <alan@...rguk.ukuu.org.uk>,
James Bottomley <James.Bottomley@...e.de>
Subject: Re: [PATCH] - race-free suspend. Was: Re: [linux-pm] [PATCH 0/8]
Suspend block api (version 8)
On Wed, 2 Jun 2010 22:41:14 +0200
"Rafael J. Wysocki" <rjw@...k.pl> wrote:
> On Wednesday 02 June 2010, Neil Brown wrote:
> > - Would this fix the "bug"??
> > - and address the issues that suspend-blockers was created to address?
> > - or are the requirements on user-space too onerous?
>
> In theory wakeup events can also happen after wait_for_blockers() has returned
> 0 and I guess we should rollback the suspend in such cases.
>
I naively assumed this was already the case, but on a slightly closer look at
the code it seems not.
Presumably there is some point deep in the suspend code, probably after the
call to sysdev_suspend, where interrupts are disabled and we are about to
actually suspend. At that point a simple "is a roll-back required" test
could abort the suspend.
Then any driver that handles wake-up events, if it gets and event that (would
normally cause a wakeup) PM_SUSPEND_PREPARE and PM_POST_SUSPEND, could set
the "roll-back is required" flag.
??
NeilBrown
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists