From owner-freebsd-current@FreeBSD.ORG Fri May 30 15:34:00 2014 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 04563EE2; Fri, 30 May 2014 15:34:00 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CE75421FD; Fri, 30 May 2014 15:33:59 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id CB300B94B; Fri, 30 May 2014 11:33:57 -0400 (EDT) From: John Baldwin To: Adrian Chadd Subject: Re: cpuid_t typedef? (was Re: Processor cores not properly detected/activated?) Date: Fri, 30 May 2014 10:57:23 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.4-CBSD-20140415; KDE/4.5.5; amd64; ; ) References: <201405291729.33471.jhb@freebsd.org> In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201405301057.23736.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Fri, 30 May 2014 11:33:57 -0400 (EDT) Cc: Attilio Rao , freebsd-current , Jia-Shiun Li , Alan Somers , Tim Bishop X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 May 2014 15:34:00 -0000 On Thursday, May 29, 2014 5:46:05 pm Adrian Chadd wrote: > On 29 May 2014 14:29, John Baldwin wrote: > > On Thursday, May 29, 2014 5:09:05 pm Adrian Chadd wrote: > >> On 29 May 2014 13:18, John Baldwin wrote: > >> > >> >> anyway. Besides all of this - I'm thinking of just introducing: > >> >> > >> >> typedef uint32_t cpuid_t; > >> >> > >> >> .. then once we've converted all the users, we can make NOCPU > >> >> something other than 255 (which is the other limiting factor here..) > >> >> > >> >> Any objections? > >> > > >> > This one is a bit harder as you'll have to do shims for kinfo_proc, but > >> > I think this is fine. You could also just use u_int, but a new foo_t > >> > isn't that bad I guess. > >> > >> I don't think I'd modify any userland-facing ABI/KBI's just yet. I'm > >> just worried that 11.0-REL will come out before we have made a decent > >> inroads into this and we _can't_ support > 254 CPUs. > > > > Eh, that's one of the biggies to do actually. Kind of pointless to > > update td_oncpu/lastcpu and not fix kinfo_proc at the same time. You'll > > just have to add new int fields and populate the old ones with sane values > > for CPUs < 255. > > Ugh. Ok. I was too deep in the trenches of device drivers and other > ancillary things doing bad things to char/short with cpu ids when > walking things. I totally missed kinfo_proc. > > I'll go think about it a bit more. It shouldn't be too hard to to handle kinfo_proc. pf is another case. It might be nice to have a way to auto-compute the right number of bits to reserve based on MAXCPU. -- John Baldwin