From owner-p4-projects Sat Sep 7 16:30:31 2002 Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id BB8BA37B406; Sat, 7 Sep 2002 16:30:17 -0700 (PDT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3622237B400; Sat, 7 Sep 2002 16:30:17 -0700 (PDT) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id AA1AB43E3B; Sat, 7 Sep 2002 16:30:16 -0700 (PDT) (envelope-from baka@elvis.mu.org) Received: by elvis.mu.org (Postfix, from userid 1921) id 7E71FAE165; Sat, 7 Sep 2002 16:30:16 -0700 (PDT) Date: Sat, 7 Sep 2002 16:30:16 -0700 From: Jon Mini Cc: Julian Elischer , Perforce Change Reviews Subject: Re: PERFORCE change 17195 for review Message-ID: <20020907233016.GU7265@elvis.mu.org> References: <20020907220528.GQ7265@elvis.mu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4i 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 No, you are totally right. On one field, I was confusing kses with threads, and on the other field, I was just smoking crack. The scary thing is that code actually worked on my machine. Oh, well. Please ignore my previous outburst. Julian Elischer [julian@elischer.org] wrote : > Copying them is definitly wrong. > the 'current KSE' field CAN NOT be set at that time > It must ONLY be set when a KSE as assigned to a thread. > until then it MUST BE NULL. (I depend on that) > > The thread mailbox address must ONLY be pointed to by the > thread to which it belongs. I also plan to put in KASSERTS > on this for certain cases, one of which blew up wit this change. > Only one thread can point to a particlar thread mailbox. > therefore on creation of a new thread that filed must be zero'd. > > > > On Sat, 7 Sep 2002, Jon Mini wrote: > > > Julian Elischer [julian@FreeBSD.org] wrote : > > > > > http://people.freebsd.org/~peter/p4db/chv.cgi?CH=17195 > > > > > > Change 17195 by julian@julian_desk on 2002/09/07 05:46:14 > > > > > > undo previous undo.. these fiedls are DEFINITLY not to be copied > > > but should be zero'd > > > > > > Julian, please do not revert my work without asking me first. > > I did not originally place those fields in those sections by accident.. > > > > > > These fields needs to be copied in order for thread_schedule_upcall() > > to work. Either we need to copy them in the bcopy, or do it manually. > > It does not make sense to COPY those fields If you think you need to > copy them then by definition you have mis-understood something! > > let's try 'talk' :-) (on freefall) > maybe we can figure out where the disconnect is.... > > > > > The changes you've made cause upcalls to panic the system. > > > > I don't want to get into a commit war, please let me change them > > to something that works. > > > > > Affected files ... > > > > > > .. //depot/projects/kse/sys/sys/proc.h#130 edit > > > > > > Differences ... > > > > > > ==== //depot/projects/kse/sys/sys/proc.h#130 (text+ko) ==== > > > > > > @@ -269,6 +269,7 @@ > > > #define td_startzero td_flags > > > int td_flags; /* (j) TDF_* flags. */ > > > struct kse *td_last_kse; /* Where it wants to be if possible. */ > > > + struct kse *td_kse; /* Current KSE if running. */ > > > int td_dupfd; /* (k) Ret value from fdopen. XXX */ > > > void *td_wchan; /* (j) Sleep address. */ > > > const char *td_wmesg; /* (j) Reason for sleep. */ > > > @@ -282,16 +283,15 @@ > > > LIST_HEAD(, mtx) td_contested; /* (j) Contested locks. */ > > > struct lock_list_entry *td_sleeplocks; /* (k) Held sleep locks. */ > > > int td_intr_nesting_level; /* (k) Interrupt recursion. */ > > > + struct thread_mailbox *td_mailbox; /* the userland mailbox address */ > > > struct ucred *td_ucred; /* (k) Reference to credentials. */ > > > void (*td_switchin)(void); /* (k) switchin special func */ > > > u_int td_critnest; /* (k) Critical section nest level. */ > > > -#define td_endzero td_kse > > > +#define td_endzero td_md > > > > > > /* Copied during fork1() or thread_sched_upcall() */ > > > -#define td_startcopy td_kse > > > +#define td_startcopy td_endzero > > > /* XXXKSE just copying td_md needs checking! */ > > > - struct kse *td_kse; /* Current KSE if running. */ > > > - struct thread_mailbox *td_mailbox; /* the userland mailbox address */ > > > struct mdthread td_md; /* (k) Any machine-dependent fields. */ > > > u_char td_base_pri; /* (j) Thread base kernel priority. */ > > > u_char td_priority; /* (j) Thread active priority. */ > > > > -- > > Jonathan Mini > > http://www.freebsd.org/ > > > -- Jonathan Mini http://www.freebsd.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe p4-projects" in the body of the message