[lkml]   [1999]   [Jul]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: priority inversion
    Matthew Wilcox wrote:
    > Linux has never had a mechanism to deal with priority inversion since
    > it was first introduced (in 2.0, I believe?). Victor Yodaiken gave an
    > excellent presentation at Linux Expo about why priority inheritance is
    > a stupid idea, but that particular section isn't in the Proceedings.

    I don't think priority inheritance is necessarily complex. It requires a
    different scheduler algorithm, though. With my proposed O(1) scheduler
    (I really should take the time to implement it!), one would proceed as
    follows (if a lock is needed):

    Deschedule the current process, that goes first into the slot of the
    bucked sorted process list. Put the lock-holder there before (if it
    isn't already running on another processor), and set needs_reschedule.
    Schedule the best process (which is quite likely that one, so it can
    release the lock quickly). When returning from the kernel propper, check
    the needs_reschedule flag, which puts the current process back to the
    bucket it belongs to, and gets back to the stalled process.

    The real solution is to eliminate non-spinning kernel locks completely.
    I won't worry about user locks (such as flock), because a RT process
    writing to a potentially locked file is doomed, anyway.

    Bernd Paysan

    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    Please read the FAQ at

     \ /
      Last update: 2005-03-22 13:53    [W:0.019 / U:6.476 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site