Subject: Re: CVS commit: src/sys
To: Tom Spindler <dogcow@babymeat.com>
From: David Laight <david@l8s.co.uk>
List: source-changes
Date: 05/01/2007 08:05:25
On Mon, Apr 30, 2007 at 06:13:29PM -0700, Tom Spindler wrote:
> > > Modified Files:
> > > 	src/sys/kern: init_sysctl.c kern_exit.c kern_proc.c
> > > 	src/sys/sys: proc.h
> > > 
> > > Log Message:
> > 
> > Remove proc->p_ru and the 'rusage' pool.
> > I think it existed to cache the numbers in kernel memory of a zombie when
> > proc->p_stats was part of the 'u' area - so got freed earlier and wouldn't
> > (easily) be accessible from a separate process.  However since both the
> > p_ru and p_stats fields are freed at the same time it is no longer needed.
> > Ride the recent 4.99.19 version change.
> 
> This breaks libkvm on ~all platforms:
> 
> CC=/home/dogcow/work/nbobj/tools/bin/i386--netbsdelf-gcc /home/dogcow/work/nbobj
> /tools/bin/i386--netbsdelf-lint -chapbxzFS -w -d /home/dogcow/work/nbobj/dd/usr/
> include  -DLIBC_SCCS -I/home/dogcow/work/nbsrc/sys    -i /home/dogcow/work/nbsrc
> /lib/libkvm/kvm_proc.c
> /home/dogcow/work/nbsrc/lib/libkvm/kvm_proc.c(584): illegal member use: p_ru [10
> 2]

I've 'fixed' that.
 
> and on 64-bit platforms, generates these errors as well:
> 
> /home/dogcow/work/nbsrc/lib/libkvm/kvm_proc.c(331): warning: conversion from 'unsigned long' to 'unsigned int' may lose accuracy [132]
> /home/dogcow/work/nbsrc/lib/libkvm/kvm_proc.c(584): illegal member use: p_ru [102]
> /home/dogcow/work/nbsrc/lib/libkvm/kvm_proc.c(617): warning: conversion from 'long' to 'unsigned int' may lose accuracy [132]
> /home/dogcow/work/nbsrc/lib/libkvm/kvm_proc.c(618): warning: conversion from 'long' to 'unsigned int' may lose accuracy [132]

Those are from lines like:
    kp2p->p_rtime_sec = kp->kp_proc.p_rtime.tv_sec;
I've not been near that bit :-(

	David

-- 
David Laight: david@l8s.co.uk