From owner-cvs-src@FreeBSD.ORG Mon Mar 3 04:45:17 2008 Return-Path: Delivered-To: cvs-src@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3280210656E5; Mon, 3 Mar 2008 04:45:17 +0000 (UTC) (envelope-from davidxu@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id CA1A28FC18; Mon, 3 Mar 2008 04:45:16 +0000 (UTC) (envelope-from davidxu@FreeBSD.org) Received: from apple.my.domain (root@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m234jB0h085603; Mon, 3 Mar 2008 04:45:13 GMT (envelope-from davidxu@freebsd.org) Message-ID: <47CB82A6.4040903@freebsd.org> Date: Mon, 03 Mar 2008 12:46:30 +0800 From: David Xu User-Agent: Thunderbird 2.0.0.9 (X11/20071211) MIME-Version: 1.0 To: Jeff Roberson References: <200803020741.m227fAoJ039644@repoman.freebsd.org> <47CB6FB0.9040602@freebsd.org> <20080302183513.P920@desktop> In-Reply-To: <20080302183513.P920@desktop> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: cvs-src@FreeBSD.org, Jeff Roberson , src-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/kern init_sysent.c syscalls.c systrace_args.c src/sys/sys syscall.h syscall.mk sysproto.h X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Mar 2008 04:45:17 -0000 Jeff Roberson wrote: >> >> One question is how I can determine the size of cpuset the kernel is >> using ? > > I wrote it to tolerate user masks that were much larger than the kernel > mask. I set the default CPU_SETSIZE in userspace to 128 and in kernel > it's MAXCPU. So in practice an application shouldn't have to redefine > CPU_SETSIZE. If your set is too small the kernel will return ERANGE > however. Unfortunately, if your set is larger than the kernel's > CPU_MAXSIZE it'll also return ERANGE. Maybe I should use different > errnos for those cases. > maybe the prototype of cpuset_getaffinity() can be changed to: int cpuset_getaffinity(cpulevel_t, cpuwhich_t, id_t, int *cpusetsize, cpuset_t *); if *cpusetsize is zero, kernel just writes out the actual size the kernel is using ?