Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 17 Jan 2000 19:49:17 +1100 (EST)
From:      Bruce Evans <bde@zeta.org.au>
To:        Brian Fundakowski Feldman <green@FreeBSD.org>
Cc:        Stephen McKay <syssgm@detir.qld.gov.au>, freebsd-current@FreeBSD.org, dt@FreeBSD.org
Subject:   Re: Crash from ^T during heavy paging
Message-ID:  <Pine.BSF.4.10.10001171937560.14174-100000@alphplex.bde.org>
In-Reply-To: <Pine.BSF.4.10.10001170210040.1592-100000@green.dyndns.org>

next in thread | previous in thread | raw e-mail | index | archive | help
> Using the magic of :%s:p_stats->p_\([usi]\)\(u[^a-zA-Z_0-9]\):p_\1\2:g,
> and just using vi to edit the headers too :), I submit the following to
> you for review.  I'll be testing it in its entirety tomorrow, but I'm
> already reasonably confident this is correct.  What do you think?

The substitution has a good chance of being correct if it sort of works
at all :-), except global substitions give style bugs when long lines
become shorter, etc.  About 2 lines are affected.

> Index: proc.h
> ===================================================================
> RCS file: /usr2/ncvs/src/sys/sys/proc.h,v
> retrieving revision 1.98
> diff -u -r1.98 proc.h
> --- proc.h	1999/12/29 04:24:45	1.98
> +++ proc.h	2000/01/17 06:57:17
> @@ -239,6 +239,9 @@
>  	struct proc *p_leader;
>  	struct	pasleep p_asleep;	/* Used by asleep()/await(). */
>  	void	*p_emuldata;	/* process-specific emulator state data */
> +	u_int64_t p_uu;			/* previous user time (us) */
> +	u_int64_t p_su;			/* previous system time (us) */
> +	u_int64_t p_iu;			/* previous interrupt time (us) */
>  };
>  
>  #define	p_session	p_pgrp->pg_session

Bug: I think p_uu etc. are no longer initialized on fork.  They should be
in the zeroed section.  They should be next to p_runtime and p_uticks,
etc. for stylistic reasons.

Moving code gives style bugs when the styles in different files are
different.  proc.h actually follows the rule about comments being filled
like English sentences, as in the p_asleep line, except in sloppy FreeBSD
additions like the p_emuldata line.  Don't fix this.  I already have.

Bruce



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" 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.10001171937560.14174-100000>