Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: src/sys



Module Name:    src
Committed By:   ad
Date:           Thu Sep  6 23:59:02 UTC 2007

Modified Files:
        src/sys/kern: kern_exit.c kern_lwp.c kern_proc.c kern_sleepq.c
            sys_lwp.c
        src/sys/sys: lwp.h syncobj.h

Log Message:
- Fix sleepq_block() to return EINTR if the LWP is cancelled. Pointed out
  by yamt@.

- Introduce SOBJ_SLEEPQ_LIFO, and use for LWPs sleeping via _lwp_park.
  libpthread enqueues most waiters in LIFO order to try and wake LWPs that
  ran recently, since their working set is more likely to be in cache.
  Matching the order of insertion reduces the time spent searching queues
  in the kernel.

- Do not boost the priority of LWPs sleeping in _lwp_park, just let them
  sleep at their user priority level. LWPs waiting for some I/O event in
  the kernel still wait with kernel priority and get woken more quickly.
  This needs more evaluation and is to be revisited, but the effect on a
  variety of benchmarks is positive.

- When waking LWPs, do not send an IPI to remote CPUs or arrange for the
  current LWP to be preempted unless (a) the thread being awoken has kernel
  priority and has higher priority than the currently running thread or (b)
  the remote CPU is idle.


To generate a diff of this commit:
cvs rdiff -r1.186 -r1.187 src/sys/kern/kern_exit.c
cvs rdiff -r1.69 -r1.70 src/sys/kern/kern_lwp.c
cvs rdiff -r1.114 -r1.115 src/sys/kern/kern_proc.c
cvs rdiff -r1.13 -r1.14 src/sys/kern/kern_sleepq.c
cvs rdiff -r1.25 -r1.26 src/sys/kern/sys_lwp.c
cvs rdiff -r1.63 -r1.64 src/sys/sys/lwp.h
cvs rdiff -r1.3 -r1.4 src/sys/sys/syncobj.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.




Home | Main Index | Thread Index | Old Index