lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 23 Feb 2009 15:13:19 -0800
From:	Arve Hjønnevåg <arve@...roid.com>
To:	"Rafael J. Wysocki" <rjw@...k.pl>
Cc:	Alan Stern <stern@...land.harvard.edu>,
	"Woodruff, Richard" <r-woodruff2@...com>,
	Arjan van de Ven <arjan@...radead.org>,
	Kyle Moffett <kyle@...fetthome.net>,
	Oliver Neukum <oliver@...kum.org>,
	Benjamin Herrenschmidt <benh@...nel.crashing.org>,
	pm list <linux-pm@...ts.linux-foundation.org>,
	LKML <linux-kernel@...r.kernel.org>, Pavel Machek <pavel@....cz>,
	Nigel Cunningham <nigel@...el.suspend2.net>,
	Matthew Garrett <mjg59@...f.ucam.org>,
	mark gross <mgross@...ux.intel.com>,
	Uli Luckas <u.luckas@...d.de>,
	Igor Stoppa <igor.stoppa@...ia.com>,
	Brian Swetland <swetland@...gle.com>,
	Len Brown <lenb@...nel.org>
Subject: Re: [RFD] Automatic suspend

On Sat, Feb 21, 2009 at 12:20 PM, Rafael J. Wysocki <rjw@...k.pl> wrote:
> On Saturday 21 February 2009, Arve Hjønnevåg wrote:
>> On Sat, Feb 21, 2009 at 1:47 AM, Rafael J. Wysocki <rjw@...k.pl> wrote:
>> > On Saturday 21 February 2009, Arve Hjønnevåg wrote:
>> >> On Fri, Feb 20, 2009 at 3:57 PM, Rafael J. Wysocki <rjw@...k.pl> wrote:
>> >> > On Saturday 21 February 2009, Arve Hjønnevåg wrote:
>> >> >> On Fri, Feb 20, 2009 at 7:56 AM, Rafael J. Wysocki <rjw@...k.pl> wrote:
>> >> >> > On Friday 20 February 2009, Arve Hjønnevåg wrote:
>> >> >> >> On Fri, Feb 20, 2009 at 2:49 AM, Rafael J. Wysocki <rjw@...k.pl> wrote:
>> >> >> >> > On Friday 20 February 2009, Arve Hjønnevåg wrote:
>> >> >> >> >> On Thu, Feb 19, 2009 at 2:08 PM, Alan Stern <stern@...land.harvard.edu> wrote:
> [--snip--]
>> >> > The idea is to have both /sys/power/state and /sys/power/sleep at the same
>> >> > time, where /sys/power/state will work just like it does right now.  Sure,
>> >> > there must be mutual exclusion between the two, but that's a matter of
>> >> > implementation IMO.
>> >>
>> >> If you want to only prevent suspend though one interface, you have to
>> >> also pass information to the driver about its suspend hook is being
>> >> called so it can conditionally return -EBUSY. The wakelock interface
>> >> requires less code in each driver.
>> >
>> > Well, I don't think so.  Moreover, it requires you to spread wakelocks all
>> > over the place if you don't use the timeouted ones which, let's face it, is
>> > hardly acceptable.
>>
>> Your method does not reduce the number of places that has to be
>> modified. Any component where we add a wakelock, you have to add a
>> suspend handler to abort suspend when we would have held a wakelock.
>
> Well, maybe not, but it doesn't introduce entirely new API for device drivers.
> Instead, it extends the existing interfaces which I think is more appropriate.

The existing interfaces require polling. I don't think extending these
interfaces to make the polling faster is a better solution than adding
an interface to avoid polling.

Also, with your solution, how would you modify evdev.c to prevent
suspend while the event queue is not empty. This code does not have
any suspend hooks and the queue is not tied to any thread.

-- 
Arve Hjønnevåg
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ