[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20100526133514.3d018520@schatten.dmk.lab>
Date: Wed, 26 May 2010 13:35:14 +0200
From: Florian Mickler <florian@...kler.org>
To: Peter Zijlstra <peterz@...radead.org>
Cc: "Rafael J. Wysocki" <rjw@...k.pl>,
Arve Hjønnevåg <arve@...roid.com>,
linux-pm@...ts.linux-foundation.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 0/8] Suspend block api (version 8)
On Wed, 26 May 2010 11:54:37 +0200
Peter Zijlstra <peterz@...radead.org> wrote:
> On Wed, 2010-05-26 at 11:40 +0200, Florian Mickler wrote:
> > _IF_ you want to suspend aggressively, I don't see another
> > way.
> >
> > The thing is, this is a paradigm change. Suspend is not anymore
> > controlled by userspace. In order to let userspace control/work with
> > this scheme, it needs to know when a suspend will be successfull or
> > poll:
> >
> > 1. kernel sees suspend may be possible on his side of things
> >
> > 2. kernel sends a message to userspace that i could be possibly
> > possible to suspend, but it may well be that by the time
> > userspace suspends it is not possible anymore
> >
> > 3. userspace decides to suspend.
> >
> > <- system suspends... or not ..->
> >
> > 4. userspace retries ... retries ... retries ...
> >
> > And then you have the whole can of worms and races.
>
> I don't see any races, nor retry loops.
What about the worms? :)
I referred to retrying steps 1 through 3 as being the loop.
>
> There is always the race of an event arriving whilst in the process of
> suspending, that is not solved by either the kernel nor user part of
> suspend-blockers. The only thing is not to loose the event.
>
> You simply have to deal with that, the suspend gets canceled, you do
> deal with the event, and suspend again. How does making that 'retry' as
> you call it happen from a kernel thread or from a userspace thread any
> difference?
>
You have a point there. But what follows?
You either need to let userspace know that the kernel is now able to
suspend or you let the kernel know that userspace is now able to
suspend.
Else you can not make a well informed suspend-decision and have to
guess and retry.
Why not look at blocking and unblocking as these events you want
to have? Without wiggle room and retrying.
And not having to route through userspace simplifies the auto-suspend
scheme further.
Cheers,
Flo
--
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