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]
Message-ID: <20091120202909.GA31117@srcf.ucam.org>
Date:	Fri, 20 Nov 2009 20:29:09 +0000
From:	Matthew Garrett <mjg59@...f.ucam.org>
To:	Kay Sievers <kay.sievers@...y.org>
Cc:	David Zeuthen <david@...ar.dk>, linux-kernel@...r.kernel.org,
	axboe@...nel.dk, linux-hotplug@...r.kernel.org
Subject: Re: [PATCH] [RFC] Add support for uevents on block device idle
	changes

On Thu, Nov 19, 2009 at 04:00:46PM +0100, Kay Sievers wrote:

> Yeah, it would not be as simple as your patch. It probably involves a
> way to get a file descriptor per listener, to let the kernel know if
> anybody is interested, and to auto-cleanup when the listener dies, and
> to have per instance timers.

This would seem to involve a lot of extra locking in the block 
submission and completion code. I don't think it's ideal. How about 
this:

* idle_hysteresis contains a value. If it's greater than 0, attempting 
to increase it will give -EINVAL. It can be polled.

* On idle state transition, applications listening to the stat sysfs 
node will get woken. The stat output will include the number of msecs 
that the disk has been idle. If this is less than the application 
requested, it can set a timer to wake it up again in the future and 
recheck.

* When an application exits, if (and only if) it wrote a value to 
idle_hysteresis, it should set this back to 0. This will notify any 
other apps, which may then set their own wakeup time.

It's not beautiful but it satisfies the constraints. There's a minimum 
of extra wakeups, it doesn't complicate the block path any further and 
multiple applications can take advantage of it.

-- 
Matthew Garrett | mjg59@...f.ucam.org
--
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