From owner-freebsd-hackers Fri Dec 17 11:41:28 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from c62443-a.frmt1.sfba.home.com (c62443-a.frmt1.sfba.home.com [24.0.69.165]) by hub.freebsd.org (Postfix) with ESMTP id 605E0157B9 for ; Fri, 17 Dec 1999 11:41:16 -0800 (PST) (envelope-from adsharma@c62443-a.frmt1.sfba.home.com) Received: (from adsharma@localhost) by c62443-a.frmt1.sfba.home.com (8.9.3/8.9.3) id LAA25185; Fri, 17 Dec 1999 11:41:15 -0800 Date: Fri, 17 Dec 1999 11:41:15 -0800 From: Arun Sharma Message-Id: <199912171941.LAA25185@c62443-a.frmt1.sfba.home.com> To: hackers@freebsd.org Subject: Re: Per CPU timekeeping for SMP In-Reply-To: <19991205222423.A1391@sharmas.dhs.org> References: <19991205222423.A1391@sharmas.dhs.org> Reply-To: adsharma@sharmas.dhs.org.nospam Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Arun Sharma wrote: > > > Here's a reimplementation of my earlier per cpu time keeping patch > on SMP. The attached patch is against a 11/20/99 -current that I > cvsup'ed. Did anyone get a chance to review this ? Is everyone busy or sending patches to -hackers is frowned upon ? Or is this something that people aren't so excited about ? > 4. I've gotten sysctls working for sys_time - > > $ sysctl -A | grep kern.stats > kern.stats.systime.user: 25150 > kern.stats.systime.nice: 3878 > kern.stats.systime.sys: 14071 > kern.stats.systime.intr: 7395 > kern.stats.systime.idle: 5326029 > > I'm working on generating the per cpu sysctls. I've completed this work now. Here's the output of the new sysctl on my dual cpu box: $ sysctl -A | grep kern.stats kern.stats.systime.user: 13710 kern.stats.systime.nice: 552 kern.stats.systime.sys: 4296 kern.stats.systime.intr: 2602 kern.stats.systime.idle: 1878764 kern.stats.cpu.user.0: 7082 kern.stats.cpu.user.1: 7169 kern.stats.cpu.nice.0: 9 kern.stats.cpu.nice.1: 2 kern.stats.cpu.sys.0: 2120 kern.stats.cpu.sys.1: 2177 kern.stats.cpu.intr.0: 1309 kern.stats.cpu.intr.1: 1293 kern.stats.cpu.idle.0: 939407 kern.stats.cpu.idle.1: 939358 I have also figured out how to dynamically register sysctl nodes. The trick is to basically malloc a sysctl_oid and fill in the right fields and calling sysctl_register_oid. The code is in a kernel module available from: http://sharmas.dhs.org/~adsharma/projects/freebsd/sysctl.tar.gz It really needs to go into the base kernel. Also, I think sysctl_register_long and its yet to be written friends (register_int) etc, need to go into kern_sysctl - so that others can reuse the code to dynamically create sysctl nodes. I really don't want to spend my time on getting xosview and ktop to use these patches until I'm convinced that this code is going into the kernel. Again, the patches may not be perfect. But if people can review it I'll fix any issues. Also, Alpha guys need to make minor changes to keep things working. -Arun To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message