[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20080226013312.GA24646@khazad-dum.debian.net>
Date: Mon, 25 Feb 2008 22:33:12 -0300
From: Henrique de Moraes Holschuh <hmh@....eng.br>
To: linux-ide@...r.kernel.org, linux-kernel@...r.kernel.org,
Jens Axboe <jens.axboe@...cle.com>
Subject: Re: [RFC] Disk shock protection (revisited)
On Tue, 26 Feb 2008, Elias Oltmanns wrote:
> > You don't want, for example, to swap out other apps, swap in the
> > daemon, in order to handle a sudden acceleration.
>
> Quite. But with mlock this particular problem can be handled in user
> space just fine. The only reason I can see right now for putting this
And, as long as there is a way to also invoke it from within the kernel, we
can call it from inside the kernel as well when there is a reason to make
that function available. Full flexibility is easily attainable here and
nothing we should bother about too much.
> logic into the kernel as well is to keep the functionality around even
Some hardware (Apple's?) has the entire APS logic in firmware (and AFAIK
*also* export the accelerometer data for other uses). On those boxes, if
you want to trust the firmware, you just ignore the accelerometer and hook
to an interrupt. When you get the interrupt, you freeze the queue and
unload heads. Adding that to work in-kernel would be trivial.
Adding a suspend-time-only emergency HDAPS in-kernel monitor thread would
also be doable, if we wanted to duplicate that for ThinkPads (I don't really
think it is needed, but...). As long as queue freezing and the required
unload immediate procedure can be called in at *any* time before the disk
device, and its buses and controller are suspended, it would do to implement
whatever we feel it is needed.
--
"One disk to rule them all, One disk to find them. One disk to bring
them all and in the darkness grind them. In the Land of Redmond
where the shadows lie." -- The Silicon Valley Tarot
Henrique Holschuh
--
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