From owner-p4-projects Wed May 1 22: 0:23 2002 Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 8072B37B416; Wed, 1 May 2002 22:00:16 -0700 (PDT) Delivered-To: perforce@freebsd.org Received: from rwcrmhc51.attbi.com (rwcrmhc51.attbi.com [204.127.198.38]) by hub.freebsd.org (Postfix) with ESMTP id 9395337B404; Wed, 1 May 2002 22:00:15 -0700 (PDT) Received: from InterJet.elischer.org ([12.232.206.8]) by rwcrmhc51.attbi.com (InterMail vM.4.01.03.27 201-229-121-127-20010626) with ESMTP id <20020502050015.ILIU9799.rwcrmhc51.attbi.com@InterJet.elischer.org>; Thu, 2 May 2002 05:00:15 +0000 Received: from localhost (localhost.elischer.org [127.0.0.1]) by InterJet.elischer.org (8.9.1a/8.9.1) with ESMTP id VAA75413; Wed, 1 May 2002 21:46:36 -0700 (PDT) Date: Wed, 1 May 2002 21:46:35 -0700 (PDT) From: Julian Elischer To: Jonathan Mini Cc: Perforce Change Reviews Subject: Re: PERFORCE change 10648 for review In-Reply-To: <200205020438.g424coS78108@freefall.freebsd.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-p4-projects@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Jon.. My sugested next change: diff -reduction on fork() I ended up re-writing it too much I think.. take current fork.. take important ideas from my version.. blend to taste.. I think I spent too much time trying to optimise the locks (Hense the comment about not needing to lock p2 until it's findable by other threads (i.e. in some external structure/list)) Alternatively we could check in (to freeBSD) a rewritten fork() that tries to do that.. (defer the linking into external data structures until as late as possible, to avoid having to do any PROC_LOCK()s until then) As it is now, whenever jhb changes fork() it's merge-from hell.. thoughts? On Wed, 1 May 2002, Jonathan Mini wrote: > http://people.freebsd.org/~peter/p4db/chv.cgi?CH=10648 > > Change 10648 by mini@mini_stylus on 2002/05/01 21:38:26 > > Change to new names (SZBOM -> PRS_ZOMBIE, p_stat -> p_state) > > Affected files ... > > ... //depot/projects/kse/lib/libkvm/kvm_proc.c#11 edit > > Differences ... > > ==== //depot/projects/kse/lib/libkvm/kvm_proc.c#11 (text+ko) ==== > > @@ -329,7 +329,7 @@ > kp->ki_sflag = proc.p_sflag; > kp->ki_wchan = mainthread.td_wchan; /* XXXKSE */ > kp->ki_traceflag = proc.p_traceflag; > - kp->ki_stat = proc.p_stat; > + kp->ki_stat = proc.p_state; > kp->ki_pri.pri_class = proc.p_ksegrp.kg_pri_class; /* XXXKSE */ > kp->ki_pri.pri_user = proc.p_ksegrp.kg_user_pri; /* XXXKSE */ > kp->ki_pri.pri_level = mainthread.td_priority; /* XXXKSE */ > @@ -744,7 +744,7 @@ > if (sysctl(mib, 4, &newkp, &len, NULL, 0) == -1) > return (0); > return (curkp->ki_pid == newkp.ki_pid && > - (newkp.ki_stat != SZOMB || curkp->ki_stat == SZOMB)); > + (newkp.ki_stat != PRS_ZOMBIE || curkp->ki_stat == PRS_ZOMBIE)); > } > > static char ** > @@ -771,7 +771,7 @@ > /* > * Pointers are stored at the top of the user stack. > */ > - if (kp->ki_stat == SZOMB || > + if (kp->ki_stat == PRS_ZOMBIE || > kvm_uread(kd, kp, ps_strings, (char *)&arginfo, > sizeof(arginfo)) != sizeof(arginfo)) > return (0); > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe p4-projects" in the body of the message