Messages in this thread | | | From | <> | Subject | Re: [PATCH] 2.5.15 IDE 61 | Date | Wed, 15 May 2002 15:08:11 +0100 |
| |
>> The problem is that with the busy flag on we are wasting quite >> a significant amount of CPU time spinning around it for no good... > >Why spin on the busy flag. Instead you just let the person who clears >the flag check the pending work and do it.
Which is what happened in most cases, pending work could be resumed by calling ide_do_request() (in the previous codebase).
I used/needed this feature when implementing machine sleep support on PowerMac laptops. I basically got the lock, set busy flag on all interfaces then release the lock (well, I did the proper wait for interface not to be busy etc... but you get the point).
That way, I am sure that newly incoming requests would be queued and not sent to HW while the controller is going to sleep (and then the entire machine).
On wakeup, I do the opposite. After reviving the controller and the disk, I clear the busy flag and call ide_do_request() to get things back.
I need to be able to do something similar with the new codebase, though I beleive that should be part of the generic code for power management when the controller gets a suspend request. In theory, it should issue a device-specific suspend command (that is SLEEP for IDE disks, etc...) and make sure the busy flag doesn't get cleared upon termination on this command (thus blocking queues) until the machine gets woken up.
Ben.
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |