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 dmitry.torok...@gmail.com 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 ne...@suse.de wrote: And this

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 dmitry.torok...@gmail.com: 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 dmitry.torok...@gmail.com wrote: On Wed, Jun 02, 2010 at 09:05:21PM +0200, Florian Mickler wrote: On Wed, 2 Jun 2010 21:02:24

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

2010-06-03 Thread Neil Brown
On Wed, 2 Jun 2010 11:05:18 -0700 Brian Swetland swetl...@google.com wrote: On Wed, Jun 2, 2010 at 1:06 AM, Neil Brown ne...@suse.de wrote: On Wed, 2 Jun 2010 00:05:14 -0700 Arve Hjønnevåg a...@android.com wrote: The user-space suspend daemon avoids losing wake-events by using

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

2010-06-03 Thread Brian Swetland
On Wed, Jun 2, 2010 at 11:33 PM, Neil Brown ne...@suse.de 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

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 estimate in

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-02 Thread Arve Hjønnevåg
On Tue, Jun 1, 2010 at 10:32 PM, Neil Brown ne...@suse.de wrote: On Tue, 1 Jun 2010 12:50:01 +0200 (CEST) Thomas Gleixner t...@linutronix.de 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

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 a...@android.com wrote: On Tue, Jun 1, 2010 at 10:32 PM, Neil Brown ne...@suse.de wrote: On Tue, 1 Jun 2010 12:50:01 +0200 (CEST) Thomas Gleixner t...@linutronix.de wrote: On Tue, 1 Jun 2010, Neil Brown wrote: I think you have

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 ne...@suse.de 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

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 ne...@suse.de: On Wed, 2 Jun 2010 00:05:14 -0700 Arve Hjønnevåg a...@android.com wrote: On Tue, Jun 1, 2010 at 10:32 PM, Neil Brown ne...@suse.de wrote: On Tue, 1 Jun 2010 12:50:01 +0200 (CEST) Thomas Gleixner t...@linutronix.de wrote: On Tue, 1 Jun 2010, Neil Brown

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 ne...@suse.de: 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

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 t...@linutronix.de: On Wed, 2 Jun 2010, Arve Hjønnevåg wrote: 2010/6/2 Neil Brown ne...@suse.de: 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

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 ne...@suse.de wrote: On Wed, 2 Jun 2010 00:05:14 -0700 Arve Hjønnevåg a...@android.com 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

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 ne...@suse.de 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

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 t...@linutronix.de 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

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 r...@sisk.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

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 r...@sisk.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

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 flor...@mickler.org 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

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 ne...@suse.de 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

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 dmitry.torok...@gmail.com 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 ne...@suse.de wrote: And this decision (to block suspend) really needs to be made in the

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 dmitry.torok...@gmail.com 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 ne...@suse.de wrote: And this decision (to block suspend) really needs to be made in the driver,

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 a...@android.com wrote: On Wed, Jun 2, 2010 at 4:32 PM, Dmitry Torokhov dmitry.torok...@gmail.com 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 ne...@suse.de wrote:

[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 t...@linutronix.de 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