Date: Mon, 03 Mar 2008 12:46:30 +0800 From: David Xu <davidxu@FreeBSD.org> To: Jeff Roberson <jroberson@chesapeake.net> Cc: cvs-src@FreeBSD.org, Jeff Roberson <jeff@FreeBSD.org>, 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 Message-ID: <47CB82A6.4040903@freebsd.org> In-Reply-To: <20080302183513.P920@desktop> References: <200803020741.m227fAoJ039644@repoman.freebsd.org> <47CB6FB0.9040602@freebsd.org> <20080302183513.P920@desktop>
next in thread | previous in thread | raw e-mail | index | archive | help
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 ?
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?47CB82A6.4040903>