cvs commit: src/sys/kern sched_4bsd.c

John Baldwin jhb at
Sat Oct 27 15:07:41 PDT 2007

jhb         2007-10-27 22:07:40 UTC

  FreeBSD src repository

  Modified files:
    sys/kern             sched_4bsd.c 
  Change the roundrobin implementation in the 4BSD scheduler to trigger a
  userland preemption directly from hardclock() via sched_clock() when a
  thread uses up a full quantum instead of using a periodic timeout to cause
  a userland preemption every so often.  This fixes a potential deadlock
  when IPI_PREEMPTION isn't enabled where softclock blocks on a lock held
  by a thread pinned or bound to another CPU.  The current thread on that
  CPU will never be preempted while softclock is blocked.
  Note that ULE already drives its round-robin userland preemption from
  sched_clock() as well and always enables IPI_PREEMPT.
  MFC after:      1 week
  Revision  Changes    Path
  1.108     +8 -29     src/sys/kern/sched_4bsd.c

More information about the cvs-src mailing list