From owner-freebsd-hackers Mon Jan 13 12:12: 6 2003 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5655E37B401 for ; Mon, 13 Jan 2003 12:12:04 -0800 (PST) Received: from mail.speakeasy.net (mail17.speakeasy.net [216.254.0.217]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9893343F13 for ; Mon, 13 Jan 2003 12:12:03 -0800 (PST) (envelope-from jhb@FreeBSD.org) Received: (qmail 14103 invoked from network); 13 Jan 2003 20:12:09 -0000 Received: from unknown (HELO server.baldwin.cx) ([216.27.160.63]) (envelope-sender ) by mail17.speakeasy.net (qmail-ldap-1.03) with DES-CBC3-SHA encrypted SMTP for ; 13 Jan 2003 20:12:09 -0000 Received: from laptop.baldwin.cx (gw1.twc.weather.com [216.133.140.1]) by server.baldwin.cx (8.12.6/8.12.6) with ESMTP id h0DKC0UT003544; Mon, 13 Jan 2003 15:12:01 -0500 (EST) (envelope-from jhb@FreeBSD.org) Message-ID: X-Mailer: XFMail 1.5.2 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: <200301132010.h0DKAawp030883@apollo.backplane.com> Date: Mon, 13 Jan 2003 15:12:11 -0500 (EST) From: John Baldwin To: Matthew Dillon Subject: Re: RE: possible cpu_wait() / vm_waitproc() / MAC problem Cc: hackers@FreeBSD.org, rwatson@FreeBSD.org Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On 13-Jan-2003 Matthew Dillon wrote: > >: >: >:On 12-Jan-2003 Matthew Dillon wrote: >:> While working on an MFC I noticed that sys/compat/svr4/svr4_misc.c >:> (in CURRENT) is calling cpu_wait() in svr4_sys_waitsys() instead of >:> vm_waitproc(). I believe it needs to call vm_waitproc(). Can anyone >:> say for sure? >:> >:> Also, in kern/kern_exit.c the wait code has this: >:> >:>#ifdef MAC >:> mac_destroy_proc(p) >:>#endif >:> >:> This appears to be missing from svr4_sys_waitsys() as well, also >:> in -current. Could someone confirm that? >: >:The svr4() wait code is just gross. We need to make it just pass a flag >:into wait1() IMO and have the svr4() implementation be a wrapper function. >: >:-- >: >:John Baldwin <>< http://www.FreeBSD.org/~jhb/ >:"Power Users Use the Power to Serve!" - http://www.FreeBSD.org/ > > Well, I would prefer to just fix the bug(s) for now, unless someone else > wants to have a go at merging it. I have major work on vmapbuf() and > friends that I need to do that I don't want to delay it too much longer. *nod* I've been meaning to merge the darn thing for a while now. > Does this patch look good? Sure. > -Matt > Matthew Dillon > > > Index: compat/svr4/svr4_misc.c > =================================================================== > RCS file: /home/ncvs/src/sys/compat/svr4/svr4_misc.c,v > retrieving revision 1.56 > diff -u -r1.56 svr4_misc.c > --- compat/svr4/svr4_misc.c 13 Jan 2003 00:28:57 -0000 1.56 > +++ compat/svr4/svr4_misc.c 13 Jan 2003 20:09:38 -0000 > @@ -1377,12 +1377,15 @@ > * to free anything that cpu_exit couldn't > * release while still running in process context. > */ > - cpu_wait(q); > + vm_waitproc(q); > #if defined(__NetBSD__) > pool_put(&proc_pool, q); > #endif > #ifdef __FreeBSD__ > mtx_destroy(&q->p_mtx); > +#ifdef MAC > + mac_destroy_proc(q); > +#endif > uma_zfree(proc_zone, q); > #endif > nprocs--; -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message