On Sun, Dec 26, 2010 at 8:56 PM, Rakib Mullick <rakib.mullick@gmail.com> wrote:
There are methods in kernel, say watchdog, to detect cases that are out
of track. The estimation about the availability of resource is utilized also
in dispatching commands to scsi disk by registering timer.
In nano semaphore, though the methods not implemented,
the waiter is able to work out which task is holding it over 60us in
out-of-track case.
This is another hard question. And Ingo could say a few words about
the accuracy of hrtimer.
This is not hard. When kmallocing 4k, if NULL returned, I will try half,
if still not available, simply return -ENOMEM.
Another way looks to return -EBUSY directly, like aborting what is
dispatched and reset the bus then in scsi.
I will info her every two minutes that taxi still not available, and
go home after 15 infos.
And lets return to nano semaphore, it is designed, unlike semaphore, not to loop
until released by its holder. Another difference is that the caller is free to
select the time period in nano seconds to wait.
Should anything else be added?
thanks,
Hillf
--