From owner-freebsd-current Tue Jul 10 18:44:47 2001 Delivered-To: freebsd-current@freebsd.org Received: from rina.r.dl.itc.u-tokyo.ac.jp (cvsup2.r.dl.itc.u-tokyo.ac.jp [133.11.199.247]) by hub.freebsd.org (Postfix) with ESMTP id 7F76537B403; Tue, 10 Jul 2001 18:44:43 -0700 (PDT) (envelope-from tanimura@r.dl.itc.u-tokyo.ac.jp) Received: from sohgo.carrots.uucp.r.dl.itc.u-tokyo.ac.jp (rashi [133.11.199.209]) by rina.r.dl.itc.u-tokyo.ac.jp (8.11.3+3.4W/3.7W-rina.r-20010412) with ESMTP id f6B1iQt45800 ; Wed, 11 Jul 2001 10:44:27 +0900 (JST) Received: from silver.carrots.uucp.r.dl.itc.u-tokyo.ac.jp (silver.carrots.uucp.r.dl.itc.u-tokyo.ac.jp [fec0::1:280:c8ff:fe6b:6d73]) by sohgo.carrots.uucp.r.dl.itc.u-tokyo.ac.jp (8.11.3+3.4W/3.7W) with ESMTP id f6B1iNf27222 ; Wed, 11 Jul 2001 10:44:23 +0900 (JST) Received: from silver.carrots.uucp.r.dl.itc.u-tokyo.ac.jp (localhost [127.0.0.1]) by silver.carrots.uucp.r.dl.itc.u-tokyo.ac.jp (8.11.3+3.4W/3.7W) with ESMTP id f6B1iL080250 ; Wed, 11 Jul 2001 10:44:22 +0900 (JST) Message-Id: <200107110144.f6B1iL080250@silver.carrots.uucp.r.dl.itc.u-tokyo.ac.jp> Date: Wed, 11 Jul 2001 10:44:21 +0900 From: Seigo Tanimura To: Alfred Perlstein Cc: Seigo Tanimura , jake@FreeBSD.org, jhb@FreeBSD.org, current@FreeBSD.org Subject: Re: Lock of struct filedesc, file, pgrp, session and sigio In-Reply-To: <20010709032044.B1894@sneakerz.org> References: <20010531124007.B57907@dragon.nuxi.com> <20010531130155.A58258@dragon.nuxi.com> <200106011228.f51CSvD46848@rina.r.dl.itc.u-tokyo.ac.jp> <20010602125223.J31257@dragon.nuxi.com> <200106040748.f547mUD53783@rina.r.dl.itc.u-tokyo.ac.jp> <200106181004.f5IA4VD63112@rina.r.dl.itc.u-tokyo.ac.jp> <200107020812.f628CfK44241@rina.r.dl.itc.u-tokyo.ac.jp> <20010707164249.C88962@sneakerz.org> <20010709032044.B1894@sneakerz.org> User-Agent: Wanderlust/2.4.1 (Stand By Me) SEMI/1.13.7 (Awazu) FLIM/1.13.2 (Kasanui) MULE XEmacs/21.1 (patch 14) (Cuyahoga Valley) (i386--freebsd) Organization: Digital Library Research Division, Information Techinology Centre, The University of Tokyo MIME-Version: 1.0 (generated by SEMI 1.13.7 - "Awazu") Content-Type: text/plain; charset=US-ASCII Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Mon, 9 Jul 2001 03:20:44 -0500, Alfred Perlstein said: Alfred> I'm also quite sure that you can't call the ktrace functions with Alfred> any mutexes held so the code is doing to need some help, basically Alfred> the trick in trapsig() and postsig() is to generate the ktrace Alfred> IO after the locks have been dropped, this means somehow caching Alfred> the info sent to ktrace where it's currently called, and calling Alfred> it later with the cached info after the locks are dropped. We can cache ktrace information into struct proc and mark the existence of cache in p_traceflag. Then we send the information to ktrace upon returning from trapsignal() or CURSIG(), or in sigexit(). Another problem I noticed is bogus unlock and lock around call of machine-and-maybe-executable-format-dependent sendsig(), found in sys/*/*/machdep.c. Instead of locking curproc in sendsig() once again, we should call sendsig() with curproc locked, and release the lock only in sendsig(). -- Seigo Tanimura To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message