From owner-freebsd-arch@FreeBSD.ORG Sun Dec 21 16:06:39 2003 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A98D916A4CE for ; Sun, 21 Dec 2003 16:06:39 -0800 (PST) Received: from ozlabs.org (ozlabs.org [203.10.76.45]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3EAE243D50 for ; Sun, 21 Dec 2003 16:06:38 -0800 (PST) (envelope-from grog@lemis.com) Received: from blackwater.lemis.com (blackwater.lemis.com [192.109.197.80]) by ozlabs.org (Postfix) with ESMTP id 54C7E2BD0F for ; Mon, 22 Dec 2003 11:06:36 +1100 (EST) Received: by blackwater.lemis.com (Postfix, from userid 1004) id 8536351206; Mon, 22 Dec 2003 10:37:18 +1030 (CST) Date: Mon, 22 Dec 2003 10:37:18 +1030 From: Greg 'groggy' Lehey To: arch@FreeBSD.org Message-ID: <20031222000718.GJ4438@wantadilla.lemis.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="g3RkK9jYN81zD2N+" Content-Disposition: inline User-Agent: Mutt/1.4.1i Organization: The FreeBSD Project Phone: +61-8-8388-8286 Fax: +61-8-8388-8725 Mobile: +61-418-838-708 WWW-Home-Page: http://www.FreeBSD.org/ X-PGP-Fingerprint: 9A1B 8202 BCCE B846 F92F 09AC 22E6 F290 507A 4223 Subject: /usr/src/tools hierarchy and Vinum X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Dec 2003 00:06:39 -0000 --g3RkK9jYN81zD2N+ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable I'm finally in the advanced stages of writing some tools for testing Vinum, and I'm wondering where to put them. To do so, I've taken a look at the top level directories: drwxr-xr-x 5 grog lemis 512 May 22 2003=20 KSE/ Seems to be specific tests for KSE. No comments. LibraryReport/ An undocumented TCL script build/ Not quite clear what this is for either debugscripts/ gdb scripts for kernel debugging diag/ diagnostic programs install.sh undocumented make_libdeps.sh undocumented regression/ regression test programs test/ normal test programs tools/ miscellaneous tools My problem is that most of the tests that I have written measure Vinum performance. In so doing, of course, they ensure that most of the subsystem is working. My current feeling is that I should split these tests into two directories: /usr/src/tools/test/vinum Test Vinum functionality /usr/src/tools/performance/vinum Test Vinum performance The test/vinum test would include performance/vinum for much of the functionality. Comments? Greg =20 -- See complete headers for address and phone numbers. --g3RkK9jYN81zD2N+ Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.0 (FreeBSD) iD8DBQE/5jW2IubykFB6QiMRAts0AKCPZuzeyJO6pMtQamBc0dmZAR0DiACfasMu Y5SfxA8x815BEAOW8uyxKf8= =WgWu -----END PGP SIGNATURE----- --g3RkK9jYN81zD2N+-- From owner-freebsd-arch@FreeBSD.ORG Mon Dec 22 05:55:12 2003 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AA84116A4CE; Mon, 22 Dec 2003 05:55:12 -0800 (PST) Received: from phantom.cris.net (phantom.cris.net [212.110.130.74]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4D96F43D5D; Mon, 22 Dec 2003 05:55:09 -0800 (PST) (envelope-from ru@FreeBSD.org.ua) Received: from phantom.cris.net (ru@localhost [127.0.0.1]) by phantom.cris.net (8.12.10/8.12.10) with ESMTP id hBMDt8l7095256; Mon, 22 Dec 2003 15:55:08 +0200 (EET) (envelope-from ru@FreeBSD.org.ua) Received: (from ru@localhost) by phantom.cris.net (8.12.10/8.12.10/Submit) id hBMDt85R095251; Mon, 22 Dec 2003 15:55:08 +0200 (EET) (envelope-from ru) Date: Mon, 22 Dec 2003 15:55:07 +0200 From: Ruslan Ermilov To: "Greg 'groggy' Lehey" Message-ID: <20031222135507.GA94660@FreeBSD.org.ua> References: <20031222000718.GJ4438@wantadilla.lemis.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="opJtzjQTFsWo+cga" Content-Disposition: inline In-Reply-To: <20031222000718.GJ4438@wantadilla.lemis.com> User-Agent: Mutt/1.5.5.1i cc: arch@freebsd.org Subject: Re: /usr/src/tools hierarchy and Vinum X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Dec 2003 13:55:12 -0000 --opJtzjQTFsWo+cga Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Dec 22, 2003 at 10:37:18AM +1030, Greg 'groggy' Lehey wrote: [...] > My problem is that most of the tests that I have written measure Vinum > performance. In so doing, of course, they ensure that most of the > subsystem is working. My current feeling is that I should split these > tests into two directories: >=20 > /usr/src/tools/test/vinum Test Vinum functionality > /usr/src/tools/performance/vinum Test Vinum performance >=20 > The test/vinum test would include performance/vinum for much of the > functionality. >=20 > Comments? >=20 src/tools/test/README gives the "definition" of a test program, which is "one that will exercise a particular bit of the system and try to break it and/or measuring performance on it." So the performance tests are explicitly allowed in tools/test/. Cheers, --=20 Ruslan Ermilov FreeBSD committer ru@FreeBSD.org --opJtzjQTFsWo+cga Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.3 (FreeBSD) iD8DBQE/5ve7Ukv4P6juNwoRAod1AJ9zpp7f4MCcphEwUQiqgqa21HLS3gCfawCG bkpXJylsW5h2k34pcReqRMs= =a1t8 -----END PGP SIGNATURE----- --opJtzjQTFsWo+cga-- From owner-freebsd-arch@FreeBSD.ORG Tue Dec 23 12:53:07 2003 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D2E7116A4CE for ; Tue, 23 Dec 2003 12:53:06 -0800 (PST) Received: from rootlabs.com (root.org [67.118.192.226]) by mx1.FreeBSD.org (Postfix) with SMTP id 0BDBC43D53 for ; Tue, 23 Dec 2003 12:53:03 -0800 (PST) (envelope-from nate@rootlabs.com) Received: (qmail 92460 invoked by uid 1000); 23 Dec 2003 20:53:03 -0000 Date: Tue, 23 Dec 2003 12:53:03 -0800 (PST) From: Nate Lawson To: John Baldwin In-Reply-To: Message-ID: <20031223125146.K92457@root.org> References: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: arch@freebsd.org cc: acpi-jp@jp.freebsd.org Subject: RE: acpi_toshiba and acpi_asus drivers X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Dec 2003 20:53:07 -0000 On Thu, 18 Dec 2003, John Baldwin wrote: > On 18-Dec-2003 Nate Lawson wrote: > > I'm prepping/reworking some user-submitted drivers for import. I'd like > > some comments on the directory structure. The hardware both drive is > > everything from fans to hotkeys to lcd backlight. Both are very > > hw-specific and do not conform to the ACPI spec although they do control > > their functions through ACPI. > > > > The directory structure I'm currently working with is: > > sys/i386/acpica/acpi_toshiba.c > > sys/i386/acpica/acpi_asus.c > > sys/modules/acpi_toshiba/Makefile > > sys/modules/acpi_asus/Makefile > > share/man/man4/acpi_toshiba.4 > > share/man/man4/acpi_asus.4 > > > > One alternative is to their modules under the acpi dir (e.g., > > sys/modules/acpi/acpi_toshiba). Also, the driver src could be > > sys/dev/acpi_toshiba. However, a new dir for just one file seems a bit > > much. My main concern is that as these drivers proliferate that we keep > > the dir structure neat. > > Having a /sys/modules/acpi with acpi, acpi_toshiba, and acpi_asus in > them is probably a good idea. Putting the files under sys/i386/acpica > is also probably ok. Should the manpages be in man4.i386 rather than > man4 though? Ok, this is what I'll be committing: sys/i386/acpica/acpi_toshiba.c sys/i386/acpica/acpi_asus.c sys/modules/acpi/acpi/Makefile sys/modules/acpi/acpi_toshiba/Makefile sys/modules/acpi/acpi_asus/Makefile share/man/man4.i386/acpi_toshiba.4 share/man/man4.i386/acpi_asus.4 -Nate From owner-freebsd-arch@FreeBSD.ORG Tue Dec 23 13:06:54 2003 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9937516A4CE for ; Tue, 23 Dec 2003 13:06:54 -0800 (PST) Received: from mail5.speakeasy.net (mail5.speakeasy.net [216.254.0.205]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2DAA143D2F for ; Tue, 23 Dec 2003 13:06:53 -0800 (PST) (envelope-from jhb@FreeBSD.org) Received: (qmail 27629 invoked from network); 23 Dec 2003 21:06:52 -0000 Received: from dsl027-160-063.atl1.dsl.speakeasy.net (HELO server.baldwin.cx) ([216.27.160.63]) (envelope-sender ) encrypted SMTP for ; 23 Dec 2003 21:06:52 -0000 Received: from laptop.baldwin.cx (gw1.twc.weather.com [216.133.140.1]) by server.baldwin.cx (8.12.10/8.12.10) with ESMTP id hBNL6nM0052488; Tue, 23 Dec 2003 16:06:49 -0500 (EST) (envelope-from jhb@FreeBSD.org) Message-ID: X-Mailer: XFMail 1.5.4 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: <20031223125146.K92457@root.org> Date: Tue, 23 Dec 2003 16:06:51 -0500 (EST) From: John Baldwin To: Nate Lawson X-Spam-Checker-Version: SpamAssassin 2.55 (1.174.2.19-2003-05-19-exp) cc: arch@freebsd.org cc: acpi-jp@jp.freebsd.org Subject: RE: acpi_toshiba and acpi_asus drivers X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Dec 2003 21:06:54 -0000 On 23-Dec-2003 Nate Lawson wrote: > On Thu, 18 Dec 2003, John Baldwin wrote: >> On 18-Dec-2003 Nate Lawson wrote: >> > I'm prepping/reworking some user-submitted drivers for import. I'd like >> > some comments on the directory structure. The hardware both drive is >> > everything from fans to hotkeys to lcd backlight. Both are very >> > hw-specific and do not conform to the ACPI spec although they do control >> > their functions through ACPI. >> > >> > The directory structure I'm currently working with is: >> > sys/i386/acpica/acpi_toshiba.c >> > sys/i386/acpica/acpi_asus.c >> > sys/modules/acpi_toshiba/Makefile >> > sys/modules/acpi_asus/Makefile >> > share/man/man4/acpi_toshiba.4 >> > share/man/man4/acpi_asus.4 >> > >> > One alternative is to their modules under the acpi dir (e.g., >> > sys/modules/acpi/acpi_toshiba). Also, the driver src could be >> > sys/dev/acpi_toshiba. However, a new dir for just one file seems a bit >> > much. My main concern is that as these drivers proliferate that we keep >> > the dir structure neat. >> >> Having a /sys/modules/acpi with acpi, acpi_toshiba, and acpi_asus in >> them is probably a good idea. Putting the files under sys/i386/acpica >> is also probably ok. Should the manpages be in man4.i386 rather than >> man4 though? > > Ok, this is what I'll be committing: > sys/i386/acpica/acpi_toshiba.c > sys/i386/acpica/acpi_asus.c > sys/modules/acpi/acpi/Makefile > sys/modules/acpi/acpi_toshiba/Makefile > sys/modules/acpi/acpi_asus/Makefile > share/man/man4.i386/acpi_toshiba.4 > share/man/man4.i386/acpi_asus.4 Sounds good to me, go for it. :) -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/ From owner-freebsd-arch@FreeBSD.ORG Sat Dec 27 04:12:34 2003 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id ACD7816A4CE for ; Sat, 27 Dec 2003 04:12:34 -0800 (PST) Received: from herring.nlsystems.com (mailgate.nlsystems.com [80.177.232.242]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0645243D41 for ; Sat, 27 Dec 2003 04:12:33 -0800 (PST) (envelope-from dfr@nlsystems.com) Received: from [10.0.0.2] (herring.nlsystems.com [10.0.0.2]) by herring.nlsystems.com (8.12.10/8.12.8) with ESMTP id hBRCCG3k047695 for ; Sat, 27 Dec 2003 12:12:21 GMT (envelope-from dfr@nlsystems.com) From: Doug Rabson To: arch@freebsd.org Content-Type: text/plain Message-Id: <1072527136.11617.17.camel@herring.nlsystems.com> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.5 Date: Sat, 27 Dec 2003 12:12:16 +0000 Content-Transfer-Encoding: 7bit X-Spam-Status: No, hits=0.0 required=5.0 tests=none autolearn=no version=2.60 X-Spam-Checker-Version: SpamAssassin 2.60 (1.212-2003-09-23-exp) on herring.nlsystems.com Subject: sigaltstack with threads X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Dec 2003 12:12:34 -0000 I've been using my festive spare time in porting the excellent valgrind error checker to FreeBSD. While working through the complex way that valgrind deals with signals, I noticed a tricky problem. When a signal stack is installed in FreeBSD, the stack location is recorded in the per-process state (p_sigstk to be exact). This stack is used in sendsig() for signals handlers which asked for SA_ONSTACK. This is a problem for valgrind since it uses two threads (I use the thr_* syscalls for this purpose). The main thread does most of the work and wants to take a selection of signals (SIGSEGV, SIGBUS etc) on a signal stack allocated for the purpose - all other signals are blocked. The other thread is used for executing blocking syscalls (actually there can be more than one of these for pthread programs but I don't have that working yet). This syscall thread runs with something like the debugged program's normal signal mask so most of those signals get routed to the syscall thread. The main problem is that the syscall thread wants to take the signals on its normal stack but it can't use a different setting for sigaltstack. It seems to me that sigaltstack needs to be per-thread state, not per-process state otherwise it is essentially useless for threaded programs. As far as I can make out, this is the behaviour for Linux threads created using their clone syscall. From owner-freebsd-arch@FreeBSD.ORG Sat Dec 27 06:56:40 2003 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 92C8716A4CE for ; Sat, 27 Dec 2003 06:56:40 -0800 (PST) Received: from mail.pcnet.com (mail.pcnet.com [204.213.232.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1680B43D4C for ; Sat, 27 Dec 2003 06:56:37 -0800 (PST) (envelope-from eischen@vigrid.com) Received: from mail.pcnet.com (mail.pcnet.com [204.213.232.4]) by mail.pcnet.com (8.12.10/8.12.1) with ESMTP id hBREuaiw000280; Sat, 27 Dec 2003 09:56:36 -0500 (EST) Date: Sat, 27 Dec 2003 09:56:36 -0500 (EST) From: Daniel Eischen X-Sender: eischen@pcnet5.pcnet.com To: Doug Rabson In-Reply-To: <1072527136.11617.17.camel@herring.nlsystems.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: arch@freebsd.org Subject: Re: sigaltstack with threads X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Dec 2003 14:56:40 -0000 On Sat, 27 Dec 2003, Doug Rabson wrote: > I've been using my festive spare time in porting the excellent valgrind > error checker to FreeBSD. While working through the complex way that > valgrind deals with signals, I noticed a tricky problem. > > When a signal stack is installed in FreeBSD, the stack location is > recorded in the per-process state (p_sigstk to be exact). This stack is > used in sendsig() for signals handlers which asked for SA_ONSTACK. This > is a problem for valgrind since it uses two threads (I use the thr_* > syscalls for this purpose). > > The main thread does most of the work and wants to take a selection of > signals (SIGSEGV, SIGBUS etc) on a signal stack allocated for the > purpose - all other signals are blocked. > > The other thread is used for executing blocking syscalls (actually there > can be more than one of these for pthread programs but I don't have that > working yet). This syscall thread runs with something like the debugged > program's normal signal mask so most of those signals get routed to the > syscall thread. The main problem is that the syscall thread wants to > take the signals on its normal stack but it can't use a different > setting for sigaltstack. > > It seems to me that sigaltstack needs to be per-thread state, not > per-process state otherwise it is essentially useless for threaded > programs. As far as I can make out, this is the behaviour for Linux > threads created using their clone syscall. In the '96 POSIX spec, using sigaltstack() in threaded applications was undefined. The new (SUSv3 200[123]?) POSIX spec allows this but says "Use of this function by library threads that are not bound to kernel-scheduled entities results in undefined behavior". I think that allows you to make it per-thread, but what behavior do we want when there are multiple threads in a KSE/KSEG? Should it be per KSE or KSEG? From owner-freebsd-arch@FreeBSD.ORG Sat Dec 27 07:06:08 2003 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5F8C016A4CE for ; Sat, 27 Dec 2003 07:06:08 -0800 (PST) Received: from herring.nlsystems.com (mailgate.nlsystems.com [80.177.232.242]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0D9F543D41 for ; Sat, 27 Dec 2003 07:06:05 -0800 (PST) (envelope-from dfr@nlsystems.com) Received: from [10.0.0.2] (herring.nlsystems.com [10.0.0.2]) hBRF5rwO005231; Sat, 27 Dec 2003 15:05:53 GMT (envelope-from dfr@nlsystems.com) From: Doug Rabson To: Daniel Eischen In-Reply-To: References: Content-Type: text/plain Message-Id: <1072537553.1143.19.camel@herring.nlsystems.com> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.5 Date: Sat, 27 Dec 2003 15:05:53 +0000 Content-Transfer-Encoding: 7bit X-Spam-Status: No, hits=0.0 required=5.0 tests=none autolearn=no version=2.60 X-Spam-Checker-Version: SpamAssassin 2.60 (1.212-2003-09-23-exp) on herring.nlsystems.com cc: arch@freebsd.org Subject: Re: sigaltstack with threads X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Dec 2003 15:06:08 -0000 On Sat, 2003-12-27 at 14:56, Daniel Eischen wrote: > On Sat, 27 Dec 2003, Doug Rabson wrote: > > > I've been using my festive spare time in porting the excellent valgrind > > error checker to FreeBSD. While working through the complex way that > > valgrind deals with signals, I noticed a tricky problem. > > > > When a signal stack is installed in FreeBSD, the stack location is > > recorded in the per-process state (p_sigstk to be exact). This stack is > > used in sendsig() for signals handlers which asked for SA_ONSTACK. This > > is a problem for valgrind since it uses two threads (I use the thr_* > > syscalls for this purpose). > > > > The main thread does most of the work and wants to take a selection of > > signals (SIGSEGV, SIGBUS etc) on a signal stack allocated for the > > purpose - all other signals are blocked. > > > > The other thread is used for executing blocking syscalls (actually there > > can be more than one of these for pthread programs but I don't have that > > working yet). This syscall thread runs with something like the debugged > > program's normal signal mask so most of those signals get routed to the > > syscall thread. The main problem is that the syscall thread wants to > > take the signals on its normal stack but it can't use a different > > setting for sigaltstack. > > > > It seems to me that sigaltstack needs to be per-thread state, not > > per-process state otherwise it is essentially useless for threaded > > programs. As far as I can make out, this is the behaviour for Linux > > threads created using their clone syscall. > > In the '96 POSIX spec, using sigaltstack() in threaded applications > was undefined. The new (SUSv3 200[123]?) POSIX spec allows this > but says "Use of this function by library threads that are not bound > to kernel-scheduled entities results in undefined behavior". I think > that allows you to make it per-thread, but what behavior do we > want when there are multiple threads in a KSE/KSEG? Should it be > per KSE or KSEG? I think that if its supported at all in threaded programs, it must be per-thread state otherwise you can't prevent two different threads colliding on the same signal stack. I can't quite see how this maps to KSE/KSEG since I only have the most hazy model of that stuff in my head right now. Anyway, I've worked around things by not setting SA_ONSTACK for the handlers that I want to run on the thread stack. From owner-freebsd-arch@FreeBSD.ORG Sat Dec 27 07:41:50 2003 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5F67916A4CE for ; Sat, 27 Dec 2003 07:41:50 -0800 (PST) Received: from mail.pcnet.com (mail.pcnet.com [204.213.232.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id A1C8243D41 for ; Sat, 27 Dec 2003 07:41:47 -0800 (PST) (envelope-from eischen@vigrid.com) Received: from mail.pcnet.com (mail.pcnet.com [204.213.232.4]) by mail.pcnet.com (8.12.10/8.12.1) with ESMTP id hBRFfliw009865; Sat, 27 Dec 2003 10:41:47 -0500 (EST) Date: Sat, 27 Dec 2003 10:41:47 -0500 (EST) From: Daniel Eischen X-Sender: eischen@pcnet5.pcnet.com To: Doug Rabson In-Reply-To: <1072537553.1143.19.camel@herring.nlsystems.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: arch@freebsd.org Subject: Re: sigaltstack with threads X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Dec 2003 15:41:50 -0000 On Sat, 27 Dec 2003, Doug Rabson wrote: > On Sat, 2003-12-27 at 14:56, Daniel Eischen wrote: > > > > In the '96 POSIX spec, using sigaltstack() in threaded applications > > was undefined. The new (SUSv3 200[123]?) POSIX spec allows this > > but says "Use of this function by library threads that are not bound > > to kernel-scheduled entities results in undefined behavior". I think > > that allows you to make it per-thread, but what behavior do we > > want when there are multiple threads in a KSE/KSEG? Should it be > > per KSE or KSEG? > > I think that if its supported at all in threaded programs, it must be > per-thread state otherwise you can't prevent two different threads > colliding on the same signal stack. The kernel doesn't know about userland threads. More than one userland thread can run in one kernel thread. And there will be more than one kernel thread (for a KSE process) when threads block in the kernel. So when sigaltstack() is called by a thread and that thread blocks in the kernel and there are other kernel threads created (so libkse's UTS can continue), what behavior do we want? Since libkse's UTS has it's own signal handler for threads not bound to a KSE/KSEG, it may have to get involved if we want to honor signal delivery with a sigaltstack() stack. POSIX does say this behavior is undefined, so we could just ignore it for this case. > I can't quite see how this maps to > KSE/KSEG since I only have the most hazy model of that stuff in my head > right now. > > Anyway, I've worked around things by not setting SA_ONSTACK for the > handlers that I want to run on the thread stack. From owner-freebsd-arch@FreeBSD.ORG Sat Dec 27 15:04:48 2003 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 30A3316A4CE; Sat, 27 Dec 2003 15:04:48 -0800 (PST) Received: from hotmail.com (bay9-f6.bay9.hotmail.com [64.4.47.6]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6824B43D2F; Sat, 27 Dec 2003 15:04:47 -0800 (PST) (envelope-from ganacharya_tanmay@hotmail.com) Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Sat, 27 Dec 2003 15:04:47 -0800 Received: from 66.229.166.54 by by9fd.bay9.hotmail.msn.com with HTTP; Sat, 27 Dec 2003 23:04:47 GMT X-Originating-IP: [66.229.166.54] X-Originating-Email: [ganacharya_tanmay@hotmail.com] X-Sender: ganacharya_tanmay@hotmail.com From: "Tanmay Ganacharya" To: freebsd-config@freebsd.org, freebsd-arch@freebsd.org, freebsd-binup@freebsd.org, freebsd-net@freebsd.org, freebsd-questions@freebsd.org Date: Sun, 28 Dec 2003 04:34:47 +0530 Mime-Version: 1.0 Content-Type: text/plain; format=flowed Message-ID: X-OriginalArrivalTime: 27 Dec 2003 23:04:47.0320 (UTC) FILETIME=[D2C82580:01C3CCCD] Subject: Recording RTT and RTO values X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Dec 2003 23:04:48 -0000 Hello, I am currently using FreeBSD 4.8. I am want to record RTT and RTO values of a tcp connection. Could anyone please tell me which variables in which files hold the current RTT and RTO values. Once known I can put printfs and print these values. Also if there is any other easier way of finding these values please do let me know. Thanks in advance, Regards, Tanmay Ganacharya _________________________________________________________________ Cricket crazy? Catch the latest action. http://server1.msn.co.in/sp03/gprs/ Now on your mobile! From owner-freebsd-arch@FreeBSD.ORG Sat Dec 27 15:15:49 2003 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AD2E616A4CE; Sat, 27 Dec 2003 15:15:49 -0800 (PST) Received: from liberteks.com (rrcs-nys-24-105-169-74.biz.rr.com [24.105.169.74]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0557A43D49; Sat, 27 Dec 2003 15:15:47 -0800 (PST) (envelope-from owner-freebsd-config@freebsd.org) Received: from mail pickup service by liberteks.com with Microsoft SMTPSVC; Sat, 27 Dec 2003 18:16:02 -0500 thread-index: AcPMz2UnISbLjZKDQmqoK0tk7dBtvQ== Delivered-To: freebsd-config@freebsd.org X-Originating-IP: [66.229.166.54] X-Originating-Email: [ganacharya_tanmay@hotmail.com] From: "Tanmay Ganacharya" Message-ID: <000101c3cccf$6527a760$3401a8c0@Libertekscom.local> To: , , , , , "IMB Recipient 1" Content-Transfer-Encoding: 7bit Date: Sat, 27 Dec 2003 18:16:02 -0500 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1" X-OriginalArrivalTime: 27 Dec 2003 23:04:47.0320 (UTC)FILETIME=[D2C82580:01C3CCCD] X-Mailer: Microsoft CDO for Exchange 2000 X-BeenThere: freebsd-config@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Content-Class: urn:content-classes:message Importance: normal Priority: normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0 Sender: Errors-To: owner-freebsd-config@freebsd.org Subject: Recording RTT and RTO values X-BeenThere: freebsd-arch@freebsd.org List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Dec 2003 23:15:50 -0000 Hello, I am currently using FreeBSD 4.8. I am want to record RTT and RTO values of a tcp connection. Could anyone please tell me which variables in which files hold the current RTT and RTO values. Once known I can put printfs and print these values. Also if there is any other easier way of finding these values please do let me know. Thanks in advance, Regards, Tanmay Ganacharya _________________________________________________________________ Cricket crazy? Catch the latest action. http://server1.msn.co.in/sp03/gprs/ Now on your mobile! _______________________________________________ freebsd-config@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-config To unsubscribe, send any mail to "freebsd-config-unsubscribe@freebsd.org"