Source-Changes archive

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

CVS commit: src



Module Name:    src
Committed By:   thorpej
Date:           Mon Dec 24 16:58:54 UTC 2018

Modified Files:
        src/distrib/sets/lists/comp: mi
        src/distrib/sets/lists/tests: mi module.mi
        src/share/man/man9: Makefile
        src/sys/kern: files.kern
        src/sys/rump/librump/rumpkern: Makefile.rumpkern
        src/sys/sys: param.h
        src/tests/kernel: Makefile
Added Files:
        src/share/man/man9: threadpool.9
        src/sys/kern: kern_threadpool.c
        src/sys/sys: threadpool.h
        src/tests/kernel: t_threadpool.sh
        src/tests/kernel/threadpool_tester: Makefile threadpool_tester.c

Log Message:
Add threadpool(9), an abstraction that provides shared pools of kernel
threads running at specific priorities, with support for unbound pools
and per-cpu pools.

Written by riastradh@, and based on the May 2014 draft, with a few changes
by me:
- Working on the assumption that a relative few priorities will actually
  be used, reduce the memory footprint by using linked lists, rather than
  2 large (and mostly empty) tables.  The performance impact is essentially
  nil, since these lists are consulted only when pools are created (and
  destroyed, for DIAGNOSTIC checks), and the lists will have at most 225
  entries.
- Make threadpool job object, which the caller must allocate storage for,
  really opaque.
- Use typedefs for the threadpool types, to reduce the verbosity of the
  API somewhat.
- Fix a bunch of pool / worker thread / job object lifecycle bugs.

Also include an ATF unit test, written by me, that exercises the basics
of the API by loading a kernel module that exposes several sysctls that
allow the ATF test script to create and destroy threadpools, schedule a
basic job, and verify that it ran.

And thus NetBSD 8.99.29 has arrived.


To generate a diff of this commit:
cvs rdiff -u -r1.2244 -r1.2245 src/distrib/sets/lists/comp/mi
cvs rdiff -u -r1.798 -r1.799 src/distrib/sets/lists/tests/mi
cvs rdiff -u -r1.13 -r1.14 src/distrib/sets/lists/tests/module.mi
cvs rdiff -u -r1.433 -r1.434 src/share/man/man9/Makefile
cvs rdiff -u -r0 -r1.1 src/share/man/man9/threadpool.9
cvs rdiff -u -r1.28 -r1.29 src/sys/kern/files.kern
cvs rdiff -u -r0 -r1.1 src/sys/kern/kern_threadpool.c
cvs rdiff -u -r1.172 -r1.173 src/sys/rump/librump/rumpkern/Makefile.rumpkern
cvs rdiff -u -r1.573 -r1.574 src/sys/sys/param.h
cvs rdiff -u -r0 -r1.1 src/sys/sys/threadpool.h
cvs rdiff -u -r1.54 -r1.55 src/tests/kernel/Makefile
cvs rdiff -u -r0 -r1.1 src/tests/kernel/t_threadpool.sh
cvs rdiff -u -r0 -r1.1 src/tests/kernel/threadpool_tester/Makefile \
    src/tests/kernel/threadpool_tester/threadpool_tester.c

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