Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 17 Jan 2000 11:01:53 -0500 (EST)
From:      Brian Fundakowski Feldman <green@FreeBSD.org>
To:        Bruce Evans <bde@zeta.org.au>
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.10001171055290.61172-100000@green.dyndns.org>
In-Reply-To: <Pine.BSF.4.10.10001171937560.14174-100000@alphplex.bde.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 17 Jan 2000, Bruce Evans wrote:

> > 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.

Nuts! :)

> > @@ -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.

Hm.  I would think that the intuitive thing is them being initialized
to reasonable values on a fork.  I must not be very intuitive *g*

> 
> 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.

I wasn't even aware of differences in language like that between files.
Maybe I'm too used to there being no sentence structure :)

Thank you, though!  I now understand the idea of header theory a bit
better.

> 
> Bruce
> 
> 

-- 
 Brian Fundakowski Feldman           \  FreeBSD: The Power to Serve!  /
 green@FreeBSD.org                    `------------------------------'



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.10001171055290.61172-100000>