From owner-svn-src-all@FreeBSD.ORG Wed Oct 27 08:39:53 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C50441065673; Wed, 27 Oct 2010 08:39:53 +0000 (UTC) (envelope-from yanegomi@gmail.com) Received: from mail-wy0-f182.google.com (mail-wy0-f182.google.com [74.125.82.182]) by mx1.freebsd.org (Postfix) with ESMTP id A9A3D8FC18; Wed, 27 Oct 2010 08:39:52 +0000 (UTC) Received: by wyb42 with SMTP id 42so424304wyb.13 for ; Wed, 27 Oct 2010 01:39:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:sender:received :in-reply-to:references:date:x-google-sender-auth:message-id:subject :from:to:cc:content-type; bh=Qm/7qYv4HOuqs0A4W0DQIxS8BXURo065sMpU07NrGkU=; b=hGALf0bk4WP45hgmXTxHNTf4zudAyoE8xQfXbzE6EjPtUbx3Puo8nA9DnJldqfMRu/ OxRmEeA3UimAXaLPiH+gn2E8YrM8MtnNbFEb7RPPt5pMWqApPIuGSA+bb7OTi0tjD8Wk HRs0r+qxRg3/zBaW2K/Sb/06zjfkNc+gFlcRc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; b=jOw2Rgzcf97cdxqNTPFXZq84vS8K12Wcfi0sPr7I8oYRv3e9jvRqq0SFFddNs217gw xqz9cVmeYOp7FtPnQ8HEUb78ILqff2f59d37uSTWg5cHZXF8U0UYeVpJb9L67TCyfHl+ TuJn0q+nJlh9ewwbHvdx+QNzvfAGhN18Z05b0= MIME-Version: 1.0 Received: by 10.216.63.77 with SMTP id z55mr4204510wec.66.1288168791204; Wed, 27 Oct 2010 01:39:51 -0700 (PDT) Sender: yanegomi@gmail.com Received: by 10.216.10.198 with HTTP; Wed, 27 Oct 2010 01:39:51 -0700 (PDT) In-Reply-To: <4CC85552.2020100@freebsd.org> References: <201010270232.o9R2Wsu3084553@svn.freebsd.org> <4CC803A8.3040602@freebsd.org> <20101027082122.GD1848@garage.freebsd.pl> <4CC85552.2020100@freebsd.org> Date: Wed, 27 Oct 2010 01:39:51 -0700 X-Google-Sender-Auth: ugvGh5K3n0vYSeQlfY9269s0NYI Message-ID: From: Garrett Cooper To: David Xu Content-Type: text/plain; charset=ISO-8859-1 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Pawel Jakub Dawidek Subject: Re: svn commit: r214409 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Oct 2010 08:39:53 -0000 On Wed, Oct 27, 2010 at 9:37 AM, David Xu wrote: > Pawel Jakub Dawidek wrote: >> >> On Wed, Oct 27, 2010 at 10:49:12AM +0000, David Xu wrote: >>> >>> I really hate to see such a problem that userland can not figure out >>> what kernel is using, I try hardly to guess, but still can not find >>> what it is using. yes, I think the doc may need to be fixed or >>> another syscall is needed. >> >> Maybe you could just add sysctl and eventually put it into sysconf(3)? > > I just found a dirty method, use sizeof(long) and kern.smp.maxcpus > 32 to figure out the size the kernel is using, because it is how > cpuset_t is constructed, wish it will never be changed. ;-) Pawel's suggestion makes more sense to be honest. If this should be added to sysconf(3) and is worthy of abstracting out into a more generalized concept, then it might be a good idea to get into POSIX. However, it would need to be hashed out because the current implementation is very FreeBSD centric of course :).