Received: by mail.netbsd.org (Postfix, from userid 605) id C827E84D90; Mon, 24 Dec 2018 16:58:56 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mail.netbsd.org (Postfix) with ESMTP id D6F3884D85 for ; Mon, 24 Dec 2018 16:58:55 +0000 (UTC) X-Virus-Scanned: amavisd-new at netbsd.org Received: from mail.netbsd.org ([IPv6:::1]) by localhost (mail.netbsd.org [IPv6:::1]) (amavisd-new, port 10025) with ESMTP id FxcDjfRIRByQ for ; Mon, 24 Dec 2018 16:58:55 +0000 (UTC) Received: from cvs.NetBSD.org (ivanova.netbsd.org [199.233.217.197]) by mail.netbsd.org (Postfix) with ESMTP id 11E0884C82 for ; Mon, 24 Dec 2018 16:58:55 +0000 (UTC) Received: by cvs.NetBSD.org (Postfix, from userid 500) id 096CCFB16; Mon, 24 Dec 2018 16:58:55 +0000 (UTC) Content-Disposition: inline Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" MIME-Version: 1.0 Date: Mon, 24 Dec 2018 16:58:55 +0000 From: "Jason R Thorpe" Subject: CVS commit: src To: source-changes@NetBSD.org X-Mailer: log_accum Message-Id: <20181224165855.096CCFB16@cvs.NetBSD.org> Sender: source-changes-owner@NetBSD.org List-Id: source-changes.NetBSD.org Precedence: bulk Reply-To: source-changes-d@NetBSD.org Mail-Reply-To: "Jason R Thorpe" Mail-Followup-To: source-changes-d@NetBSD.org List-Unsubscribe: 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.