Re: [linux-pm] [PATCH 2/9] PM: suspend_block: Add driver to access suspend blockers from user-space

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Matt Helsley
Date: Thursday, April 22, 2010 - 7:25 pm

On Thu, Apr 22, 2010 at 06:08:51PM -0700, Arve Hjønnevåg wrote:

Why not initialize the user suspend blocker struct by default and then
allow each BLOCK to specify the name? Also, my guess is it's not
really a name so much as a description of why we're blocking suspend,
right?

Should the kernel reject empty strings or strings composed only of
"non-printing" characters?


lsof will show which tasks hold the device open but not which ones
are blocking suspend. If merely keeping the device open corresponded to
blocking suspend then this would be obvious and no ioctls would be
necessary -- just write() the name/description.

Do you block/unblock often enough that frequent open/close of the device are
a problem? Or has this idea been considered and discarded for other reasons?


<snip>


nit: Usually locks protect data -- not functions.

Couldn't this be part of the user_suspend_blocker struct? That would allow
the description/name to change as described above.


<snip>

Cheers,
	-Matt Helsley
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 0/9] Suspend block api (version 4), =?UTF-8?q?Arve=20Hj= ..., (Thu Apr 22, 6:08 pm)
[PATCH 1/9] PM: Add suspend block api., =?UTF-8?q?Arve=20Hj= ..., (Thu Apr 22, 6:08 pm)
[PATCH 2/9] PM: suspend_block: Add driver to access suspen ..., =?UTF-8?q?Arve=20Hj= ..., (Thu Apr 22, 6:08 pm)
[PATCH 3/9] PM: suspend_block: Abort task freezing if a su ..., =?UTF-8?q?Arve=20Hj= ..., (Thu Apr 22, 6:08 pm)
[PATCH 4/9] PM: suspend_block: Switch to list of active an ..., =?UTF-8?q?Arve=20Hj= ..., (Thu Apr 22, 6:08 pm)
[PATCH 5/9] PM: suspend_block: Add debugfs file, =?UTF-8?q?Arve=20Hj= ..., (Thu Apr 22, 6:08 pm)
[PATCH 6/9] PM: suspend_block: Add suspend_blocker stats, =?UTF-8?q?Arve=20Hj= ..., (Thu Apr 22, 6:08 pm)
[PATCH 7/9] PM: Add suspend blocking work., =?UTF-8?q?Arve=20Hj= ..., (Thu Apr 22, 6:08 pm)
[PATCH 8/9] Input: Block suspend while event queue is not ..., =?UTF-8?q?Arve=20Hj= ..., (Thu Apr 22, 6:08 pm)
[PATCH 9/9] power_supply: Block suspend while power supply ..., =?UTF-8?q?Arve=20Hj= ..., (Thu Apr 22, 6:08 pm)
Re: [linux-pm] [PATCH 2/9] PM: suspend_block: Add driver t ..., Matt Helsley, (Thu Apr 22, 7:25 pm)
Re: [PATCH 7/9] PM: Add suspend blocking work., Tejun Heo, (Fri Apr 23, 1:16 am)
Re: [PATCH 7/9] PM: Add suspend blocking work., Oleg Nesterov, (Fri Apr 23, 5:20 am)
Re: [PATCH 5/9] PM: suspend_block: Add debugfs file, Randy Dunlap, (Fri Apr 23, 1:58 pm)
Re: [PATCH 7/9] PM: Add suspend blocking work., Arve Hjønnevåg, (Fri Apr 23, 3:49 pm)
Re: [PATCH 5/9] PM: suspend_block: Add debugfs file, Arve Hjønnevåg, (Fri Apr 23, 8:23 pm)
Re: [PATCH 5/9] PM: suspend_block: Add debugfs file, Randy Dunlap, (Fri Apr 23, 9:24 pm)
Re: [PATCH 5/9] PM: suspend_block: Add debugfs file, Arve Hjønnevåg, (Fri Apr 23, 9:54 pm)
Re: [PATCH 8/9] Input: Block suspend while event queue is ..., Arve Hjønnevåg, (Fri Apr 23, 9:58 pm)
Re: [PATCH 8/9] Input: Block suspend while event queue is ..., Arve Hjønnevåg, (Fri Apr 23, 10:02 pm)
Re: [PATCH 7/9] PM: Add suspend blocking work., Arve Hjønnevåg, (Fri Apr 23, 10:21 pm)
Re: [PATCH 7/9] PM: Add suspend blocking work., Tejun Heo, (Fri Apr 23, 11:33 pm)
Re: [PATCH 7/9] PM: Add suspend blocking work., Arve Hjønnevåg, (Sat Apr 24, 12:21 am)
Re: [PATCH 7/9] PM: Add suspend blocking work., Tejun Heo, (Sat Apr 24, 12:43 am)
Re: [PATCH 5/9] PM: suspend_block: Add debugfs file, Randy Dunlap, (Sun Apr 25, 12:53 pm)
Re: [PATCH 5/9] PM: suspend_block: Add debugfs file, Randy Dunlap, (Sun Apr 25, 5:23 pm)
Re: [PATCH 5/9] PM: suspend_block: Add debugfs file, Randy Dunlap, (Sun Apr 25, 5:50 pm)
Re: [PATCH 5/9] PM: suspend_block: Add debugfs file, Brian Swetland, (Sun Apr 25, 11:24 pm)
Re: [PATCH 5/9] PM: suspend_block: Add debugfs file, Randy Dunlap, (Mon Apr 26, 6:28 am)
Re: [PATCH 7/9] PM: Add suspend blocking work., Oleg Nesterov, (Mon Apr 26, 7:06 am)