[lkml]   [2006]   [Jan]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: pthread_mutex_unlock (was Re: sched_yield() makes OpenLDAP slow)

    On Mon, 30 Jan 2006, Helge Hafting wrote:

    > linux-os (Dick Johnson) wrote:
    >> To fix the current problem, you can substitute usleep(0); It will
    >> give the CPU to somebody if it's computable, then give it back to
    >> you. It seems to work in every case that sched_yield() has
    >> mucked up (perhaps 20 to 30 here).
    > Isn't that dangerous? Someday, someone working on linux (or some
    > other unixish os) might come up with an usleep implementation where
    > usleep(0) just returns and becomes a no-op. Which probably is ok
    > with the usleep spec - it did sleep for zero time . . .
    > Helge Hafting

    Dangerous?? You have a product that needs to ship. You can make
    it work by adding a hack. You add a hack. I don't see danger at
    all. I see getting the management off the back of the software
    engineers so that they can fix the code. Further, you __test__ the
    stuff before you ship. If usleep(0) just spins, then you use

    Also, I don't think any Engineer would use threads for anything
    that could be potentially dangerous anyway. You create step-by-step
    ordered procedures with explicit state-machines for things that
    really need to happen as written. You use threads for things that
    must occur, but you don't give a damn when they occur (like updating
    a window on the screen or sorting keys in a database).

    Dick Johnson
    Penguin : Linux version on an i686 machine (5589.66 BogoMips).
    Warning : 98.36% of all statistics are fiction.

    The information transmitted in this message is confidential and may be privileged. Any review, retransmission, dissemination, or other use of this information by persons or entities other than the intended recipient is prohibited. If you are not the intended recipient, please notify Analogic Corporation immediately - by replying to this message or by sending an email to - and destroy all copies of this information, including any attachments, without reading or disclosing them.

    Thank you.
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    More majordomo info at
    Please read the FAQ at

     \ /
      Last update: 2006-01-30 14:31    [W:0.039 / U:2.488 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site