Re: [linux-pm] question on resume()

2007-01-31 Thread Rafael J. Wysocki
On Wednesday, 31 January 2007 16:48, Alan Stern wrote: > On Wed, 31 Jan 2007, Rafael J. Wysocki wrote: > > > On Tuesday, 30 January 2007 23:32, Rafael J. Wysocki wrote: > > > [Added linux-pm to the Cc list, because I'm going to talk about things > > > that > > > I know only from reading the code.

RE: [linux-pm] question on resume()

2007-01-31 Thread Woodruff, Richard
> Again you misunderstood the question. The driver must start queued I/O > when its resume() method is called. It should then be okay for the driver > to call wake_up_interruptible(), even before tasks are unfrozen. I kind of like the way MontaVista worked around this in some 2.4 drivers where

Re: [linux-pm] question on resume()

2007-01-31 Thread Alan Stern
On Wed, 31 Jan 2007, Oliver Neukum wrote: > Am Mittwoch, 31. Januar 2007 16:54 schrieb Alan Stern: > > On Wed, 31 Jan 2007, Pavel Machek wrote: > > > > "cease IO"? No, I believe it is enough not to start new I/O. Userspace > > > is frozen at that point, it can't ask you to do I/O. > > > > There

Re: [linux-pm] question on resume()

2007-01-31 Thread Oliver Neukum
Am Mittwoch, 31. Januar 2007 16:54 schrieb Alan Stern: > On Wed, 31 Jan 2007, Pavel Machek wrote: > > "cease IO"? No, I believe it is enough not to start new I/O. Userspace > > is frozen at that point, it can't ask you to do I/O. > > There may be I/O requests sitting in a queue, already submitted

Re: [linux-pm] question on resume()

2007-01-31 Thread Alan Stern
On Wed, 31 Jan 2007, Pavel Machek wrote: > Hi! > > > > Yes, it will. The process freezer can only return success if there are > > > no more > > > TASK_UNINTERRUPTIBLE tasks. Otherwise it fails (after a timeout). > > > > So, this means, on suspend(): > > > > 1. Don't worry about TASK_UNINTERR

Re: [linux-pm] question on resume()

2007-01-31 Thread Alan Stern
On Wed, 31 Jan 2007, Rafael J. Wysocki wrote: > On Tuesday, 30 January 2007 23:32, Rafael J. Wysocki wrote: > > [Added linux-pm to the Cc list, because I'm going to talk about things that > > I know only from reading the code.] > > > > On Tuesday, 30 January 2007 17:50, Oliver Neukum wrote: > > >

Re: [linux-pm] question on resume()

2007-01-31 Thread Pavel Machek
Hi! > > > So, this means, on suspend(): > > > > > > 1. Don't worry about TASK_UNINTERRUPTIBLE > > > 2. Do worry about TASK_INTERRUPTIBLE > > > We have to cease IO and must not call wake_up_interruptible() > > > > "cease IO"? No, I believe it is enough not to start new I/O. Userspace > > is froze

Re: [linux-pm] question on resume()

2007-01-31 Thread Oliver Neukum
Am Mittwoch, 31. Januar 2007 10:36 schrieb Pavel Machek: > Hi! > > > > Yes, it will. The process freezer can only return success if there are > > > no more > > > TASK_UNINTERRUPTIBLE tasks. Otherwise it fails (after a timeout). > > > > So, this means, on suspend(): > > > > 1. Don't worry abou

Re: [linux-pm] question on resume()

2007-01-31 Thread Pavel Machek
Hi! > > Yes, it will. The process freezer can only return success if there are no > > more > > TASK_UNINTERRUPTIBLE tasks. Otherwise it fails (after a timeout). > > So, this means, on suspend(): > > 1. Don't worry about TASK_UNINTERRUPTIBLE > 2. Do worry about TASK_INTERRUPTIBLE > We have to

Re: question on resume()

2007-01-31 Thread Oliver Neukum
Am Mittwoch, 31. Januar 2007 09:49 schrieb Rafael J. Wysocki: > On Wednesday, 31 January 2007 09:40, Oliver Neukum wrote: > > Am Mittwoch, 31. Januar 2007 09:33 schrieb Rafael J. Wysocki: > > > On Tuesday, 30 January 2007 23:32, Rafael J. Wysocki wrote: > > > > > > Generally, you are safe if your

Re: question on resume()

2007-01-31 Thread Rafael J. Wysocki
On Wednesday, 31 January 2007 09:40, Oliver Neukum wrote: > Am Mittwoch, 31. Januar 2007 09:33 schrieb Rafael J. Wysocki: > > On Tuesday, 30 January 2007 23:32, Rafael J. Wysocki wrote: > > > > Generally, you are safe if your driver only calls wake_up() from a process > > > context, but not from .

Re: question on resume()

2007-01-31 Thread Oliver Neukum
Am Mittwoch, 31. Januar 2007 09:33 schrieb Rafael J. Wysocki: > On Tuesday, 30 January 2007 23:32, Rafael J. Wysocki wrote: > > Generally, you are safe if your driver only calls wake_up() from a process > > context, but not from .resume() or .suspend() routines (or from an > > unfreezeable kernel

Re: question on resume()

2007-01-31 Thread Rafael J. Wysocki
On Tuesday, 30 January 2007 23:32, Rafael J. Wysocki wrote: > [Added linux-pm to the Cc list, because I'm going to talk about things that > I know only from reading the code.] > > On Tuesday, 30 January 2007 17:50, Oliver Neukum wrote: > > Am Dienstag, 30. Januar 2007 17:32 schrieb Rafael J. Wysoc

Re: question on resume()

2007-01-30 Thread Rafael J. Wysocki
[Added linux-pm to the Cc list, because I'm going to talk about things that I know only from reading the code.] On Tuesday, 30 January 2007 17:50, Oliver Neukum wrote: > Am Dienstag, 30. Januar 2007 17:32 schrieb Rafael J. Wysocki: > > However, you can always inspect the PF_FROZEN flag of the task

Re: question on resume()

2007-01-30 Thread Oliver Neukum
Am Dienstag, 30. Januar 2007 17:32 schrieb Rafael J. Wysocki: > However, you can always inspect the PF_FROZEN flag of the tasks in question > if that's practicable. What would I do with that information? Ignore completion of IO? Regards Oliver - To unsubscribe from this li

Re: question on resume()

2007-01-30 Thread Rafael J. Wysocki
On Tuesday, 30 January 2007 00:10, Rafael J. Wysocki wrote: > Hi, > > On Monday, 29 January 2007 22:21, Nigel Cunningham wrote: > > Hi. > > > > On Mon, 2007-01-29 at 22:04 +0100, Oliver Neukum wrote: > > > Am Montag, 29. Januar 2007 21:14 schrieb Nigel Cunningham: > > > > Hi. > > > > > > > > On

Re: question on resume()

2007-01-29 Thread Rafael J. Wysocki
Hi, On Monday, 29 January 2007 22:21, Nigel Cunningham wrote: > Hi. > > On Mon, 2007-01-29 at 22:04 +0100, Oliver Neukum wrote: > > Am Montag, 29. Januar 2007 21:14 schrieb Nigel Cunningham: > > > Hi. > > > > > > On Mon, 2007-01-29 at 12:34 +0100, Oliver Neukum wrote: > > > > Am Montag, 29. Janu

Re: question on resume()

2007-01-29 Thread Nigel Cunningham
Hi. On Mon, 2007-01-29 at 22:04 +0100, Oliver Neukum wrote: > Am Montag, 29. Januar 2007 21:14 schrieb Nigel Cunningham: > > Hi. > > > > On Mon, 2007-01-29 at 12:34 +0100, Oliver Neukum wrote: > > > Am Montag, 29. Januar 2007 12:24 schrieb Nigel Cunningham: > > > > Hi. > > > > > > > > On Mon, 20

Re: question on resume()

2007-01-29 Thread Oliver Neukum
Am Montag, 29. Januar 2007 21:14 schrieb Nigel Cunningham: > Hi. > > On Mon, 2007-01-29 at 12:34 +0100, Oliver Neukum wrote: > > Am Montag, 29. Januar 2007 12:24 schrieb Nigel Cunningham: > > > Hi. > > > > > > On Mon, 2007-01-29 at 12:06 +0100, Oliver Neukum wrote: > > > > Hi, > > > > > > > > ma

Re: question on resume()

2007-01-29 Thread Nigel Cunningham
Hi. On Mon, 2007-01-29 at 12:34 +0100, Oliver Neukum wrote: > Am Montag, 29. Januar 2007 12:24 schrieb Nigel Cunningham: > > Hi. > > > > On Mon, 2007-01-29 at 12:06 +0100, Oliver Neukum wrote: > > > Hi, > > > > > > may a driver call wake_up() while doing resume() ? > > > > I assume you mean wak

Re: question on resume()

2007-01-29 Thread Oliver Neukum
Am Montag, 29. Januar 2007 12:24 schrieb Nigel Cunningham: > Hi. > > On Mon, 2007-01-29 at 12:06 +0100, Oliver Neukum wrote: > > Hi, > > > > may a driver call wake_up() while doing resume() ? > > I assume you mean waking a userspace process from drivers_resume(). If > so, the answer is no - proc

Re: question on resume()

2007-01-29 Thread Nigel Cunningham
Hi. On Mon, 2007-01-29 at 12:06 +0100, Oliver Neukum wrote: > Hi, > > may a driver call wake_up() while doing resume() ? I assume you mean waking a userspace process from drivers_resume(). If so, the answer is no - processes will still be frozen at the point. In the case of Suspend2, the LRU pag