Re: [PATCH] - race-free suspend. Was: Re: [linux-pm] [PATCH 0/8] Suspend block api (version 8)

2010-06-04 Thread Arve Hjønnevåg
2010/6/4 Dmitry Torokhov : > On Wed, Jun 02, 2010 at 07:44:59PM -0700, Arve Hjønnevåg wrote: >> On Wed, Jun 2, 2010 at 4:32 PM, Dmitry Torokhov >> wrote: >> > On Wed, Jun 02, 2010 at 09:05:21PM +0200, Florian Mickler wrote: >> >> On Wed, 2 Jun 2010 21:02:24 +1000 >> >> Neil Brown wrote: >> >> > >

Re: [PATCH] - race-free suspend. Was: Re: [linux-pm] [PATCH 0/8] Suspend block api (version 8)

2010-06-04 Thread Dmitry Torokhov
On Wed, Jun 02, 2010 at 07:44:59PM -0700, Arve Hjønnevåg wrote: > On Wed, Jun 2, 2010 at 4:32 PM, Dmitry Torokhov > wrote: > > On Wed, Jun 02, 2010 at 09:05:21PM +0200, Florian Mickler wrote: > >> On Wed, 2 Jun 2010 21:02:24 +1000 > >> Neil Brown wrote: > >> > > >> > And this decision (to block s

Re: [PATCH] - race-free suspend. Was: Re: [linux-pm] [PATCH 0/8] Suspend block api (version 8)

2010-06-03 Thread Peter Zijlstra
On Thu, 2010-06-03 at 10:21 -0400, ty...@mit.edu wrote: > And let's be blunt. If in the future the Android team (which I'm not > a member of) decides that they have invested more engineering time > than they can justify from a business perspective, the next time > someone starts whining on a blog

Re: [PATCH] - race-free suspend. Was: Re: [linux-pm] [PATCH 0/8] Suspend block api (version 8)

2010-06-03 Thread tytso
On Wed, Jun 02, 2010 at 11:43:06PM -0700, Brian Swetland wrote: > > I guess it becomes an question of economics for you then.  Does the cost of > > whatever user-space changes are required exceed the value of using an > > upstream > > kernel?  Both the cost and the value would be very hard to esti

Re: [PATCH] - race-free suspend. Was: Re: [linux-pm] [PATCH 0/8] Suspend block api (version 8)

2010-06-02 Thread Brian Swetland
On Wed, Jun 2, 2010 at 11:33 PM, Neil Brown wrote: >> >> The current suspend-blocker proposal already involves userspace >> changes (it's different than our existing wakelock interface), and >> we're certainly not opposed to any/all userspace changes on principle, >> but on the other hand we're no

Re: [PATCH] - race-free suspend. Was: Re: [linux-pm] [PATCH 0/8] Suspend block api (version 8)

2010-06-02 Thread Neil Brown
On Wed, 2 Jun 2010 11:05:18 -0700 Brian Swetland wrote: > On Wed, Jun 2, 2010 at 1:06 AM, Neil Brown wrote: > > On Wed, 2 Jun 2010 00:05:14 -0700 > > Arve Hjønnevåg wrote: > >> > The user-space suspend daemon avoids losing wake-events by using > >> > fcntl(F_OWNER) to ensure it gets a signal wh

Re: [PATCH] - race-free suspend. Was: Re: [linux-pm] [PATCH 0/8] Suspend block api (version 8)

2010-06-02 Thread Neil Brown
On Wed, 2 Jun 2010 19:44:59 -0700 Arve Hjønnevåg wrote: > On Wed, Jun 2, 2010 at 4:32 PM, Dmitry Torokhov > wrote: > > On Wed, Jun 02, 2010 at 09:05:21PM +0200, Florian Mickler wrote: > >> On Wed, 2 Jun 2010 21:02:24 +1000 > >> Neil Brown wrote: > >> > > >> > And this decision (to block suspend

Re: [PATCH] - race-free suspend. Was: Re: [linux-pm] [PATCH 0/8] Suspend block api (version 8)

2010-06-02 Thread Arve Hjønnevåg
On Wed, Jun 2, 2010 at 4:32 PM, Dmitry Torokhov wrote: > On Wed, Jun 02, 2010 at 09:05:21PM +0200, Florian Mickler wrote: >> On Wed, 2 Jun 2010 21:02:24 +1000 >> Neil Brown wrote: >> > >> > And this decision (to block suspend) really needs to be made in the driver, >> > not in userspace? >> >> We

Re: [PATCH] - race-free suspend. Was: Re: [linux-pm] [PATCH 0/8] Suspend block api (version 8)

2010-06-02 Thread Florian Mickler
On Wed, 2 Jun 2010 16:32:44 -0700 Dmitry Torokhov wrote: > On Wed, Jun 02, 2010 at 09:05:21PM +0200, Florian Mickler wrote: > > On Wed, 2 Jun 2010 21:02:24 +1000 > > Neil Brown wrote: > > > > > > And this decision (to block suspend) really needs to be made in the > > > driver, > > > not in use

Re: [PATCH] - race-free suspend. Was: Re: [linux-pm] [PATCH 0/8] Suspend block api (version 8)

2010-06-02 Thread Dmitry Torokhov
On Wed, Jun 02, 2010 at 09:05:21PM +0200, Florian Mickler wrote: > On Wed, 2 Jun 2010 21:02:24 +1000 > Neil Brown wrote: > > > > And this decision (to block suspend) really needs to be made in the driver, > > not in userspace? > > Well, it fits. The requirement is a direct consequence of the int

Re: [PATCH] - race-free suspend. Was: Re: [linux-pm] [PATCH 0/8] Suspend block api (version 8)

2010-06-02 Thread Neil Brown
On Wed, 2 Jun 2010 21:05:21 +0200 Florian Mickler wrote: > Could someone perhaps make a recap on what are the problems with the > API? I have no clear eye (experience?) for that (or so it seems). Good interface design is an acquired taste. And it isn't always easy to explain satisfactorily. Bu

Re: [PATCH] - race-free suspend. Was: Re: [linux-pm] [PATCH 0/8] Suspend block api (version 8)

2010-06-02 Thread Rafael J. Wysocki
On Thursday 03 June 2010, Neil Brown wrote: > On Wed, 2 Jun 2010 22:41:14 +0200 > "Rafael J. Wysocki" 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 requir

Re: [PATCH] - race-free suspend. Was: Re: [linux-pm] [PATCH 0/8] Suspend block api (version 8)

2010-06-02 Thread Neil Brown
On Wed, 2 Jun 2010 22:41:14 +0200 "Rafael J. Wysocki" 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 ev

Re: [PATCH] - race-free suspend. Was: Re: [linux-pm] [PATCH 0/8] Suspend block api (version 8)

2010-06-02 Thread Rafael J. Wysocki
On Wednesday 02 June 2010, Neil Brown wrote: > On Tue, 1 Jun 2010 12:50:01 +0200 (CEST) > Thomas Gleixner wrote: > > > On Tue, 1 Jun 2010, Neil Brown wrote: > > > > > > I think you have acknowledged that there is a race with suspend - thanks. > > > Next step was "can it be closed". > > > You see

Re: [PATCH] - race-free suspend. Was: Re: [linux-pm] [PATCH 0/8] Suspend block api (version 8)

2010-06-02 Thread Florian Mickler
On Wed, 2 Jun 2010 21:02:24 +1000 Neil Brown wrote: > > And this decision (to block suspend) really needs to be made in the driver, > not in userspace? Well, it fits. The requirement is a direct consequence of the intimate knowledge the driver has about the driven devices. Or if you get in an u

Re: [PATCH] - race-free suspend. Was: Re: [linux-pm] [PATCH 0/8] Suspend block api (version 8)

2010-06-02 Thread Brian Swetland
On Wed, Jun 2, 2010 at 1:06 AM, Neil Brown wrote: > On Wed, 2 Jun 2010 00:05:14 -0700 > Arve Hjønnevåg wrote: >> > The user-space suspend daemon avoids losing wake-events by using >> > fcntl(F_OWNER) to ensure it gets a signal whenever any important wake-event >> > is ready to be read by user-spa

Re: [PATCH] - race-free suspend. Was: Re: [linux-pm] [PATCH 0/8] Suspend block api (version 8)

2010-06-02 Thread Thomas Gleixner
On Wed, 2 Jun 2010, Arve Hjønnevåg wrote: > 2010/6/2 Thomas Gleixner : > > On Wed, 2 Jun 2010, Arve Hjønnevåg wrote: > >> 2010/6/2 Neil Brown : > >> > There would still need to be some sort of communication between the the > >> > suspend daemon on any event daemon to ensure that the events had bee

Re: [PATCH] - race-free suspend. Was: Re: [linux-pm] [PATCH 0/8] Suspend block api (version 8)

2010-06-02 Thread Neil Brown
On Wed, 2 Jun 2010 02:12:10 -0700 Arve Hjønnevåg wrote: > 2010/6/2 Neil Brown : > > On Wed, 2 Jun 2010 00:05:14 -0700 > > Arve Hjønnevåg wrote: > > > >> On Tue, Jun 1, 2010 at 10:32 PM, Neil Brown wrote: > >> > On Tue, 1 Jun 2010 12:50:01 +0200 (CEST) > >> > Thomas Gleixner wrote: > >> > > >>

Re: [PATCH] - race-free suspend. Was: Re: [linux-pm] [PATCH 0/8] Suspend block api (version 8)

2010-06-02 Thread Neil Brown
On Wed, 2 Jun 2010 10:50:39 +0200 Florian Mickler wrote: > On Wed, 2 Jun 2010 18:06:14 +1000 > Neil Brown wrote: > > > I cannot imagine why it would take multiple seconds to scan a keypad. > > Can you explain that? > > > > Do you mean while keys are held pressed? Maybe you don't get a wake-up

Re: [PATCH] - race-free suspend. Was: Re: [linux-pm] [PATCH 0/8] Suspend block api (version 8)

2010-06-02 Thread Arve Hjønnevåg
2010/6/2 Thomas Gleixner : > On Wed, 2 Jun 2010, Arve Hjønnevåg wrote: >> 2010/6/2 Neil Brown : >> > There would still need to be some sort of communication between the the >> > suspend daemon on any event daemon to ensure that the events had been >> > processed.  This could be very light weight in

Re: [PATCH] - race-free suspend. Was: Re: [linux-pm] [PATCH 0/8] Suspend block api (version 8)

2010-06-02 Thread Thomas Gleixner
On Wed, 2 Jun 2010, Arve Hjønnevåg wrote: > 2010/6/2 Neil Brown : > > There would still need to be some sort of communication between the the > > suspend daemon on any event daemon to ensure that the events had been > > processed.  This could be very light weight interaction.  The point though > >

Re: [PATCH] - race-free suspend. Was: Re: [linux-pm] [PATCH 0/8] Suspend block api (version 8)

2010-06-02 Thread Arve Hjønnevåg
2010/6/2 Neil Brown : > On Wed, 2 Jun 2010 00:05:14 -0700 > Arve Hjønnevåg wrote: > >> On Tue, Jun 1, 2010 at 10:32 PM, Neil Brown wrote: >> > On Tue, 1 Jun 2010 12:50:01 +0200 (CEST) >> > Thomas Gleixner wrote: >> > >> >> On Tue, 1 Jun 2010, Neil Brown wrote: >> >> > >> >> > I think you have ac

Re: [PATCH] - race-free suspend. Was: Re: [linux-pm] [PATCH 0/8] Suspend block api (version 8)

2010-06-02 Thread Florian Mickler
On Wed, 2 Jun 2010 18:06:14 +1000 Neil Brown wrote: > I cannot imagine why it would take multiple seconds to scan a keypad. > Can you explain that? > > Do you mean while keys are held pressed? Maybe you don't get a wake-up event > on key-release? In that case your user-space daemon could block

Re: [PATCH] - race-free suspend. Was: Re: [linux-pm] [PATCH 0/8] Suspend block api (version 8)

2010-06-02 Thread Neil Brown
On Wed, 2 Jun 2010 00:05:14 -0700 Arve Hjønnevåg wrote: > On Tue, Jun 1, 2010 at 10:32 PM, Neil Brown wrote: > > On Tue, 1 Jun 2010 12:50:01 +0200 (CEST) > > Thomas Gleixner wrote: > > > >> On Tue, 1 Jun 2010, Neil Brown wrote: > >> > > >> > I think you have acknowledged that there is a race wi

Re: [PATCH] - race-free suspend. Was: Re: [linux-pm] [PATCH 0/8] Suspend block api (version 8)

2010-06-02 Thread Arve Hjønnevåg
On Tue, Jun 1, 2010 at 10:32 PM, Neil Brown wrote: > On Tue, 1 Jun 2010 12:50:01 +0200 (CEST) > Thomas Gleixner wrote: > >> On Tue, 1 Jun 2010, Neil Brown wrote: >> > >> > I think you have acknowledged that there is a race with suspend - thanks. >> > Next step was "can it be closed". >> > You see

[PATCH] - race-free suspend. Was: Re: [linux-pm] [PATCH 0/8] Suspend block api (version 8)

2010-06-01 Thread Neil Brown
On Tue, 1 Jun 2010 12:50:01 +0200 (CEST) Thomas Gleixner wrote: > On Tue, 1 Jun 2010, Neil Brown wrote: > > > > I think you have acknowledged that there is a race with suspend - thanks. > > Next step was "can it be closed". > > You seem to suggest that it can, but you describe it as a "work arou