[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

RE: Thread starvation with mutex



> From: Jamie Lokier [mailto:jamie shareable org]
> 
> Note that Rusty's futex library does offer both.  The kernel's futuex
> primitive is capable of strict ownership transferral in FIFO order.
>
> Sometimes you want immediate ownership transferral, but in a more
> efficient "fair" but not FIFO, or RT (which is not always fair) order.

Hmmm...how? Are you referring as in waking the waiter without
unlocking the futex in user space? 

I don't really see it very clear, I am kind of very thick now -- please 
be patient with me---I've slept three hours only and I have to catch
a plane to Santa Clara to spend there a whole damn week :(.
Can you explain it in a wee more detail?

> RT futexes are good for some RT purposes, but they have their own
> problem (which is why I didn't encourage the simple RT futex patch
> into 2.6): they _break_ strict mutex transferal when the desired
> sementic is FIFO.

Did you give me that feedback before or did I just miss it? It is
_very_ simple to add that functionality (in fact, it is a one or
two liner). I had never really thought of adding it because nobody
asked for it (or because I never realized somebody did).

As soon as I am able to scratch some time to put together another
release, it will include that.

BTW, the rtfutex patch, as a prototype was ok, but in depth was
horribly broken --- there were many things that were impossible
to do without bigger surgery than what we were intending.
 
> Btw, this problem of mutex/futex starvation appears at another level
> in the system: spinlock starvation...

Yeeep.

Thanks for the input

Iñaky Pérez-González -- Not speaking for Intel -- all opinions are my own (and my fault)




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]