Re: question on resume()

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Oliver Neukum <oliver@...>
Cc: <linux-kernel@...>, <nigel@...>, pm list <linux-pm@...>
Date: Tuesday, January 30, 2007 - 6:32 pm

[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:

I probably should say "that depends", but that wouldn't be very helpful.

Getting back to your initial question, which is if wake_up() may be called
from a driver's .resume() routine, I think the answer is no, it may not,
because in that case the "notified" tasks would be removed from the wait
queue, but the refrigerator() would (wrongly) restore their states as
TASK_UNINTERRUPTIBLE (or TASK_INTERRUPTIBLE for wake_up_interruptible()).

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 thread).

Greetings,
Rafael


-- 
If you don't have the time to read,
you don't have the time or the tools to write.
		- Stephen King
-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
question on resume(), Oliver Neukum, (Mon Jan 29, 7:06 am)
Re: question on resume(), Nigel Cunningham, (Mon Jan 29, 7:24 am)
Re: question on resume(), Oliver Neukum, (Mon Jan 29, 7:34 am)
Re: question on resume(), Nigel Cunningham, (Mon Jan 29, 4:14 pm)
Re: question on resume(), Oliver Neukum, (Mon Jan 29, 5:04 pm)
Re: question on resume(), Nigel Cunningham, (Mon Jan 29, 5:21 pm)
Re: question on resume(), Rafael J. Wysocki, (Mon Jan 29, 7:10 pm)
Re: question on resume(), Rafael J. Wysocki, (Tue Jan 30, 12:32 pm)
Re: question on resume(), Oliver Neukum, (Tue Jan 30, 12:50 pm)
Re: question on resume(), Rafael J. Wysocki, (Tue Jan 30, 6:32 pm)
Re: question on resume(), Rafael J. Wysocki, (Wed Jan 31, 4:33 am)
Re: [linux-pm] question on resume(), Alan Stern, (Wed Jan 31, 11:48 am)
Re: [linux-pm] question on resume(), Rafael J. Wysocki, (Wed Jan 31, 2:52 pm)
Re: question on resume(), Oliver Neukum, (Wed Jan 31, 4:40 am)
Re: question on resume(), Rafael J. Wysocki, (Wed Jan 31, 4:49 am)
Re: question on resume(), Oliver Neukum, (Wed Jan 31, 5:04 am)
Re: [linux-pm] question on resume(), Pavel Machek, (Wed Jan 31, 5:36 am)
Re: [linux-pm] question on resume(), Alan Stern, (Wed Jan 31, 11:54 am)
RE: [linux-pm] question on resume(), Woodruff, Richard, (Wed Jan 31, 2:04 pm)
Re: [linux-pm] question on resume(), Oliver Neukum, (Wed Jan 31, 12:12 pm)
Re: [linux-pm] question on resume(), Alan Stern, (Wed Jan 31, 12:27 pm)
Re: [linux-pm] question on resume(), Oliver Neukum, (Wed Jan 31, 6:14 am)
Re: [linux-pm] question on resume(), Pavel Machek, (Wed Jan 31, 6:30 am)