From owner-cvs-all@FreeBSD.ORG Sun Mar 2 07:39:23 2008 Return-Path: Delivered-To: cvs-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AF5771065670; Sun, 2 Mar 2008 07:39:23 +0000 (UTC) (envelope-from jeff@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id A12C28FC15; Sun, 2 Mar 2008 07:39:23 +0000 (UTC) (envelope-from jeff@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m227dNj6039428; Sun, 2 Mar 2008 07:39:23 GMT (envelope-from jeff@repoman.freebsd.org) Received: (from jeff@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m227dNLe039427; Sun, 2 Mar 2008 07:39:23 GMT (envelope-from jeff) Message-Id: <200803020739.m227dNLe039427@repoman.freebsd.org> From: Jeff Roberson Date: Sun, 2 Mar 2008 07:39:22 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Cc: Subject: cvs commit: src/sys/conf files src/sys/kern init_main.c kern_cpuset.c kern_thread.c syscalls.master src/sys/sys _types.h cpuset.h proc.h types.h src/lib/libc/sys Symbol.map X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Mar 2008 07:39:23 -0000 jeff 2008-03-02 07:39:22 UTC FreeBSD src repository Modified files: sys/conf files sys/kern init_main.c kern_thread.c syscalls.master sys/sys _types.h types.h proc.h lib/libc/sys Symbol.map Added files: sys/kern kern_cpuset.c sys/sys cpuset.h Log: Add cpuset, an api for thread to cpu binding and cpu resource grouping and assignment. - Add a reference to a struct cpuset in each thread that is inherited from the thread that created it. - Release the reference when the thread is destroyed. - Add prototypes for syscalls and macros for manipulating cpusets in sys/cpuset.h - Add syscalls to create, get, and set new numbered cpusets: cpuset(), cpuset_{get,set}id() - Add syscalls for getting and setting affinity masks for cpusets or individual threads: cpuid_{get,set}affinity() - Add types for the 'level' and 'which' parameters for the cpuset. This will permit expansion of the api to cover cpu masks for other objects identifiable with an id_t integer. For example, IRQs and Jails may be coming soon. - The root set 0 contains all valid cpus. All thread initially belong to cpuset 1. This permits migrating all threads off of certain cpus to reserve them for special applications. Sponsored by: Nokia Discussed with: arch, rwatson, brooks, davidxu, deischen Reviewed by: antoine Revision Changes Path 1.10 +15 -0 src/lib/libc/sys/Symbol.map 1.1275 +1 -0 src/sys/conf/files 1.291 +2 -0 src/sys/kern/init_main.c 1.1 +907 -0 src/sys/kern/kern_cpuset.c (new) 1.266 +5 -1 src/sys/kern/kern_thread.c 1.238 +13 -0 src/sys/kern/syscalls.master 1.24 +3 -0 src/sys/sys/_types.h 1.1 +146 -0 src/sys/sys/cpuset.h (new) 1.504 +2 -1 src/sys/sys/proc.h 1.98 +4 -0 src/sys/sys/types.h