Re: sched_yield() makes OpenLDAP slow

From: Bernardo Innocenti (bernie_at_develer.com)
Date: 08/19/05

  • Next message: Michal Piotrowski: "Re: Schedulers benchmark - Was: [ANNOUNCE][RFC] PlugSched-5.2.4 for 2.6.12 and 2.6.13-rc6"
    Date:	Fri, 19 Aug 2005 05:10:18 +0200
    To: Nick Piggin <nickpiggin@yahoo.com.au>
    
    

    Nick Piggin wrote:

    > We class the SCHED_OTHER policy as having a single priority, which
    > I believe is allowed (and even makes good sense, because dynamic
    > and even nice priorities aren't really well defined).
    >
    > That also makes our sched_yield() behaviour correct.
    >
    > AFAIKS, sched_yield should only really be used by realtime
    > applications that know exactly what they're doing.

    I'm pretty sure this has already been discussed in the
    past, but I fail to see why this new behavior of
    sched_yield() would be more correct.

    In the OpenLDAP bug discussion, one of the developers
    considers this a Linux quirk needing a workaround, not
    a real bug in OpenLDAP.

    As I understand it, the old behavior was to push the
    yielding process to the end of the queue for processes
    with the same niceness. This is somewhat closer to
    the (vague) definition in the POSIX man pages:

     The sched_yield() function shall force the running
     thread to relinquish the processor until it again
     becomes the head of its thread list. It takes no arguments.

    Pushing the process far behind in the queue, even after
    niced CPU crunchers, appears a bit extreme. It seems
    most programs expect sched_yield() to only reschedule
    the calling thread wrt its sibling threads, to be used
    to implement do-it-yourself spinlocks and the like.

    -- 
      // Bernardo Innocenti - Develer S.r.l., R&D dept.
    \X/  http://www.develer.com/
    -
    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/
    

  • Next message: Michal Piotrowski: "Re: Schedulers benchmark - Was: [ANNOUNCE][RFC] PlugSched-5.2.4 for 2.6.12 and 2.6.13-rc6"

    Relevant Pages