From owner-svn-src-head@FreeBSD.ORG Mon Nov 1 00:42:25 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C8724106566B; Mon, 1 Nov 2010 00:42:25 +0000 (UTC) (envelope-from davidxu@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B6FF08FC0C; Mon, 1 Nov 2010 00:42:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oA10gPWi016329; Mon, 1 Nov 2010 00:42:25 GMT (envelope-from davidxu@svn.freebsd.org) Received: (from davidxu@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oA10gPeg016326; Mon, 1 Nov 2010 00:42:25 GMT (envelope-from davidxu@svn.freebsd.org) Message-Id: <201011010042.oA10gPeg016326@svn.freebsd.org> From: David Xu Date: Mon, 1 Nov 2010 00:42:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r214611 - head/sys/kern X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Nov 2010 00:42:25 -0000 Author: davidxu Date: Mon Nov 1 00:42:25 2010 New Revision: 214611 URL: http://svn.freebsd.org/changeset/base/214611 Log: Use integer for size of cpuset, as it won't be bigger than INT_MAX, This is requested by bge. Also move the sysctl into file kern_cpuset.c, because it should always be there, it is independent of thread scheduler. Modified: head/sys/kern/kern_cpuset.c head/sys/kern/sched_ule.c Modified: head/sys/kern/kern_cpuset.c ============================================================================== --- head/sys/kern/kern_cpuset.c Sun Oct 31 23:04:15 2010 (r214610) +++ head/sys/kern/kern_cpuset.c Mon Nov 1 00:42:25 2010 (r214611) @@ -107,6 +107,10 @@ static struct setlist cpuset_ids; static struct unrhdr *cpuset_unr; static struct cpuset *cpuset_zero; +/* Return the size of cpuset_t at the kernel level */ +SYSCTL_INT(_kern_sched, OID_AUTO, cpusetsize, CTLFLAG_RD, + 0, sizeof(cpuset_t), "sizeof(cpuset_t)"); + cpuset_t *cpuset_root; /* Modified: head/sys/kern/sched_ule.c ============================================================================== --- head/sys/kern/sched_ule.c Sun Oct 31 23:04:15 2010 (r214610) +++ head/sys/kern/sched_ule.c Mon Nov 1 00:42:25 2010 (r214611) @@ -2713,7 +2713,6 @@ sysctl_kern_sched_topology_spec(SYSCTL_H return (err); } -static size_t _kern_cpuset_size = sizeof(cpuset_t); #endif SYSCTL_NODE(_kern, OID_AUTO, sched, CTLFLAG_RW, 0, "Scheduler"); @@ -2751,14 +2750,6 @@ SYSCTL_PROC(_kern_sched, OID_AUTO, topol CTLFLAG_RD, NULL, 0, sysctl_kern_sched_topology_spec, "A", "XML dump of detected CPU topology"); -/* - * Return the size of cpuset_t at the kernel level - * - * XXX (gcooper): replace ULONG with SIZE once CTLTYPE_SIZE is implemented. - */ -SYSCTL_ULONG(_kern_sched, OID_AUTO, cpusetsize, CTLFLAG_RD, - &_kern_cpuset_size, 0, "Kernel-level cpuset_t struct size"); - #endif /* ps compat. All cpu percentages from ULE are weighted. */