Date: Wed, 13 Oct 1999 01:36:04 -0700 (PDT) From: Mike Meyer <mwm@phone.net> To: freebsd-smp@FreeBSD.ORG Subject: Re: Kernel + xosview patch for cp_time Message-ID: <Pine.BSF.4.10.9910130019060.53121-100000@guru.phone.net> In-Reply-To: <19991012231026.A31302@home.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 12 Oct 1999, Arun Sharma wrote: ;->On Wed, Sep 01, 1999 at 10:36:07PM -0700, Arun Sharma wrote: ;->> Here's a minor patch to make the kernel keep track of per CPU times and ;->> another patch to help xosview take advantage of that. ;-> ;->I didn't receive any feedback on this mail. Did anyone with commit ;->privs look at this (the kernel part) ? I don't have commit privs, but I did install them. It caused programs that weren't aware of the changes - vmstat, iostat, top, and probably others - to report bogus numbers. I'm suspect they were the values for the first cpu, but they could have been gibberish. These need to be fixed. One possibility is having the kernel track totals using an extra "cpu 0" slot in the array (it should be possible to make this work so that unfixed programs get correct data). This involves counting every tick twice, though - and we're already increasing the address arithmetic to keep these stats for multiple cpus. A second is to make every program smp aware, and have them figure the totals themselves. That seems to be just plain ugly. My inclination is to 1) Make sure that programs grabbing one cpu from cp_time get the first cpu. This would also mean that the counting code doesn't need to depend on whether or not the system is smp. 2) Add "cpustat" to kernfs. The first line is system totals. smp systems then provide one line per cpu with the same information. 3) Fix everything to use that. Old applications will get correct information on up systems, and the first cpu on smp systems. Updated applications will work properly whether they want single or multiple cpu information on either system. What to do if /kern can't be reached is up to the application in question, ranging from punting to doing everything by hand. <mike To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-smp" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.10.9910130019060.53121-100000>