Re: [Hdaps-devel] Re: HDAPS, Need to park the head for real

2005-08-25 Thread Jens Axboe
On Thu, Aug 25 2005, Jon Escombe wrote: > Alan Cox wrote: > >@@ -1661,6 +1671,9 @@ > >where = ELEVATOR_INSERT_FRONT; > >rq->flags |= REQ_PREEMPT; > >} > >+ if (action == ide_next) > >+ where = ELEVATOR_INSERT_FRONT; > >+ > >__elv_a

Re: [Hdaps-devel] Re: HDAPS, Need to park the head for real

2005-08-25 Thread Jon Escombe
Alan Cox wrote: @@ -1661,6 +1671,9 @@ where = ELEVATOR_INSERT_FRONT; rq->flags |= REQ_PREEMPT; } + if (action == ide_next) + where = ELEVATOR_INSERT_FRONT; + __elv_add_request(drive->queue, rq, where, 0); ide_do_request(h

Re: [Hdaps-devel] Re: HDAPS, Need to park the head for real

2005-08-25 Thread Alan Cox
You need the kernel side timeout. Consider this case One page of memory holds the parking code A second page is swapped to disk and holds the resume code You park the disk You wakeup You got to page in the resume code So you really do want the kernel helping to avoid a deadlock @@ -1661,6 +1671

Re: [Hdaps-devel] Re: HDAPS, Need to park the head for real

2005-08-24 Thread Jon Escombe
Jens Axboe wrote: Ok, I'll give you some hints to get you started... What you really want to do, is: - Insert a park request at the front of the queue - On completion callback on that request, freeze the block queue and schedule it for unfreeze after a given time Am attaching a first att

RE: [Hdaps-devel] Re: HDAPS, Need to park the head for real

2005-08-19 Thread Alejandro Bonilla
> On Fri, Aug 19 2005, Jon Escombe wrote: > > For hard disk protection, I prefer the idea of the userspace code > > thawing the drive based on current accelerometer data, rather than > > simply waking up after x seconds (maybe you're running for > a bus rather > > than falling off a table)... > >

Re: [Hdaps-devel] Re: HDAPS, Need to park the head for real

2005-08-19 Thread Stefan Rompf
Dave Hansen wrote: > In reality, that probably means a statically compiled daemon that > mlock()s itself, and any structures that it will need. It _might_ even > need to keep an open file descriptor on the "frozen" file. Because, in > theory, that file could be written out to the sysfs backing s

Re: [Hdaps-devel] Re: HDAPS, Need to park the head for real

2005-08-19 Thread Jens Axboe
On Fri, Aug 19 2005, Jon Escombe wrote: > > Please make it "echo 1 > frozen", then userspace can do "echo 0 > > frozen" > after five seconds. > > > >>>What if the code to do "echo 0 > frozen" is swapped out to disk? ;) > >>> > >>> > >>Emergency head parker needs

Re: [Hdaps-devel] Re: HDAPS, Need to park the head for real

2005-08-19 Thread Jon Escombe
Please make it "echo 1 > frozen", then userspace can do "echo 0 > frozen" after five seconds. What if the code to do "echo 0 > frozen" is swapped out to disk? ;) Emergency head parker needs to be pagelocked for other reasons. You do not want to page it from disk while your note

Re: HDAPS, Need to park the head for real

2005-08-18 Thread Jens Axboe
On Thu, Aug 18 2005, Pavel Machek wrote: > Hi! > > > > Please make it "echo 1 > frozen", then userspace can do "echo 0 > frozen" > > > after five seconds. > > > > What if the code to do "echo 0 > frozen" is swapped out to disk? ;) > > Emergency head parker needs to be pagelocked for other reason

Re: HDAPS, Need to park the head for real

2005-08-18 Thread Pavel Machek
Hi! > > Please make it "echo 1 > frozen", then userspace can do "echo 0 > frozen" > > after five seconds. > > What if the code to do "echo 0 > frozen" is swapped out to disk? ;) Emergency head parker needs to be pagelocked for other reasons. You do not want to page it from disk while your notebo

Re: [Hdaps-devel] Re: HDAPS, Need to park the head for real

2005-08-18 Thread Dave Hansen
On Thu, 2005-08-18 at 17:15 -0400, Adam Goode wrote: > On Thu, 2005-08-18 at 22:49 +0200, Pavel Machek wrote: > > Please make it "echo 1 > frozen", then userspace can do "echo 0 > frozen" > > after five seconds. > > What if the code to do "echo 0 > frozen" is swapped out to disk? ;) In the real wo

Re: HDAPS, Need to park the head for real

2005-08-18 Thread Adam Goode
On Thu, 2005-08-18 at 22:49 +0200, Pavel Machek wrote: > Please make it "echo 1 > frozen", then userspace can do "echo 0 > frozen" > after five seconds. What if the code to do "echo 0 > frozen" is swapped out to disk? ;) Thanks, Adam signature.asc Description: This is a digitally signed mes

Re: HDAPS, Need to park the head for real

2005-08-18 Thread Pavel Machek
Hi! > I would suggest some sysfs file for doing this. The best approach would Actually it is usefull for other devices, too... for power saving. Some people call it "runtime power managment". > sysfs attribute for this and we integrate a proper solution once the > request type stuff is finalize

Re: HDAPS, Need to park the head for real

2005-08-17 Thread Jens Axboe
On Wed, Aug 17 2005, Avi Kivity wrote: > Jens Axboe wrote: > > >Ok, I'll give you some hints to get you started... What you really want > >to do, is: > > > >- Insert a park request at the front of the queue > >- On completion callback on that request, freeze the block queue and > > schedule it for

Re: HDAPS, Need to park the head for real

2005-08-17 Thread Avi Kivity
Jens Axboe wrote: Ok, I'll give you some hints to get you started... What you really want to do, is: - Insert a park request at the front of the queue - On completion callback on that request, freeze the block queue and schedule it for unfreeze after a given time how will this interact wit

Re: [Hdaps-devel] Re: HDAPS, Need to park the head for real

2005-08-16 Thread Jon Escombe
On Tue, Aug 16 2005, Alejandro Bonilla Beeche wrote: If I were in your position, I would just implement this for ide (pata, not sata) right now, since that is what you need to support (or do some of these notebooks come with sata?). So it follows that you add an ide Some notebooks are co

Re: HDAPS, Need to park the head for real

2005-08-16 Thread Jens Axboe
On Tue, Aug 16 2005, Alejandro Bonilla Beeche wrote: > On Tue, 2005-08-16 at 22:07 +0200, Jens Axboe wrote: > > On Tue, Aug 16 2005, Alejandro Bonilla Beeche wrote: > > If I were in your position, I would just implement this for ide (pata, > > not sata) right now, since that is what you need to sup

Re: [Hdaps-devel] Re: HDAPS, Need to park the head for real

2005-08-16 Thread Yani Ioannou
On 8/16/05, Alejandro Bonilla Beeche <[EMAIL PROTECTED]> wrote: > On Tue, 2005-08-16 at 22:07 +0200, Jens Axboe wrote: > > On Tue, Aug 16 2005, Alejandro Bonilla Beeche wrote: > > If I were in your position, I would just implement this for ide (pata, > > not sata) right now, since that is what you

Re: HDAPS, Need to park the head for real

2005-08-16 Thread Alejandro Bonilla Beeche
On Tue, 2005-08-16 at 22:07 +0200, Jens Axboe wrote: > On Tue, Aug 16 2005, Alejandro Bonilla Beeche wrote: > If I were in your position, I would just implement this for ide (pata, > not sata) right now, since that is what you need to support (or do some > of these notebooks come with sata?). So it

Re: HDAPS, Need to park the head for real

2005-08-16 Thread Jens Axboe
On Tue, Aug 16 2005, Alejandro Bonilla Beeche wrote: > Hi, > > We are currently almost there with hdaps. We are thinking how we should > make things and have made most of the decesions. We still need help from > anyone that might know about this. Please, if you can think of anything, > let u

Re: HDAPS, Need to park the head for real

2005-08-16 Thread Alejandro Bonilla Beeche
On Tue, 2005-08-16 at 11:34 -0400, Lee Revell wrote: > On Tue, 2005-08-16 at 09:25 -0600, Alejandro Bonilla Beeche wrote: > > We are currently almost there with hdaps. We are thinking how we should > > make things and have made most of the decesions. We still need help from > > anyone that migh

Re: HDAPS, Need to park the head for real

2005-08-16 Thread Lee Revell
On Tue, 2005-08-16 at 09:25 -0600, Alejandro Bonilla Beeche wrote: > We are currently almost there with hdaps. We are thinking how we should > make things and have made most of the decesions. We still need help from > anyone that might know about this. Please, if you can think of anything, >