Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 10 Mar 1999 23:12:32 +1100
From:      Bruce Evans <bde@zeta.org.au>
To:        amagai@nue.org, bde@zeta.org.au, freebsd-bugs@FreeBSD.ORG
Subject:   Re: kern/10402: times(3) non-decreaseness broken in 4.0
Message-ID:  <199903101212.XAA20806@godzilla.zeta.org.au>

next in thread | raw e-mail | index | archive | help
>> Record the times returned by calcru() and adjust them on each call to
>
>Where do record the times?  In proc structure (with new slots)?

I think it belongs in the pstats struct.

>===
>How this, 
>	st = (u * st) / tot;
>	sp->tv_sec = st / 1000000;
>	sp->tv_usec = st % 1000000;
>
>will be
>
>	if (ip == NULL) {
>		st = (u * (st + it)) / tot;
>	} else {
>		st = (u * st) / tot;
>	}
>	sp->tv_sec = st / 1000000;
>	sp->tv_usec = st % 1000000;
>
>System mode will be include interrput handling time.

No, that's another family of problems (how to report interrupt time
without confusing applications that don't know about it).  Note that the
interrupt time can be determined using p->p_runtime and the rusage info
for existing processes (ps sort of does this), but there is insufficient
info to determine it for child processes (ps just gets it wrong).  I
think getrusage() should add the interrupt time to the system time
so that old applications show it, and there should be a new rusage
syscall that gives the interrupt time.  In any case, calcru() should
keep the interrupt time separate and let its callers decide what to do
with it.

Bruce


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199903101212.XAA20806>