Date: Mon, 1 Nov 2010 00:42:25 +0000 (UTC) From: David Xu <davidxu@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r214611 - head/sys/kern Message-ID: <201011010042.oA10gPeg016326@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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. */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201011010042.oA10gPeg016326>