From owner-freebsd-arch Sun Dec 8 9:19:16 2002 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 4DEFA37B401 for ; Sun, 8 Dec 2002 09:19:12 -0800 (PST) Received: from heechee.tobez.org (heechee.tobez.org [213.237.10.254]) by mx1.FreeBSD.org (Postfix) with ESMTP id C19DD43ED8 for ; Sun, 8 Dec 2002 09:19:05 -0800 (PST) (envelope-from tobez@tobez.org) Received: by heechee.tobez.org (Postfix, from userid 1001) id 3FCADA922; Sun, 8 Dec 2002 18:18:47 +0100 (CET) Date: Sun, 8 Dec 2002 18:18:47 +0100 From: Anton Berezin To: alan Cc: arch@FreeBSD.org Subject: SA_NOCLDWAIT and waitXXX strangeties (Was: Re: ports/45972: Perl system() calls will hang if the process has other forked children.) Message-ID: <20021208171847.GE35282@heechee.tobez.org> References: <200212041830.gB4IU2Mi007843@freefall.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200212041830.gB4IU2Mi007843@freefall.freebsd.org> User-Agent: Mutt/1.5.1i Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Alan, On Wed, Dec 04, 2002 at 10:30:02AM -0800, alan wrote: > The problem is, when you set SA_NOCLDWAIT, subsequent calls to wait() > (or wait4()) wait for All child processes to exit, not just the > process ID that wait() is called on. Since Perl's system() calls > wait4() on its recently forked child, the system() call doesn't return > until All of the perl process's children exit. This doesn't seem like > particularly desirable behavior, but it is documented in FreeBSD's > sigaction man page: > > SA_NOCLDWAIT If this bit is set when calling sigaction() for the > SIGCHLD signal, the system will not create zombie > processes when children of the calling process > exit. If the calling process subsequently issues a > wait(2) (or equivalent), it blocks until all of the > calling process's child processes terminate, and > then returns a value of -1 with errno set to > ECHILD. I don't like this behavior. Personally, I would like to think that it should not wait for all children if any of the waitXXX() explicitly specifies a pid to wait for. Obviously, there is a difference between how I would like to interpret the docs and the reality. :-/ So in this particular instance it looks to me like a bug (or at least, a gray area) in FreeBSD, which should be discussed, hence the copy to arch-. (The complete description of the problem, for the benefits of arch- folks, can be found here: http://www.freebsd.org/cgi/query-pr.cgi?pr=45972) > The quick fix is to stop using SA_NOCLDWAIT when it ignores SIGCHLD. > This may create unwanted zombie processes, though. Why would it? IIRC, the BSD semantics for SIG_IGN for SIGCHLD is exactly `do not create zombies' semantics, so the combination of a perl program setting SIG_IGN for SIGCHLD and perl itself setting SA_NOCLDWAIT at the same time looks like an attempt to do the same thing twice. But, regardless of whether this behavior of perl is a bug or not, I would still like to hear our signal handling experts on the issue. > The better fix is probably not to wait() at all if SIGCHLD is > currently being ignored with SA_NOCLDWAIT. One has to waitXXX() in order to implement a system(3)-like call. FreeBSD's own system(3) does wait4(), just like perl's system() does. > Below is C code which compiles and runs on FreeBSD using gcc, and > which demonstrates the difference in behavior when SA_NOCLDWAIT is > used and is not used. I would like confirmation that this Is in fact > the expected behavior of FreeBSD, and that in this case Perl is making > incorrect assumptions about how FreeBSD will behave. Exactly. Once you have identified the problem (thanks!), it is easy to fix perl. The question is that maybe FreeBSD also need fixing. > Thanks, > > Alan Ferrency > pair Networks > alan@pair.com > > > > #include > #include > #include > #include > #include > > int main (void) { > int chld, stat; > struct sigaction act; > > act.sa_handler = SIG_IGN; > sigemptyset(&act.sa_mask); > act.sa_flags = 0; > > sigaction(SIGCHLD, &act, 0); > printf("fork 1: no one will wait for me.\n"); > if (!fork()) { > sleep(120); > printf(" Fork 1 exiting\n"); > exit(0); > } > > printf("fork 2\n"); > if (chld = fork()) { > printf(" Parent: waiting for fork 2 to exit\n"); > wait4(chld, &stat, 0, 0) == -1 && errno == EINTR; > } else { /* child process */ > sleep(1); > printf(" fork 2 exiting\n"); > exit(0); > } > printf(" Parent done with fork 2.\n"); > > > act.sa_handler = SIG_IGN; > sigemptyset(&act.sa_mask); > act.sa_flags = SA_NOCLDWAIT; > sigaction(SIGCHLD, &act, 0); > > printf("fork 3\n"); > if (chld = fork()) { > printf(" Parent: waiting for fork 3 to exit\n"); > wait4(chld, &stat, 0, 0) == -1 && errno == EINTR; > } else { /* child process */ > sleep(1); > printf(" Fork 3 exiting\n"); > exit(0); > } > printf(" Parent done with fork 3.\n"); > > printf("done\n"); > > return 0; > } Cheers, =Anton. -- | Anton Berezin | FreeBSD: The power to serve | | catpipe Systems ApS _ _ |_ | http://www.FreeBSD.org | | tobez@catpipe.net (_(_|| | tobez@FreeBSD.org | | +45 7021 0050 | Private: tobez@tobez.org | To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message From owner-freebsd-arch Mon Dec 9 6:55: 2 2002 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 6DA6237B448 for ; Mon, 9 Dec 2002 06:54:59 -0800 (PST) Received: from smx.pair.com (smx.pair.com [209.68.1.56]) by mx1.FreeBSD.org (Postfix) with SMTP id BBB1343EFF for ; Mon, 9 Dec 2002 06:54:56 -0800 (PST) (envelope-from alan@pair.com) Received: (qmail 19321 invoked by uid 1037); 9 Dec 2002 14:54:54 -0000 Received: from localhost (sendmail-bs@127.0.0.1) by localhost with SMTP; 9 Dec 2002 14:54:54 -0000 Date: Mon, 9 Dec 2002 09:54:54 -0500 (EST) From: alan To: Anton Berezin Cc: Subject: Re: SA_NOCLDWAIT and waitXXX strangeties (Was: Re: ports/45972: Perl system() calls will hang if the process has other forked children.) In-Reply-To: <20021208171847.GE35282@heechee.tobez.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Sun, 8 Dec 2002, Anton Berezin wrote: > Alan, > > On Wed, Dec 04, 2002 at 10:30:02AM -0800, alan wrote: > > > The problem is, when you set SA_NOCLDWAIT, subsequent calls to > > wait() (or wait4()) wait for All child processes to exit, not > > just the process ID that wait() is called on. Since Perl's > > system() calls wait4() on its recently forked child, the system() > > call doesn't return until All of the perl process's children > > exit. This doesn't seem like particularly desirable behavior, > > but it is documented in FreeBSD's sigaction man page: > > > > SA_NOCLDWAIT If this bit is set when calling > > sigaction() for the SIGCHLD signal, the system will > > not create zombie processes when children of the > > calling process exit. If the calling process > > subsequently issues a wait(2) (or equivalent), it > > blocks until all of the calling process's child > > processes terminate, and then returns a value of -1 > > with errno set to ECHILD. > > I don't like this behavior. Personally, I would like to think that it > should not wait for all children if any of the waitXXX() explicitly > specifies a pid to wait for. Obviously, there is a difference between > how I would like to interpret the docs and the reality. :-/ So in this > particular instance it looks to me like a bug (or at least, a gray area) > in FreeBSD, which should be discussed, hence the copy to arch-. I agree with all of this. For what it's worth, OS X has the same problem (not surprisingly). The OpenBSD docs for SA_NOCLDWAIT are the same as those for FreeBSD, but I don't have an OpenBSD installation handy to test their interpretation of this gray area. > (The complete description of the problem, for the benefits of arch- > folks, can be found here: > http://www.freebsd.org/cgi/query-pr.cgi?pr=45972) > > > The quick fix is to stop using SA_NOCLDWAIT when it ignores SIGCHLD. > > This may create unwanted zombie processes, though. > > Why would it? IIRC, the BSD semantics for SIG_IGN for SIGCHLD is > exactly `do not create zombies' semantics, so the combination of a perl > program setting SIG_IGN for SIGCHLD and perl itself setting SA_NOCLDWAIT > at the same time looks like an attempt to do the same thing twice. But, > regardless of whether this behavior of perl is a bug or not, I would > still like to hear our signal handling experts on the issue. I may have erroneously interpreted the SA_NOCLDWAIT documentation to imply that if SA_NOCLDWAIT was not set, then zombie processes Would be created. I will try tweaking the SA_NOCLDWAIT out of Perl and seeing what happens. I can only imagine that the SA_NOCLDWAIT code was added to Perl for a reason; so maybe there's Some platform where it is a necessary part of avoiding zombies, even though it's redundant in FreeBSD. > > The better fix is probably not to wait() at all if SIGCHLD is > > currently being ignored with SA_NOCLDWAIT. > > One has to waitXXX() in order to implement a system(3)-like call. > FreeBSD's own system(3) does wait4(), just like perl's system() does. I realized later that this wasn't possible for implementing a synchronous system() call. I wrote a patch for Perl 5.8.0 which has Perl's 'system' temporarily block SIGCHLD and remove the SA_NOCLDWAIT flag if SIGCHLD is being ignored while it calls wait4() on its child. This fixes the symptom in Perl's system, but doesn't help any other case in Perl where SIGCHLD is ignored and then you call wait(). Now that you've said that SA_NOCLDWAIT may not be necessary at all, I'm fairly sure it's not the right solution in any case. > > Below is C code which compiles and runs on FreeBSD using gcc, and > > which demonstrates the difference in behavior when SA_NOCLDWAIT is > > used and is not used. I would like confirmation that this Is in fact > > the expected behavior of FreeBSD, and that in this case Perl is making > > incorrect assumptions about how FreeBSD will behave. > > Exactly. Once you have identified the problem (thanks!), it is easy to > fix perl. The question is that maybe FreeBSD also need fixing. Thank you very much as well! As Andrew Hunt and David Thomas say in "The Pragmatic Programmer:" Tip 26: Select Isn't Broken. As a Perl programmer it's very hard to convince myself that something is Actually wrong with either Perl or the OS. I'm glad that once I was able to convince myself of this, it was easier to convince someone who could do something about it :) Alan To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message From owner-freebsd-arch Mon Dec 9 8:53: 1 2002 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 7A60B37B401 for ; Mon, 9 Dec 2002 08:53:00 -0800 (PST) Received: from harmony.village.org (rover.bsdimp.com [204.144.255.66]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4FF4543F80 for ; Mon, 9 Dec 2002 08:52:59 -0800 (PST) (envelope-from imp@bsdimp.com) Received: from localhost (warner@rover2.village.org [10.0.0.1]) by harmony.village.org (8.12.6/8.12.3) with ESMTP id gB9GqtuB056463 for ; Mon, 9 Dec 2002 09:52:55 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Mon, 09 Dec 2002 09:50:32 -0700 (MST) Message-Id: <20021209.095032.102181079.imp@bsdimp.com> To: arch@freebsd.org Subject: le??toh, etc in userland From: "M. Warner Losh" X-Mailer: Mew version 2.1 on Emacs 21.2 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG We should provide an implementation of {b,l}e{16,32}toh and hto{b,l}e{16,32} in libc. Any objections? Warner To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message From owner-freebsd-arch Mon Dec 9 9: 5:48 2002 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 5B69537B401 for ; Mon, 9 Dec 2002 09:05:47 -0800 (PST) Received: from xorpc.icir.org (xorpc.icir.org [192.150.187.68]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0864D43EBE for ; Mon, 9 Dec 2002 09:05:47 -0800 (PST) (envelope-from rizzo@xorpc.icir.org) Received: from xorpc.icir.org (localhost [127.0.0.1]) by xorpc.icir.org (8.12.3/8.12.3) with ESMTP id gB9H5NTO088087; Mon, 9 Dec 2002 09:05:23 -0800 (PST) (envelope-from rizzo@xorpc.icir.org) Received: (from rizzo@localhost) by xorpc.icir.org (8.12.3/8.12.3/Submit) id gB9H5NPL088086; Mon, 9 Dec 2002 09:05:23 -0800 (PST) (envelope-from rizzo) Date: Mon, 9 Dec 2002 09:05:23 -0800 From: Luigi Rizzo To: "M. Warner Losh" Cc: arch@FreeBSD.ORG Subject: Re: le??toh, etc in userland Message-ID: <20021209090523.A75689@xorpc.icir.org> References: <20021209.095032.102181079.imp@bsdimp.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <20021209.095032.102181079.imp@bsdimp.com>; from imp@bsdimp.com on Mon, Dec 09, 2002 at 09:50:32AM -0700 Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Mon, Dec 09, 2002 at 09:50:32AM -0700, M. Warner Losh wrote: > We should provide an implementation of {b,l}e{16,32}toh and > hto{b,l}e{16,32} in libc. Any objections? I have one on the names. Historical functions (htonl(), ntohs() and friend) put the operand size at the end, and this to me makes sense because the size refers to both operands. The names you propose link the size to the {b,l}e operand only. Does it mean that we have the following interfaces ? int be16toh(u_int16_t) int le16toh(u_int16_t) int be32toh(u_int32_t) int le32toh(u_int32_t) u_int16_t htobe16(int) u_int16_t htole16(int) u_int32_t htobe32(int) u_int32_t htole32(int) (i.e. the host side has the same type) ? I remember last time we discussed the issue on the kernel you said that it was too late to change, but if we don't have such APIs in userland, then we could at least use a more consistent naming scheme. cheers luigi To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message From owner-freebsd-arch Mon Dec 9 9:22:36 2002 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 7ACE337B401 for ; Mon, 9 Dec 2002 09:22:34 -0800 (PST) Received: from harmony.village.org (rover.bsdimp.com [204.144.255.66]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9E77843EA9 for ; Mon, 9 Dec 2002 09:22:33 -0800 (PST) (envelope-from imp@bsdimp.com) Received: from localhost (warner@rover2.village.org [10.0.0.1]) by harmony.village.org (8.12.6/8.12.3) with ESMTP id gB9HMWuB056591; Mon, 9 Dec 2002 10:22:32 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Mon, 09 Dec 2002 10:20:10 -0700 (MST) Message-Id: <20021209.102010.127953437.imp@bsdimp.com> To: rizzo@icir.org Cc: arch@FreeBSD.ORG Subject: Re: le??toh, etc in userland From: "M. Warner Losh" In-Reply-To: <20021209090523.A75689@xorpc.icir.org> References: <20021209.095032.102181079.imp@bsdimp.com> <20021209090523.A75689@xorpc.icir.org> X-Mailer: Mew version 2.1 on Emacs 21.2 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG In message: <20021209090523.A75689@xorpc.icir.org> Luigi Rizzo writes: : On Mon, Dec 09, 2002 at 09:50:32AM -0700, M. Warner Losh wrote: : > We should provide an implementation of {b,l}e{16,32}toh and : > hto{b,l}e{16,32} in libc. Any objections? : : I have one on the names. : : Historical functions (htonl(), ntohs() and friend) put the operand : size at the end, and this to me makes sense because the size refers : to both operands. : The names you propose link the size to the {b,l}e operand only. : Does it mean that we have the following interfaces ? : : int be16toh(u_int16_t) int le16toh(u_int16_t) : int be32toh(u_int32_t) int le32toh(u_int32_t) : u_int16_t htobe16(int) u_int16_t htole16(int) : u_int32_t htobe32(int) u_int32_t htole32(int) : : (i.e. the host side has the same type) ? Not quite. The proper prototypes are: uint16_t be16toh(uint16_t) uint16_t le16toh(uint16_t) uint32_t be32toh(uint32_t) uint32_t le32toh(uint32_t) uint64_t be64toh(uint64_t) uint64_t le64toh(uint64_t) uint16_t htobe16(uint16_t) uint16_t htole16(uint16_t) uint32_t htobe32(uint32_t) uint32_t htole32(uint32_t) uint64_t htobe64(uint64_t) uint64_t htole64(uint64_t) These macros are strictly for swapping the bytes from a certain endian to the host's endian, without changing the type. : I remember last time we discussed the issue on the kernel you said : that it was too late to change, but if we don't have such APIs in : userland, then we could at least use a more consistent naming scheme. I'm saying that we provide the __bswap{16,32} functions. I've since discovered that we need to do the 64 bit version too. I'm open to revisiting the name issue, but only to the extent of providing both names. Since I'm sharing code with NetBSD right now, and we've already done a release with the NetBSD names, there's no way I'd support killing the NetBSD names. Also, I need these functions to support building NetBSD on FreeBSD (we're a lot closer than we were the last time I tried this). Also, I shouldn't have send the mail as soon as I did, because at least on i386 the __bswap* functions are defined inline and there was a different reason why I missed it. Warner To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message From owner-freebsd-arch Mon Dec 9 10:22:38 2002 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 67D1537B401 for ; Mon, 9 Dec 2002 10:22:37 -0800 (PST) Received: from critter.freebsd.dk (critter.freebsd.dk [212.242.86.163]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3662F43EBE for ; Mon, 9 Dec 2002 10:22:36 -0800 (PST) (envelope-from phk@critter.freebsd.dk) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.12.6/8.12.6) with ESMTP id gB9IMH3p074123; Mon, 9 Dec 2002 19:22:23 +0100 (CET) (envelope-from phk@critter.freebsd.dk) To: "M. Warner Losh" Cc: arch@FreeBSD.ORG Subject: Re: le??toh, etc in userland From: phk@FreeBSD.ORG In-Reply-To: Your message of "Mon, 09 Dec 2002 09:50:32 MST." <20021209.095032.102181079.imp@bsdimp.com> Date: Mon, 09 Dec 2002 19:22:17 +0100 Message-ID: <74122.1039458137@critter.freebsd.dk> Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG In message <20021209.095032.102181079.imp@bsdimp.com>, "M. Warner Losh" writes: >We should provide an implementation of {b,l}e{16,32}toh and >hto{b,l}e{16,32} in libc. Any objections? None as such. I would really like to also have the "byte-encoding" version in a more general place than in GEOM, but I am not aware of any suitable standards in this area. The reason of these is that the data encoded/decoded may not live on native alignment boundaries, so the normal "swap-as-needed" functions are not very efficient. The current implementation in GEOM is currently strictly MD and not optimized, that could and probably should change if we make this a generic API: void g_enc_le4(u_char *p, uint32_t u) { p[0] = u & 0xff; p[1] = (u >> 8) & 0xff; p[2] = (u >> 16) & 0xff; p[3] = (u >> 24) & 0xff; } -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message From owner-freebsd-arch Mon Dec 9 12:23:44 2002 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 14FD237B401 for ; Mon, 9 Dec 2002 12:23:43 -0800 (PST) Received: from rootlabs.com (root.org [67.118.192.226]) by mx1.FreeBSD.org (Postfix) with SMTP id 6AE3D43ED8 for ; Mon, 9 Dec 2002 12:23:38 -0800 (PST) (envelope-from nate@rootlabs.com) Received: (qmail 25384 invoked by uid 1000); 9 Dec 2002 20:23:38 -0000 Date: Mon, 9 Dec 2002 12:23:38 -0800 (PST) From: Nate Lawson To: phk@FreeBSD.ORG Cc: "M. Warner Losh" , arch@FreeBSD.ORG Subject: Re: le??toh, etc in userland In-Reply-To: <74122.1039458137@critter.freebsd.dk> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-arch@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 Dec 2002 phk@FreeBSD.ORG wrote: > In message <20021209.095032.102181079.imp@bsdimp.com>, "M. Warner Losh" writes: > > >We should provide an implementation of {b,l}e{16,32}toh and > >hto{b,l}e{16,32} in libc. Any objections? > > None as such. > > I would really like to also have the "byte-encoding" version in a > more general place than in GEOM, but I am not aware of any suitable > standards in this area. > > The reason of these is that the data encoded/decoded may not live > on native alignment boundaries, so the normal "swap-as-needed" > functions are not very efficient. Already present in CAM (sys/cam/ssi_all.h): static __inline void scsi_ulto2b(u_int32_t val, u_int8_t *bytes); static __inline void scsi_ulto3b(u_int32_t val, u_int8_t *bytes); static __inline void scsi_ulto4b(u_int32_t val, u_int8_t *bytes); static __inline u_int32_t scsi_2btoul(u_int8_t *bytes); static __inline u_int32_t scsi_3btoul(u_int8_t *bytes); static __inline int32_t scsi_3btol(u_int8_t *bytes); static __inline u_int32_t scsi_4btoul(u_int8_t *bytes); I would love to have a 64 bit version and map these to a generic host version. It should use u_int8_t instead of u_char though. -Nate To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message From owner-freebsd-arch Mon Dec 9 12:33:19 2002 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 E133D37B401 for ; Mon, 9 Dec 2002 12:33:17 -0800 (PST) Received: from critter.freebsd.dk (critter.freebsd.dk [212.242.86.163]) by mx1.FreeBSD.org (Postfix) with ESMTP id 07F2A43ED4 for ; Mon, 9 Dec 2002 12:33:17 -0800 (PST) (envelope-from phk@critter.freebsd.dk) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.12.6/8.12.6) with ESMTP id gB9KWs3p075960; Mon, 9 Dec 2002 21:33:04 +0100 (CET) (envelope-from phk@critter.freebsd.dk) To: Nate Lawson Cc: "M. Warner Losh" , arch@FreeBSD.ORG Subject: Re: le??toh, etc in userland From: phk@FreeBSD.ORG In-Reply-To: Your message of "Mon, 09 Dec 2002 12:23:38 PST." Date: Mon, 09 Dec 2002 21:32:54 +0100 Message-ID: <75959.1039465974@critter.freebsd.dk> Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG In message , Nate Lawson wri tes: >> I would really like to also have the "byte-encoding" version in a >> more general place than in GEOM, but I am not aware of any suitable >> standards in this area. >> >> The reason of these is that the data encoded/decoded may not live >> on native alignment boundaries, so the normal "swap-as-needed" >> functions are not very efficient. > >Already present in CAM (sys/cam/ssi_all.h): >static __inline void scsi_ulto2b(u_int32_t val, u_int8_t *bytes); >static __inline void scsi_ulto3b(u_int32_t val, u_int8_t *bytes); >static __inline void scsi_ulto4b(u_int32_t val, u_int8_t *bytes); >static __inline u_int32_t scsi_2btoul(u_int8_t *bytes); >static __inline u_int32_t scsi_3btoul(u_int8_t *bytes); >static __inline int32_t scsi_3btol(u_int8_t *bytes); >static __inline u_int32_t scsi_4btoul(u_int8_t *bytes); > >I would love to have a 64 bit version and map these to a generic host >version. It should use u_int8_t instead of u_char though. Well, all the more reason to get standardized on this before we grow a third and fourth private copy. Does anyone know of any applicable standards anywhere which addresses this ? -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message From owner-freebsd-arch Mon Dec 9 12:34:44 2002 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 D151637B404; Mon, 9 Dec 2002 12:34:42 -0800 (PST) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8E30B43EB2; Mon, 9 Dec 2002 12:34:42 -0800 (PST) (envelope-from mux@freebsd.org) Received: by elvis.mu.org (Postfix, from userid 1920) id 64616AE265; Mon, 9 Dec 2002 12:34:42 -0800 (PST) Date: Mon, 9 Dec 2002 12:34:42 -0800 From: Maxime Henrion To: Nate Lawson Cc: phk@FreeBSD.ORG, "M. Warner Losh" , arch@FreeBSD.ORG Subject: Re: le??toh, etc in userland Message-ID: <20021209203442.GB27086@elvis.mu.org> References: <74122.1039458137@critter.freebsd.dk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4i Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Nate Lawson wrote: > On Mon, 9 Dec 2002 phk@FreeBSD.ORG wrote: > > In message <20021209.095032.102181079.imp@bsdimp.com>, "M. Warner Losh" writes: > > > > >We should provide an implementation of {b,l}e{16,32}toh and > > >hto{b,l}e{16,32} in libc. Any objections? > > > > None as such. > > > > I would really like to also have the "byte-encoding" version in a > > more general place than in GEOM, but I am not aware of any suitable > > standards in this area. > > > > The reason of these is that the data encoded/decoded may not live > > on native alignment boundaries, so the normal "swap-as-needed" > > functions are not very efficient. > > Already present in CAM (sys/cam/ssi_all.h): > static __inline void scsi_ulto2b(u_int32_t val, u_int8_t *bytes); > static __inline void scsi_ulto3b(u_int32_t val, u_int8_t *bytes); > static __inline void scsi_ulto4b(u_int32_t val, u_int8_t *bytes); > static __inline u_int32_t scsi_2btoul(u_int8_t *bytes); > static __inline u_int32_t scsi_3btoul(u_int8_t *bytes); > static __inline int32_t scsi_3btol(u_int8_t *bytes); > static __inline u_int32_t scsi_4btoul(u_int8_t *bytes); > > I would love to have a 64 bit version and map these to a generic host > version. It should use u_int8_t instead of u_char though. It should even use uintXX_t instead of u_intXX_t, since the former is the standard C99 types. Maxime To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message From owner-freebsd-arch Mon Dec 9 12:36:20 2002 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 0BCF737B401; Mon, 9 Dec 2002 12:36:19 -0800 (PST) Received: from critter.freebsd.dk (critter.freebsd.dk [212.242.86.163]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2B8A143EA9; Mon, 9 Dec 2002 12:36:18 -0800 (PST) (envelope-from phk@critter.freebsd.dk) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.12.6/8.12.6) with ESMTP id gB9Ka93p076089; Mon, 9 Dec 2002 21:36:09 +0100 (CET) (envelope-from phk@critter.freebsd.dk) To: Maxime Henrion Cc: Nate Lawson , "M. Warner Losh" , arch@freebsd.org Subject: Re: le??toh, etc in userland From: phk@freebsd.org In-Reply-To: Your message of "Mon, 09 Dec 2002 12:34:42 PST." <20021209203442.GB27086@elvis.mu.org> Date: Mon, 09 Dec 2002 21:36:09 +0100 Message-ID: <76088.1039466169@critter.freebsd.dk> Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG In message <20021209203442.GB27086@elvis.mu.org>, Maxime Henrion writes: >> Already present in CAM (sys/cam/ssi_all.h): >> static __inline void scsi_ulto2b(u_int32_t val, u_int8_t *bytes); >> static __inline void scsi_ulto3b(u_int32_t val, u_int8_t *bytes); >> static __inline void scsi_ulto4b(u_int32_t val, u_int8_t *bytes); >> static __inline u_int32_t scsi_2btoul(u_int8_t *bytes); >> static __inline u_int32_t scsi_3btoul(u_int8_t *bytes); >> static __inline int32_t scsi_3btol(u_int8_t *bytes); >> static __inline u_int32_t scsi_4btoul(u_int8_t *bytes); >> >> I would love to have a 64 bit version and map these to a generic host >> version. It should use u_int8_t instead of u_char though. > >It should even use uintXX_t instead of u_intXX_t, since the former is >the standard C99 types. I think the ones in sys/geom/geom_enc.c does the right thing, apart from the "g_" prefix. -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message From owner-freebsd-arch Mon Dec 9 12:55:44 2002 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 389F237B401 for ; Mon, 9 Dec 2002 12:55:43 -0800 (PST) Received: from harmony.village.org (rover.bsdimp.com [204.144.255.66]) by mx1.FreeBSD.org (Postfix) with ESMTP id 582D043EC2 for ; Mon, 9 Dec 2002 12:55:42 -0800 (PST) (envelope-from imp@bsdimp.com) Received: from localhost (warner@rover2.village.org [10.0.0.1]) by harmony.village.org (8.12.6/8.12.3) with ESMTP id gB9KtZuB057929 for ; Mon, 9 Dec 2002 13:55:36 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Mon, 09 Dec 2002 13:53:07 -0700 (MST) Message-Id: <20021209.135307.87742013.imp@bsdimp.com> To: arch@freebsd.org Subject: Re: le??toh, etc in userland From: "M. Warner Losh" In-Reply-To: <76088.1039466169@critter.freebsd.dk> References: <20021209203442.GB27086@elvis.mu.org> <76088.1039466169@critter.freebsd.dk> X-Mailer: Mew version 2.1 on Emacs 21.2 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG In message: <76088.1039466169@critter.freebsd.dk> phk@freebsd.org writes: : In message <20021209203442.GB27086@elvis.mu.org>, Maxime Henrion writes: : : >> Already present in CAM (sys/cam/ssi_all.h): : >> static __inline void scsi_ulto2b(u_int32_t val, u_int8_t *bytes); : >> static __inline void scsi_ulto3b(u_int32_t val, u_int8_t *bytes); : >> static __inline void scsi_ulto4b(u_int32_t val, u_int8_t *bytes); : >> static __inline u_int32_t scsi_2btoul(u_int8_t *bytes); : >> static __inline u_int32_t scsi_3btoul(u_int8_t *bytes); : >> static __inline int32_t scsi_3btol(u_int8_t *bytes); : >> static __inline u_int32_t scsi_4btoul(u_int8_t *bytes); : >> : >> I would love to have a 64 bit version and map these to a generic host : >> version. It should use u_int8_t instead of u_char though. : > : >It should even use uintXX_t instead of u_intXX_t, since the former is : >the standard C99 types. : : I think the ones in sys/geom/geom_enc.c does the right thing, apart : from the "g_" prefix. Any reason we can't just put it in endian.h and get {net,open}bsd to adopt it? There's a BSD-api mailing list we should use to talk about this. I'll post a strawman here and once we agree I'll post it to the bsd-api list. Warner To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message From owner-freebsd-arch Tue Dec 10 7:27:46 2002 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 CBD4037B401 for ; Tue, 10 Dec 2002 07:27:39 -0800 (PST) Received: from fledge.watson.org (fledge.watson.org [204.156.12.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id 070D743E4A for ; Tue, 10 Dec 2002 07:27:39 -0800 (PST) (envelope-from robert@fledge.watson.org) Received: from fledge.watson.org (fledge.pr.watson.org [192.0.2.3]) by fledge.watson.org (8.12.6/8.12.5) with SMTP id gBAFRWBF062541 for ; Tue, 10 Dec 2002 10:27:32 -0500 (EST) (envelope-from robert@fledge.watson.org) Date: Tue, 10 Dec 2002 10:27:31 -0500 (EST) From: Robert Watson X-Sender: robert@fledge.watson.org To: arch@FreeBSD.org Subject: busdma support in various device drivers Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG One of the post-5.0 development goals will be to complete integration of busdma support into FreeBSD (as well as MFC it as required). For those unfamiliar with busdma, it provides an architecture-independent abstraction for handling virtual address space and DMA transfer setup, and is required to maintain drivers across multiple platforms in a scalable manner. Generally speaking, drivers written to use the proper newbus and busdma abstractions appear to work almost "out of the box" across various architectures, whereas drivers not designed in this manner may not even compile. For us to properly support PAE (>4gb memory) on i386, as well as sparc64, ppc, etc, properly, we really need push relevant device drivers in the direction of using these abstractions. Up until recently, we didn't have sufficient busdma primitives to usefully convert network interface drivers; Sam Leffler's integration of the OpenBSD crypto acceleration framework and device drivers has provided those primitives (they may have originated in NetBSD before hitting OpenBSD?). In any case, as we continue to stabilize and improve portability of the 5.x branch, this is a necessary step. At some point in the future, presumably we will mandate that new drivers entering the system use the correct abstractions, but in the mean time we have a lot to take care of. Attached below, please find the results of a rapid fire audit of src/sys/dev for use of DMA and non-portable interactions with VM for the purposes of DMA setup. In general, the use of the folowing routines connotes a non-portable use of VM: vtophys() kvtop() There are a number of drivers that are already mostly converted to busmda, but perform some direct calls to these functions for various reasons. They should be low-hanging fruit in a conversion effort. I haven't had a chance to review some of the other common locations for drivers, such as src/sys/pci, but will attempt to get to that sometime over the next few weeks. Some drivers, particularly dated ISA drivers, are probably not worth the conversion effort. However, we have a large number of mainstream network interface drivers, and to a lesser extent storage drivers, that do need to be attended to. The plan of attack I'd like to take is for driver maintainers to perform the conversions on their own drivers, and then for maintainer-less drivers to be addressed as staffing and needs permit. If you're interested in grabbing ownership of a driver for conversion, feel free to drop me an e-mail, or just update the entry for the driver on the status web page, which may be found at: http://www.FreeBSD.org/projects/busdma/ In addition, if you aware of other drivers that will require conversion, please also let me know or update the page. While reviewing drivers, it may also make sense to review for 64-bit safety. Thanks, Robert N M Watson FreeBSD Core Team, TrustedBSD Projects robert@fledge.watson.org Network Associates Laboratories Platform Support Status +------------------------------------------------------------------------+ | Task | Responsible | Last | Status | Details | | | | updated | | | |---------+----------------+-------------+----------+--------------------| | alpha | | | In | | | | | | progress | | |---------+----------------+-------------+----------+--------------------| | ia64 | | | Not done | | |---------+----------------+-------------+----------+--------------------| | i386 | Sam Leffler | December 9, | Done | Fully supported. | | | | 2002 | | | |---------+----------------+-------------+----------+--------------------| | powerpc | | | Not done | | |---------+----------------+-------------+----------+--------------------| | | | December 9, | In | Mbuf busdma | | sparc64 | Maxime Henrion | 2002 | progress | interfaces not yet | | | | | | implemented. | +------------------------------------------------------------------------+ Network Interface Driver Status +------------------------------------------------------------------------+ | Task | Responsible | Last updated | Status | Notes | |--------+----------------+--------------+-------------+-----------------| | if_ar | | | Not done | kvtop() | |--------+----------------+--------------+-------------+-----------------| | if_bge | | | Not done | vtophys() | |--------+----------------+--------------+-------------+-----------------| | if_cs | | | Not done | | |--------+----------------+--------------+-------------+-----------------| | if_dc | | | Not done | | |--------+----------------+--------------+-------------+-----------------| | if_ed | | | Not done | kvtop() | |--------+----------------+--------------+-------------+-----------------| | if_em | | | Not done | vtophys() | |--------+----------------+--------------+-------------+-----------------| | if_en | | | Not done | vtophys() | |--------+----------------+--------------+-------------+-----------------| | if_fxp | Maxime Henrion | December 9, | In progress | vtophys() | | | | 2002 | | | |--------+----------------+--------------+-------------+-----------------| | if_fwe | | | Not done | | |--------+----------------+--------------+-------------+-----------------| | if_gem | Thomas Moestl | December 9, | In progress | Uses old busdma | | | | 2002 | | interface. | |--------+----------------+--------------+-------------+-----------------| | if_gx | | | Not done | vtophys() | |--------+----------------+--------------+-------------+-----------------| | if_hme | Thomas Moestl | December 9, | In progress | Uses old busdma | | | | 2002 | | interface. | |--------+----------------+--------------+-------------+-----------------| | if_idt | | | Not done | vtophys() | |--------+----------------+--------------+-------------+-----------------| | if_ie | | | Not done | kvtop() | |--------+----------------+--------------+-------------+-----------------| | if_lge | | | Not done | vtophys() | |--------+----------------+--------------+-------------+-----------------| | if_lmc | | | Not done | vtophys() | |--------+----------------+--------------+-------------+-----------------| | if_lnc | | | Not done | vtophys() | |--------+----------------+--------------+-------------+-----------------| | if_my | | | Not done | vtophys() | |--------+----------------+--------------+-------------+-----------------| | if_nge | | | Not done | vtophys() | |--------+----------------+--------------+-------------+-----------------| | | | | | mostly busdma, | | if_pdq | | | Not done | except for | | | | | | vtophys() | |--------+----------------+--------------+-------------+-----------------| | if_rl | Bill Paul | December 9, | Done | | | | | 2002 | | | |--------+----------------+--------------+-------------+-----------------| | if_sis | Bill Paul | December 9, | Done | | | | | 2002 | | | |--------+----------------+--------------+-------------+-----------------| | if_sr | | | Not done | vtophys() | |--------+----------------+--------------+-------------+-----------------| | if_ti | | | Not done | | |--------+----------------+--------------+-------------+-----------------| | if_tx | | | Not done | | |--------+----------------+--------------+-------------+-----------------| | if_txp | | | Not done | | |--------+----------------+--------------+-------------+-----------------| | if_xl | Maxime Henrion | December 9, | In progress | | | | | 2002 | | | +------------------------------------------------------------------------+ Storage Device Driver Status +------------------------------------------------------------------------+ | Task | Responsible | Last | Status | Notes | | | | updated | | | |----------+-------------+-------------+-----------+---------------------| | aac | | December 9, | Done | Not 64-bit-safe | | | | 2002 | | | |----------+-------------+-------------+-----------+---------------------| | aha | | December 9, | Done | | | | | 2002 | | | |----------+-------------+-------------+-----------+---------------------| | adv | | December 9, | Done | | | | | 2002 | | | |----------+-------------+-------------+-----------+---------------------| | ahb | | December 9, | Done | | | | | 2002 | | | |----------+-------------+-------------+-----------+---------------------| | aic7xxx | | December 9, | Done | | | | | 2002 | | | |----------+-------------+-------------+-----------+---------------------| | amr | | December 9, | Done | | | | | 2002 | | | |----------+-------------+-------------+-----------+---------------------| | asr | | | Not done | vtophys() | |----------+-------------+-------------+-----------+---------------------| | ata | | December 9, | Done | | | | | 2002 | | | |----------+-------------+-------------+-----------+---------------------| | buslogic | | | Not done | vtophys() | |----------+-------------+-------------+-----------+---------------------| | ciss | | December 9, | Done | | | | | 2002 | | | |----------+-------------+-------------+-----------+---------------------| | dpt | | | Not done | vtophys() | |----------+-------------+-------------+-----------+---------------------| | ida | | December 9, | Done | | | | | 2002 | | | |----------+-------------+-------------+-----------+---------------------| | iir | | | Not done | vtophys() | |----------+-------------+-------------+-----------+---------------------| | isp | | December 9, | Done | | | | | 2002 | | | |----------+-------------+-------------+-----------+---------------------| | mlx | | December 9, | Done | | | | | 2002 | | | |----------+-------------+-------------+-----------+---------------------| | mly | | December 9, | Done | | | | | 2002 | | | |----------+-------------+-------------+-----------+---------------------| | mpt | | December 9, | Done | | | | | 2002 | | | |----------+-------------+-------------+-----------+---------------------| | pst | | | Not done | vtophys() | |----------+-------------+-------------+-----------+---------------------| | | | December 9, | | At least, it looks | | stg | | 2002 | Done | like it may well | | | | | | be. | |----------+-------------+-------------+-----------+---------------------| | sym | | | Not done | vtophys() | |----------+-------------+-------------+-----------+---------------------| | trm | Olivier | December 9, | In | vtophys() | | | Houchard | 2002 | progress | | |----------+-------------+-------------+-----------+---------------------| | twe | | December 9, | Done | | | | | 2002 | | | +------------------------------------------------------------------------+ Miscellaneous Device Driver Status +------------------------------------------------------------------------+ | Task | Responsible | Last updated | Status | Notes | |----------+-------------+--------------+----------+---------------------| | bktr | | | Not done | vtophys() | |----------+-------------+--------------+----------+---------------------| | ct | | | Not done | | |----------+-------------+--------------+----------+---------------------| | cs | | | Not done | | |----------+-------------+--------------+----------+---------------------| | digi | | | Not done | vtophys() | |----------+-------------+--------------+----------+---------------------| | drm | | | Not done | vtophys() | |----------+-------------+--------------+----------+---------------------| | exca | Warner Losh | December 9, | Done | | | | | 2002 | | | |----------+-------------+--------------+----------+---------------------| | fb | | | Not done | vtophys() | |----------+-------------+--------------+----------+---------------------| | firewire | | | Not done | vtophys() | |----------+-------------+--------------+----------+---------------------| | hea | | | Not done | vtophys() | |----------+-------------+--------------+----------+---------------------| | hfa | | | Not done | vtophys() | |----------+-------------+--------------+----------+---------------------| | hifn | Sam Leffler | December 9, | Done | | | | | 2002 | | | |----------+-------------+--------------+----------+---------------------| | musycc | | | Not done | vtophys() | |----------+-------------+--------------+----------+---------------------| | ubsec | Sam Leffler | December 9, | Done | vtophys() is used | | | | 2002 | | in debugging printf | |----------+-------------+--------------+----------+---------------------| | usb | | | Not done | vtophys() | |----------+-------------+--------------+----------+---------------------| | wds | | December 9, | Done | vtophys() | | | | 2002 | | | +------------------------------------------------------------------------+ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message From owner-freebsd-arch Tue Dec 10 10:35:22 2002 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 DC0E637B401; Tue, 10 Dec 2002 10:35:21 -0800 (PST) Received: from genius.tao.org.uk (genius.tao.org.uk [212.135.162.51]) by mx1.FreeBSD.org (Postfix) with ESMTP id EDE7243ED1; Tue, 10 Dec 2002 10:35:20 -0800 (PST) (envelope-from joe@genius.tao.org.uk) Received: by genius.tao.org.uk (Postfix, from userid 100) id 1C48B421D; Tue, 10 Dec 2002 18:34:22 +0000 (GMT) Date: Tue, 10 Dec 2002 18:34:22 +0000 From: Josef Karthauser To: Robert Watson Cc: arch@FreeBSD.org Subject: Re: busdma support in various device drivers Message-ID: <20021210183422.GB7759@genius.tao.org.uk> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.1i Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Tue, Dec 10, 2002 at 10:27:31AM -0500, Robert Watson wrote: > |----------+-------------+--------------+----------+---------------------| > | usb | | | Not done | vtophys() | > |----------+-------------+--------------+----------+---------------------| You can put me down to investigate this one. If NetBSD is already doing it the busdma way then it should be really easy to port. Joe -- Josef Karthauser (joe@tao.org.uk) http://www.josef-k.net/ FreeBSD (cvs meister, admin and hacker) http://www.uk.FreeBSD.org/ Physics Particle Theory (student) http://www.pact.cpes.sussex.ac.uk/ ================ An eclectic mix of fact and theory. ================= To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message From owner-freebsd-arch Tue Dec 10 14: 8:47 2002 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 3BEC037B401; Tue, 10 Dec 2002 14:08:46 -0800 (PST) Received: from canning.wemm.org (canning.wemm.org [192.203.228.65]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0529E43EA9; Tue, 10 Dec 2002 14:08:37 -0800 (PST) (envelope-from peter@wemm.org) Received: from wemm.org (localhost [127.0.0.1]) by canning.wemm.org (Postfix) with ESMTP id 4A9862A8A5; Tue, 10 Dec 2002 14:08:28 -0800 (PST) (envelope-from peter@wemm.org) X-Mailer: exmh version 2.5 07/13/2001 with nmh-1.0.4 To: Robert Watson Cc: arch@FreeBSD.org Subject: Re: busdma support in various device drivers In-Reply-To: Date: Tue, 10 Dec 2002 14:08:28 -0800 From: Peter Wemm Message-Id: <20021210220828.4A9862A8A5@canning.wemm.org> Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Robert Watson wrote: > In general, the use of the folowing routines > connotes a non-portable use of VM: > > vtophys() > kvtop() You forgot pmap_kextract(). This routine REALLY shouldn't be used outside of pmap/machdep/vm*. vtophys() is the public interface to this subsystem. Anywhere that uses pmap_kextract() in drivers should be changed to vtophys(), before we let more bad examples out the door. Imagine what happens if pmap_kextract() returns a pt_entry_t that is a page frame number instead of a physical address? It isn't defined to return a physical address - it just happens to on our current platforms. Cheers, -Peter -- Peter Wemm - peter@wemm.org; peter@FreeBSD.org; peter@yahoo-inc.com "All of this is for nothing if we don't go to the stars" - JMS/B5 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message From owner-freebsd-arch Tue Dec 10 14:33:58 2002 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 4131C37B401; Tue, 10 Dec 2002 14:33:40 -0800 (PST) Received: from www1.mailru.com (www1.mailru.com [80.68.244.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id AAC8343EA9; Tue, 10 Dec 2002 14:33:38 -0800 (PST) (envelope-from rvdstudio@front.ru) Received: by HotBOX.Ru WebMail v2.1 id gBAKg6bn081637 for ; Date: Tue, 10 Dec 2002 23:42:06 +0300 (MSK) Message-Id: <200212102042.gBAKg6bn081637@www1.mailru.com> From: RVD-Studio To: rvd-studio@inbox.ru MIME-Version: 1.0 Content-Type: text/plain; charset="koi8-r" Content-Transfer-Encoding: 8bit X-Mailer: Free WebMail HotBOX.ru X-Originating-IP: [213.59.67.35] Subject: ðÒÏÇÒÁÍÍÉÒÏ×ÁÎÉÅ É ÄÉÚÁÊÎ ÄÌÑ ÷ÁÓ! Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG RVD-Studio, ×ÉÒÔÕÁÌØÎÁÑ ÓÔÕÄÉÑ ÄÉÚÁÊÎÁ É ÐÒÏÇÒÁÍÍÉÒÏ×ÁÎÉÑ ÐÒÅÄÌÁÇÁÅÔ ÓÌÅÄÕÀÝÉÅ ÕÓÌÕÇÉ: - òÁÚÒÁÂÏÔËÁ É ÓÏÐÒÏ×ÏÖÄÅÎÉÅ ÐÒÏÇÒÁÍÍÎÏÇÏ ÏÂÅÓÐÅÞÅÎÉÑ ÐÏ ÷ÁÛÉÍ ÜÓËÉÚÁÍ É/ÉÌÉ ÏÐÉÓÁÎÉÀ - éÚÇÏÔÏ×ÌÅÎÉÅ ÓÁÊÔÏ× ÄÌÑ ÆÉÚÉÞÅÓËÉÈ ÌÉÃ É ÏÒÇÁÎÉÚÁÃÉÊ - 3D-ÍÏÄÅÌÉÒÏ×ÁÎÉÅ ÄÌÑ Web É ÎÅ ÔÏÌØËÏ - ðÒÏÅËÔÉÒÏ×ÁÎÉÅ 3D É Flash - ÁÎÉÍÁÃÉÊ îáû ëïîôáëôîùê e-mail rvd-studion@inbox.ru õÂÅÄÉÔÅÌØÎÁÑ ÐÒÏÓØÂÁ ÐÏÌØÚÏ×ÁÔØÓÑ ÄÌÑ Ó×ÑÚÉ ÔÏÌØËÏ ÕËÁÚÁÎÎÙÍ e- mail ÁÄÒÅÓÏÍ, Á ÎÅ ÏÂÒÁÔÎÙÍ ÁÄÒÅÓÏÍ ÄÁÎÎÏÇÏ ÓÏÏÂÝÅÎÉÑ! íÙ ÇÁÒÁÎÔÉÒÕÅÍ ÉÎÄÉ×ÉÄÕÁÌØÎÙÊ ÐÏÄÈÏÄ Ë ËÁÖÄÏÍÕ ËÌÉÅÎÔÕ, ÄÏÂÒÏÓÏ×ÅÓÔÎÏÓÔØ ÒÁÂÏÔ É ÒÁÚÕÍÎÙÅ ÃÅÎÙ. ëÁË ÍÙ ÒÁÂÏÔÁÅÍ? ÷ù ×ÙÓÙÌÁÅÔÅ ÎÁ ÎÁÛ email ÏÐÉÓÁÎÉÅ ÐÒÏÅËÔÁ ÉÌÉ ÐÒÏÇÒÁÍÍÎÏÇÏ ÏÂÅÓÐÅÞÅÎÉÑ, × ËÏÔÏÒÏÍ ÷Ù ÎÕÖÄÁÅÔÅÓØ, Á ÔÁËÖÅ ÕËÁÚÙ×ÁÅÔÅ ÓÒÏË, × ËÏÔÏÒÙÊ ÄÏÌÖÎÙ ÂÙÔØ ×ÙÐÏÌÎÅÎÙ ÒÁÂÏÔÙ. íù ÏÃÅÎÉ×ÁÅÍ ÓÔÏÉÍÏÓÔØ ÐÒÏÅËÔÁ É ÓÏÏÂÝÁÅÍ ÷áí åÓÌÉ ÷áó ÕÓÔÒÁÉ×ÁÅÔ ÃÅÎÁ, íù ÄÅÌÁÅÍ ÄÅÍÏ×ÅÒÓÉÀ É ×ÙÓÙÌÁÅÍ ÅÅ ÷áí ÷ù ÐÌÁÔÉÔÅ - É ÐÏÌÕÞÁÅÔÅ ÐÏÌÎÏÆÕÎËÃÉÏÎÁÌØÎÕÀ ×ÅÒÓÉÀ ÐÒÏÄÕËÔÁ. ÷ù ÐÌÁÔÉÔÅ ÔÏÌØËÏ ÔÏÇÄÁ, ËÏÇÄÁ Õ×ÅÒÅÎÙ, ÞÔÏ îáûá ÒÁÂÏÔÁ ÷áó ÕÓÔÒÁÉ×ÁÅÔ úáëáöéôå ÷áû ðòïåëô ðòñíï óåêþáó! |÷ÁÛ ÁÄÒÅÓ ×ÚÑÔ ÉÚ ÏÔËÒÙÔÙÈ ÉÓÔÏÞÎÉËÏ× éîôåòîåô| To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message From owner-freebsd-arch Tue Dec 10 14:58:15 2002 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 BF33037B430 for ; Tue, 10 Dec 2002 14:58:13 -0800 (PST) Received: from bear.orl.ru (bear.orl.ru [213.59.67.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6A8AE43E4A for ; Tue, 10 Dec 2002 14:58:12 -0800 (PST) (envelope-from rvd-studion@inbox.ru) Received: from odb ([213.59.67.35]) by bear.orl.ru (8.11.1/8.11.1) with SMTP id gBAMss895677 for ; Wed, 11 Dec 2002 01:54:54 +0300 (MSK) Date: Wed, 11 Dec 2002 01:54:54 +0300 (MSK) Message-Id: <200212102254.gBAMss895677@bear.orl.ru> From: RVD-STUDIO To: freebsd-arch@freebsd.org Subject: Ïðîãðàììèðîâàíèå è äèçàéí äëÿ Âàñ! Reply-To: rvd-studion@inbox.ru Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG RVD-Studio, âèðòóàëüíàÿ ñòóäèÿ äèçàéíà è ïðîãðàììèðîâàíèÿ ïðåäëàãàåò ñëåäóþùèå óñëóãè: - Ðàçðàáîòêà è ñîïðîâîæäåíèå ïðîãðàììíîãî îáåñïå÷åíèÿ ïî Âàøèì ýñêèçàì è/èëè îïèñàíèþ - Èçãîòîâëåíèå ñàéòîâ äëÿ ôèçè÷åñêèõ ëèö è îðãàíèçàöèé - 3D-ìîäåëèðîâàíèå äëÿ Web è íå òîëüêî - Ïðîåêòèðîâàíèå 3D è Flash - àíèìàöèé ÍÀØ ÊÎÍÒÀÊÒÍÛÉ e-mail rvd-studion@inbox.ru Ìû ãàðàíòèðóåì èíäèâèäóàëüíûé ïîäõîä ê êàæäîìó êëèåíòó, äîáðîñîâåñòíîñòü ðàáîò è ðàçóìíûå öåíû. Êàê ìû ðàáîòàåì? ÂÛ âûñûëàåòå íà íàø email îïèñàíèå ïðîåêòà èëè ïðîãðàììíîãî îáåñïå÷åíèÿ, â êîòîðîì Âû íóæäàåòåñü, à òàêæå óêàçûâàåòå ñðîê, â êîòîðûé äîëæíû áûòü âûïîëíåíû ðàáîòû. ÌÛ îöåíèâàåì ñòîèìîñòü ïðîåêòà è ñîîáùàåì ÂÀÌ Åñëè ÂÀÑ óñòðàèâàåò öåíà, ÌÛ äåëàåì äåìîâåðñèþ è âûñûëàåì åå ÂÀÌ ÂÛ ïëàòèòå - è ïîëó÷àåòå ïîëíîôóíêöèîíàëüíóþ âåðñèþ ïðîäóêòà. ÂÛ ïëàòèòå òîëüêî òîãäà, êîãäà óâåðåíû, ÷òî ÍÀØÀ ðàáîòà ÂÀÑ óñòðàèâàåò ÇÀÊÀÆÈÒÅ ÂÀØ ÏÐÎÅÊÒ ÏÐßÌÎ ÑÅÉ×ÀÑ! |Âàø àäðåñ âçÿò èç îòêðûòûõ èñòî÷íèêîâ ÈÍÒÅÐÍÅÒ| To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message From owner-freebsd-arch Tue Dec 10 15:11: 0 2002 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 1834137B401 for ; Tue, 10 Dec 2002 15:10:57 -0800 (PST) Received: from 12-247-114-63.client.attbi.com (modemcable095.240-201-24.mtl.mc.videotron.ca [24.201.240.95]) by mx1.FreeBSD.org (Postfix) with SMTP id C6FCC43EC5 for ; Tue, 10 Dec 2002 15:10:35 -0800 (PST) (envelope-from vadkurtise@worldnet.att.net) Received: from 82.60.152.190 ([82.60.152.190]) by smtp4.cyberec.com with QMQP; Dec, 10 2002 5:57:26 PM -0700 Received: from [206.22.148.111] by smtp4.cyberec.com with NNFMP; Dec, 10 2002 4:53:25 PM -0200 Received: from anther.webhostingtalk.com ([88.58.121.118]) by da001d2020.lax-ca.osd.concentric.net with QMQP; Dec, 10 2002 4:07:22 PM +1100 Received: from [183.62.39.149] by m10.grp.snv.yahoo.com with QMQP; Dec, 10 2002 3:01:36 PM -0000 From: tarAnne Todd To: Wendy@FreeBSD.ORG, Marie@FreeBSD.ORG, Robinson@FreeBSD.ORG Cc: Subject: Fax Directory with 1.5 miLLion BUSINESS FAX NUMBERS $49 Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Date: Tue, 10 Dec 2002 18:15:02 -0500 X-Mailer: Microsoft Outlook Build 10.0.2627 Message-Id: <20021210231035.C6FCC43EC5@mx1.FreeBSD.org> Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 400 MILLION Email Addresses in a 3 volume, 5-disk set ** Complete package only $139!! ** Reach categories Like: Business Opportunity seekers, MLM, Gambling, Adult, Auctions, Golf, Auto, Fitness Health, Investments, Sports, Phsychics, Opt-in Etc.. * ALSO FEATURING OVER 25 MILLION VERIFIED AOL, COMPUSERVE & MCI ADDRESSES * MILLIONS OF RANDOM DOMAINS ORGANIZED BY DOMAIN NAME. * NEW * 7 Million Chinese speaking persons' email addresses. ** NEW ** EMAIL GOLD CD - 100 Million FRESHLY EXTRACTED EMAIL ADDRESSES The whole cd package is in TEXT file format and fully exportable to any software. You'll enjoy more responses than with any other advertising media! HOW THIS DIRECTORY WAS COMPILED: * Virtually every other email directory on the Internet was taken and put it through an extensive email verification process thus eliminating all the dead addressess. * Special software spiders through the web searching websites, newsgroups and many other online databases with given keywords like area codes, industries, city names etc.. to find millions of fresh new addresses every week. TURN YOUR PC INTO A CASH MACHINE! E-Mail turns your computer into a Money Machine by giving you FREE, immediate access to over 400 Million People. Don't you think some of these people would be interested in your products or Services? MUCH FASTER: With bulk E-mail you get responses back in 1 to 4 days instead of waiting weeks or months! You can begin filling orders the same day you send E-mail. FREE ADVERTISING WORTH MILLIONS: It costs millions of dollars to mail. DO NOT REPLY TO THIS EMAIL ADDRESS. TO ORDER, READ BELOW: ORDER VIA SECURE SERVER (HTTPS) ONLINE Complete the form below except for credit card details and email it to guardhick@pekingtrail.com.cn with "ORDER" in the subject line. We'll send you further instructions by email. ORDER BY FAX Simply complete the order form below and fax it back to 1-630-604-1030 Make sure that we have your email address so that we can send you a receipt for your transaction. ORDER BY MAIL: Print the form below and send it together with a money order payable to FT International for the balance to: 5863 Leslie St. Suite 408 Toronto, ONTARIO M2H-1J8 CANADA Please DO NOT send POSTAL Money Orders. FAX THIS ORDER FORM BACK TO 1-630-604-1030 or 1-443-659-0730 Please PRINT or TYPE clearly Full Name:________________________________________________ Company Name:_____________________________________________ Telephone:________________________________________________ Fax:______________________________________________________ Email Address:__________________________________________* REQUIRED FIELD Shipping Address:______________________________________________ City:____________________ State/Province:________________ Country:_________________________ZIP/Postal:_____________ Shipping Options: [] $7 Regular Mail (2 - 4 weeks) [] $15 Priority Mail (1 - 2 weeks) [] $30 Fedex (overnight) For US & Canada Only - Other countries extra, please enquire by phone or email Product: (All prices are in US funds) [] Email Marketing CDROM with 100 million Addresses $69.00 [] 200 MILLION EMAIL ADDRESSES on 2 CD's $79.00 [] 1.5 Million USA Business Fax Numbers $49.00 [] COMBO PACKAGE "A" - ALL DIRECTORIES ABOVE (3 CDs) $99.00 [] Email Gold CD FRESHLY EXTRACTED 100 Million Addresses $99.00 [] 7 Million Chinese Email Addresses $99.00 [] COMBO PACKAGE "B" - ALL DIRECTORIES ABOVE (5 CDs) $139.00 TOTAL: $_________ US Funds ================================================================================ [] Paypal Order Please enter your email address for us to request payment from:______________________________________________ (after faxing in your order you will receive an email requesting you to pay) ================================================================================ [] Credit Card Order Card #:___________________________________________________ Expiry Date: ______________ Type of Card [] VISA [] MASTERCARD [] AMERICAN EXPRESS Name on Card:_____________________________________________ Billing Address:_________________________________ZIP/Postal: ____________ City:_____________________State/Province:_______________ Country:_____________ Last 3 digits on reverse of card next to signature: [ ___ - ___ - ___ ] Cardholder Signature:______________________________________ Please note that FT International will appear on your statement. ================================================================================ Did you know, we also offer: - Bulk Friendly Hosting (so your website will never get shut down for spamming) - Bullet Proof Email Addresses (these can't be shut down for spamming) - Bulk Email Sending Service (we'll send out your emails so you'll never lose your internet connection) - Customized Email Lists (we'll compile lists based specifically on what you want) Please feel free to email us at guardhick@pekingtrail.com.cn with "INQUIRY" in the subject line for any questions. If you don't want any more mail from us, send an email to Superstud@btamail.net.cn with "DELETE" in the subject line To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message From owner-freebsd-arch Tue Dec 10 16:43:37 2002 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 3C02537B401; Tue, 10 Dec 2002 16:43:36 -0800 (PST) Received: from watery.cc.kogakuin.ac.jp (watery.cc.kogakuin.ac.jp [133.80.152.80]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0C4FD43E4A; Tue, 10 Dec 2002 16:43:35 -0800 (PST) (envelope-from nyan@jp.FreeBSD.org) Received: from localhost (localhost [IPv6:::1]) by watery.cc.kogakuin.ac.jp (8.12.6/8.12.6) with ESMTP id gBB0hKnq070414; Wed, 11 Dec 2002 09:43:20 +0900 (JST) (envelope-from nyan@jp.FreeBSD.org) Date: Wed, 11 Dec 2002 09:42:19 +0900 (JST) Message-Id: <20021211.094219.78766643.nyan@jp.FreeBSD.org> To: rwatson@FreeBSD.ORG Cc: arch@FreeBSD.ORG Subject: Re: busdma support in various device drivers From: Takahashi Yoshihiro In-Reply-To: References: X-Mailer: Mew version 2.3 on Emacs 21.2 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG In article Robert Watson writes: > In addition, if you aware of other drivers that will require conversion, > please also let me know or update the page. While reviewing drivers, it > may also make sense to review for 64-bit safety. The ncv and nsp drivers are SCSI device drivers. > Miscellaneous Device Driver Status > |----------+-------------+--------------+----------+---------------------| > | ct | | | Not done | | > |----------+-------------+--------------+----------+---------------------| The ct driver is also SCSI device driver. --- TAKAHASHI Yoshihiro To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message From owner-freebsd-arch Fri Dec 13 10:26: 3 2002 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 9193B37B401 for ; Fri, 13 Dec 2002 10:26:02 -0800 (PST) Received: from hotmail.com (f38.law9.hotmail.com [64.4.9.38]) by mx1.FreeBSD.org (Postfix) with ESMTP id 577A443EB2 for ; Fri, 13 Dec 2002 10:26:02 -0800 (PST) (envelope-from nathan_arun@hotmail.com) Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Fri, 13 Dec 2002 10:26:02 -0800 Received: from 207.46.125.17 by lw9fd.law9.hotmail.msn.com with HTTP; Fri, 13 Dec 2002 18:26:01 GMT X-Originating-IP: [207.46.125.17] From: "Nathan Arun" To: arch@freebsd.org Subject: Threads in FreeBSD Date: Fri, 13 Dec 2002 18:26:01 +0000 Mime-Version: 1.0 Content-Type: text/plain; format=flowed Message-ID: X-OriginalArrivalTime: 13 Dec 2002 18:26:02.0095 (UTC) FILETIME=[173617F0:01C2A2D5] Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG I'm currently reading the book "Modern Operating Systems" by Tanenbaum, where he says there are 2 kinds of threads. user-level and kernel-level. What type of threads is implemented in FreeBSD? user, kernel or both? Pointers to further reading (also comparison with WindowsNT) is appreciated. I would also like to know the source code location. (src/sys/i386/i386/swtch.s?, where is pthread_create, etc..?) thank you Nathan _________________________________________________________________ Help STOP SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=features/junkmail To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message From owner-freebsd-arch Fri Dec 13 10:36:35 2002 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 D6C1137B401 for ; Fri, 13 Dec 2002 10:36:34 -0800 (PST) Received: from alpha.yumyumyum.org (dsl092-171-091.wdc1.dsl.speakeasy.net [66.92.171.91]) by mx1.FreeBSD.org (Postfix) with ESMTP id 33B7443EC2 for ; Fri, 13 Dec 2002 10:36:28 -0800 (PST) (envelope-from culverk@yumyumyum.org) Received: from alpha.yumyumyum.org (localhost [127.0.0.1]) by alpha.yumyumyum.org (8.12.6/8.12.6) with ESMTP id gBDIZSFw031791; Fri, 13 Dec 2002 13:35:29 -0500 (EST) (envelope-from culverk@yumyumyum.org) Received: from localhost (culverk@localhost) by alpha.yumyumyum.org (8.12.6/8.12.6/Submit) with ESMTP id gBDIZSOE031788; Fri, 13 Dec 2002 13:35:28 -0500 (EST) (envelope-from culverk@yumyumyum.org) X-Authentication-Warning: alpha.yumyumyum.org: culverk owned process doing -bs Date: Fri, 13 Dec 2002 13:35:28 -0500 (EST) From: Kenneth Culver To: Nathan Arun Cc: arch@FreeBSD.ORG Subject: Re: Threads in FreeBSD In-Reply-To: Message-ID: <20021213133306.U31761-100000@alpha.yumyumyum.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Spam-Status: No, hits=-1.2 required=5.0 tests=IN_REP_TO,X_AUTH_WARNING,NO_MX_FOR_FROM,AWL version=2.31 Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG > I'm currently reading the book "Modern Operating Systems" by Tanenbaum, > where he says there are 2 kinds of threads. user-level and kernel-level. > What type of threads is implemented in FreeBSD? user, kernel or both? FreeBSD-STABLE's threads are currently totally in userland. FreeBSD-CURRENT's threads will eventually be a sort of a hybrid design, with kernel support for multiple threads so that different parts of the kernel, and different userland threads can be run on different processors. The FreeBSD implementation in -CURRENT is similar to the Scheduler Activation method. The thread scheduler is in userland with an upcall into the kernel that can cause threads to be scheduled across multiple processors. I'm not sure that's quite working yet, but work is progressing in -CURRENT, and from what I hear, should be ready in time for 5.1-RELEASE Ken To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message From owner-freebsd-arch Fri Dec 13 11:13:35 2002 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 8C11337B401 for ; Fri, 13 Dec 2002 11:13:33 -0800 (PST) Received: from mail.rpi.edu (mail.rpi.edu [128.113.22.40]) by mx1.FreeBSD.org (Postfix) with ESMTP id E9C5743E4A for ; Fri, 13 Dec 2002 11:13:32 -0800 (PST) (envelope-from higgsr@rpi.edu) Received: from webmail.rpi.edu (webmail.rpi.edu [128.113.26.21]) by mail.rpi.edu (8.12.1/8.12.1) with ESMTP id gBDJDPrl167000; Fri, 13 Dec 2002 14:13:25 -0500 Message-Id: <200212131913.gBDJDPrl167000@mail.rpi.edu> Content-Type: text/plain Content-Disposition: inline To: nathan_arun@hotmail.com From: higgsr@rpi.edu Cc: arch@freebsd.org X-Originating-Ip: 24.195.2.73 Mime-Version: 1.0 Reply-To: higgsr@rpi.edu Date: Fri, 13 Dec 2002 14:13:25 EST X-Mailer: EMUmail 4.00 Subject: Re: Threads in FreeBSD X-Scanned-By: MIMEDefang 2.3 (www dot roaringpenguin dot com slash mimedefang) Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG There is a paper describing -CURRENT's ideal model for thread support http://www.asdf.dk/sjov/freebsd_kse.pdf the status page http://www.freebsd.org/kse/ and some miscellaneous diagrams, email list threads, etc. http://people.freebsd.org/~julian/threads/ Ray On Fri, 13 Dec 2002 13:35:28 -0500 (EST) Kenneth Culver wrote: > > I'm currently reading the book "Modern Operating Systems" by Tanenbaum, > > where he says there are 2 kinds of threads. user-level and > kernel-level. > > What type of threads is implemented in FreeBSD? user, kernel or both? > > FreeBSD-STABLE's threads are currently totally in userland. > FreeBSD-CURRENT's threads will eventually be a sort of a hybrid design, > with kernel support for multiple threads so that different parts of the > kernel, and different userland threads can be run on different > processors. > The FreeBSD implementation in -CURRENT is similar to the Scheduler > Activation method. The thread scheduler is in userland with an upcall > into > the kernel that can cause threads to be scheduled across multiple > processors. I'm not sure that's quite working yet, but work is > progressing > in -CURRENT, and from what I hear, should be ready in time for > 5.1-RELEASE > > Ken > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-arch" in the body of the message > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message From owner-freebsd-arch Fri Dec 13 11:40:28 2002 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 39F3537B401 for ; Fri, 13 Dec 2002 11:40:27 -0800 (PST) Received: from dibbler.ne.client2.attbi.com (dibbler.ne.client2.attbi.com [66.31.42.180]) by mx1.FreeBSD.org (Postfix) with ESMTP id 55CB043EC2 for ; Fri, 13 Dec 2002 11:40:26 -0800 (PST) (envelope-from rodrigc@attbi.com) Received: from dibbler.ne.client2.attbi.com (localhost [127.0.0.1]) by dibbler.ne.client2.attbi.com (8.12.6/8.12.6) with ESMTP id gBDJf3db003945; Fri, 13 Dec 2002 14:41:03 -0500 (EST) (envelope-from rodrigc@dibbler.ne.client2.attbi.com) Received: (from rodrigc@localhost) by dibbler.ne.client2.attbi.com (8.12.6/8.12.6/Submit) id gBDJf30T003944; Fri, 13 Dec 2002 14:41:03 -0500 (EST) Date: Fri, 13 Dec 2002 14:41:03 -0500 From: Craig Rodrigues To: Nathan Arun Cc: arch@FreeBSD.ORG Subject: Re: Threads in FreeBSD Message-ID: <20021213144103.A3790@attbi.com> References: <20021213133306.U31761-100000@alpha.yumyumyum.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <20021213133306.U31761-100000@alpha.yumyumyum.org>; from culverk@yumyumyum.org on Fri, Dec 13, 2002 at 01:35:28PM -0500 Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Fri, Dec 13, 2002 at 01:35:28PM -0500, Kenneth Culver wrote: > > I'm currently reading the book "Modern Operating Systems" by Tanenbaum, > > where he says there are 2 kinds of threads. user-level and kernel-level. > > What type of threads is implemented in FreeBSD? user, kernel or both? > > FreeBSD-STABLE's threads are currently totally in userland. ....and the source code is in src/lib/libc_r/uthread > FreeBSD-CURRENT's threads will eventually be a sort of a hybrid design, > with kernel support for multiple threads so that different parts of the > kernel, and different userland threads can be run on different processors. > The FreeBSD implementation in -CURRENT is similar to the Scheduler > Activation method. The thread scheduler is in userland with an upcall into > the kernel that can cause threads to be scheduled across multiple > processors. I'm not sure that's quite working yet, but work is progressing > in -CURRENT, and from what I hear, should be ready in time for 5.1-RELEASE ...and you can read more about the status of Kernel Schedulable Entities in FreeBSD at: http://www.freebsd.org/kse/ Work is ongoing for that project. You can read the original Schedular Activations paper also: http://citeseer.nj.nec.com/anderson92scheduler.html I don't have any good references offhand for Win32 threads, since the original poster asked for Win32 threading information. You can try reading stuff from MSDN: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore98/html/_core_multithreading_with_c_and_win32.asp Here is an article which mentions how to implement POSIX-style condition variables on Win32: http://www.cs.wustl.edu/~schmidt/win32-cv-1.html That may also give you an idea of some of the differences between pthreads and Win32 threads. -- Craig Rodrigues http://www.gis.net/~craigr rodrigc@attbi.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message From owner-freebsd-arch Fri Dec 13 11:50:17 2002 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 5805437B401 for ; Fri, 13 Dec 2002 11:50:15 -0800 (PST) Received: from rwcrmhc53.attbi.com (rwcrmhc53.attbi.com [204.127.198.39]) by mx1.FreeBSD.org (Postfix) with ESMTP id 947A843EC5 for ; Fri, 13 Dec 2002 11:50:14 -0800 (PST) (envelope-from julian@elischer.org) Received: from InterJet.elischer.org (12-232-168-4.client.attbi.com[12.232.168.4]) by rwcrmhc53.attbi.com (rwcrmhc53) with ESMTP id <20021213195008053003n914e>; Fri, 13 Dec 2002 19:50:09 +0000 Received: from localhost (localhost.elischer.org [127.0.0.1]) by InterJet.elischer.org (8.9.1a/8.9.1) with ESMTP id LAA10118; Fri, 13 Dec 2002 11:49:39 -0800 (PST) Date: Fri, 13 Dec 2002 11:49:37 -0800 (PST) From: Julian Elischer To: higgsr@rpi.edu Cc: nathan_arun@hotmail.com, arch@freebsd.org Subject: Re: Threads in FreeBSD In-Reply-To: <200212131913.gBDJDPrl167000@mail.rpi.edu> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Fri, 13 Dec 2002 higgsr@rpi.edu wrote: > There is a paper describing -CURRENT's ideal model for thread support > > http://www.asdf.dk/sjov/freebsd_kse.pdf This is way out of date and represents an early stage in the design. A newer version (still a bit out of date) is at: http://www.aims.com.au/chris/kse/ and there is a man page on the primatives used at: http://www.freebsd.org/cgi/man.cgi?query=kse&apropos=0&sektion=0&manpath=FreeBSD+5.0-current&format=html (sorry if that wraps). Julian > > the status page > > http://www.freebsd.org/kse/ > > and some miscellaneous diagrams, email list threads, etc. > > http://people.freebsd.org/~julian/threads/ > > Ray > > On Fri, 13 Dec 2002 13:35:28 -0500 (EST) Kenneth Culver wrote: > > > > I'm currently reading the book "Modern Operating Systems" by Tanenbaum, > > > > where he says there are 2 kinds of threads. user-level and > > kernel-level. > > > What type of threads is implemented in FreeBSD? user, kernel or both? > > > > FreeBSD-STABLE's threads are currently totally in userland. > > FreeBSD-CURRENT's threads will eventually be a sort of a hybrid design, > > with kernel support for multiple threads so that different parts of the > > kernel, and different userland threads can be run on different > > processors. > > The FreeBSD implementation in -CURRENT is similar to the Scheduler > > Activation method. The thread scheduler is in userland with an upcall > > into > > the kernel that can cause threads to be scheduled across multiple > > processors. I'm not sure that's quite working yet, but work is > > progressing > > in -CURRENT, and from what I hear, should be ready in time for > > 5.1-RELEASE > > > > Ken > > > > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > > with "unsubscribe freebsd-arch" in the body of the message > > > > > > > > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-arch" in the body of the message > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message From owner-freebsd-arch Fri Dec 13 12:51:14 2002 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 2F59937B401 for ; Fri, 13 Dec 2002 12:51:13 -0800 (PST) Received: from hotmail.com (f154.law9.hotmail.com [64.4.9.154]) by mx1.FreeBSD.org (Postfix) with ESMTP id DE4EE43EC5 for ; Fri, 13 Dec 2002 12:51:12 -0800 (PST) (envelope-from nathan_arun@hotmail.com) Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Fri, 13 Dec 2002 12:51:12 -0800 Received: from 207.46.125.16 by lw9fd.law9.hotmail.msn.com with HTTP; Fri, 13 Dec 2002 20:51:12 GMT X-Originating-IP: [207.46.125.16] From: "Nathan Arun" To: arch@freebsd.org Subject: Re: Threads in FreeBSD Date: Fri, 13 Dec 2002 20:51:12 +0000 Mime-Version: 1.0 Content-Type: text/plain; format=flowed Message-ID: X-OriginalArrivalTime: 13 Dec 2002 20:51:12.0768 (UTC) FILETIME=[5F2D5000:01C2A2E9] Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Thanks to everyone who replied. I'm not a kernel programmer and wouldn't know the relative merits of different threading architectures. Purely as an FYI, here is a white paper I came across on the internet. This is by a Redhat developer: http://people.redhat.com/drepper/nptl-design.pdf, who argues that 1-on-1 implementation is the best. And some benchmarks to prove it is here: http://www.onlamp.com/pub/a/onlamp/2002/11/07/linux_threads.html?page=2 (though this is Linux) thanks again Nathan _________________________________________________________________ MSN 8 with e-mail virus protection service: 2 months FREE* http://join.msn.com/?page=features/virus To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message From owner-freebsd-arch Sat Dec 14 7:17: 8 2002 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 84A4237B401; Sat, 14 Dec 2002 07:17:07 -0800 (PST) Received: from srv1.cosmo-project.de (srv1.cosmo-project.de [213.83.6.106]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1B53D43EC2; Sat, 14 Dec 2002 07:17:06 -0800 (PST) (envelope-from ticso@cicely8.cicely.de) Received: from cicely5.cicely.de (cicely5.cicely.de [IPv6:3ffe:400:8d0:301:200:92ff:fe9b:20e7]) by srv1.cosmo-project.de (8.12.5/8.12.5) with ESMTP id gBEFH2qd076903 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=OK); Sat, 14 Dec 2002 16:17:03 +0100 (CET) (envelope-from ticso@cicely8.cicely.de) Received: from cicely8.cicely.de (cicely8.cicely.de [10.1.1.10]) by cicely5.cicely.de (8.12.6/8.12.6) with ESMTP id gBEFH1fQ003797 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Sat, 14 Dec 2002 16:17:02 +0100 (CET) (envelope-from ticso@cicely8.cicely.de) Received: from cicely8.cicely.de (localhost [127.0.0.1]) by cicely8.cicely.de (8.12.6/8.12.6) with ESMTP id gBEFH0gV031596; Sat, 14 Dec 2002 16:17:00 +0100 (CET) (envelope-from ticso@cicely8.cicely.de) Received: (from ticso@localhost) by cicely8.cicely.de (8.12.6/8.12.6/Submit) id gBEFGxD7031595; Sat, 14 Dec 2002 16:16:59 +0100 (CET) Date: Sat, 14 Dec 2002 16:16:58 +0100 From: Bernd Walter To: Josef Karthauser Cc: Robert Watson , arch@FreeBSD.ORG Subject: Re: busdma support in various device drivers Message-ID: <20021214151657.GB29286@cicely8.cicely.de> Reply-To: ticso@cicely.de References: <20021210183422.GB7759@genius.tao.org.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20021210183422.GB7759@genius.tao.org.uk> X-Operating-System: FreeBSD cicely8.cicely.de 5.0-CURRENT i386 User-Agent: Mutt/1.5.1i Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Tue, Dec 10, 2002 at 06:34:22PM +0000, Josef Karthauser wrote: > On Tue, Dec 10, 2002 at 10:27:31AM -0500, Robert Watson wrote: > > |----------+-------------+--------------+----------+---------------------| > > | usb | | | Not done | vtophys() | > > |----------+-------------+--------------+----------+---------------------| > > You can put me down to investigate this one. If NetBSD is already doing > it the busdma way then it should be really easy to port. If you need -current i386/ohci or alpha/ohci tests then let me know. It'll take some time to setup an alpha testing environment, but it's possible for me to do. -- B.Walter COSMO-Project http://www.cosmo-project.de ticso@cicely.de Usergroup info@cosmo-project.de To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message From owner-freebsd-arch Sat Dec 14 8:59:14 2002 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 88D4037B401 for ; Sat, 14 Dec 2002 08:59:13 -0800 (PST) Received: from mail.securesoftware.com (w168.z205158144.scl-ca.dsl.cnc.net [205.158.144.168]) by mx1.FreeBSD.org (Postfix) with ESMTP id CC0C943ED1 for ; Sat, 14 Dec 2002 08:59:12 -0800 (PST) (envelope-from bob@securesoftware.com) Received: from [192.168.0.213] (unknown [66.45.36.250]) by mail.securesoftware.com (Postfix) with ESMTP id 548251344AE; Sat, 14 Dec 2002 12:03:19 -0500 (EST) Subject: Re: Threads in FreeBSD From: Bob Fleck To: Nathan Arun Cc: arch@freebsd.org In-Reply-To: References: Content-Type: text/plain Organization: Message-Id: <1039884977.71245.1.camel@mcp.securesoftware.com> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.0 Date: 14 Dec 2002 11:56:17 -0500 Content-Transfer-Encoding: 7bit Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Fri, 2002-12-13 at 15:51, Nathan Arun wrote: > Thanks to everyone who replied. > > I'm not a kernel programmer and wouldn't know the relative merits of > different threading architectures. Purely as an FYI, here is a white paper I > came across on the internet. This is by a Redhat developer: > http://people.redhat.com/drepper/nptl-design.pdf, who argues that 1-on-1 > implementation is the best. And some benchmarks to prove it is here: > http://www.onlamp.com/pub/a/onlamp/2002/11/07/linux_threads.html?page=2 > (though this is Linux) There has been a pretty extensive, and informative, discussion on this paper on this list already. Check the archives, it starts on September 19th. Bob To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message From owner-freebsd-arch Sat Dec 14 15:19:24 2002 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 AB97537B401; Sat, 14 Dec 2002 15:19:23 -0800 (PST) Received: from kayak.xcllnt.net (209-128-86-226.BAYAREA.NET [209.128.86.226]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0716F43EC5; Sat, 14 Dec 2002 15:19:18 -0800 (PST) (envelope-from marcel@xcllnt.net) Received: from athlon.pn.xcllnt.net (athlon.pn.xcllnt.net [192.168.4.3]) by kayak.xcllnt.net (8.12.6/8.12.6) with ESMTP id gBENJ3rT074455; Sat, 14 Dec 2002 15:19:03 -0800 (PST) (envelope-from marcel@kayak.pn.xcllnt.net) Received: from athlon.pn.xcllnt.net (localhost [127.0.0.1]) by athlon.pn.xcllnt.net (8.12.6/8.12.6) with ESMTP id gBENJ3Ii001266; Sat, 14 Dec 2002 15:19:03 -0800 (PST) (envelope-from marcel@athlon.pn.xcllnt.net) Received: (from marcel@localhost) by athlon.pn.xcllnt.net (8.12.6/8.12.6/Submit) id gBENJ3xS001265; Sat, 14 Dec 2002 15:19:03 -0800 (PST) (envelope-from marcel) Date: Sat, 14 Dec 2002 15:19:03 -0800 From: Marcel Moolenaar To: ticso@cicely.de Cc: Josef Karthauser , Robert Watson , arch@FreeBSD.ORG Subject: Re: busdma support in various device drivers Message-ID: <20021214231903.GA1210@athlon.pn.xcllnt.net> References: <20021210183422.GB7759@genius.tao.org.uk> <20021214151657.GB29286@cicely8.cicely.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20021214151657.GB29286@cicely8.cicely.de> User-Agent: Mutt/1.5.1i Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Sat, Dec 14, 2002 at 04:16:58PM +0100, Bernd Walter wrote: > On Tue, Dec 10, 2002 at 06:34:22PM +0000, Josef Karthauser wrote: > > If you need -current i386/ohci or alpha/ohci tests then let me know. > It'll take some time to setup an alpha testing environment, but it's > possible for me to do. I can test on ia64 (both uhci and ohci). Maxime: I can test if_fxp on ia64. JFYI, -- Marcel Moolenaar USPA: A-39004 marcel@xcllnt.net To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message From owner-freebsd-arch Sat Dec 14 20:38:13 2002 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 9755137B401 for ; Sat, 14 Dec 2002 20:38:12 -0800 (PST) Received: from puffin.mail.pas.earthlink.net (puffin.mail.pas.earthlink.net [207.217.120.139]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3252843EC5 for ; Sat, 14 Dec 2002 20:38:12 -0800 (PST) (envelope-from tlambert2@mindspring.com) Received: from [216.20.231.174] (helo=mindspring.com) by puffin.mail.pas.earthlink.net with asmtp (SSLv3:RC4-MD5:128) (Exim 3.33 #1) id 18NQXb-0002dk-00; Sat, 14 Dec 2002 20:38:11 -0800 Message-ID: <3DFC06E4.9474F4C2@mindspring.com> Date: Sat, 14 Dec 2002 20:36:52 -0800 From: Terry Lambert X-Mailer: Mozilla 4.79 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: Nathan Arun Cc: arch@freebsd.org Subject: Re: Threads in FreeBSD References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-ELNK-Trace: b1a02af9316fbb217a47c185c03b154d40683398e744b8a48baad45a872577806ad107ba72dfb48ca8438e0f32a48e08350badd9bab72f9c350badd9bab72f9c Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Nathan Arun wrote: > I'm not a kernel programmer and wouldn't know the relative merits of > different threading architectures. Purely as an FYI, here is a white paper I > came across on the internet. This is by a Redhat developer: > http://people.redhat.com/drepper/nptl-design.pdf, who argues that 1-on-1 > implementation is the best. And some benchmarks to prove it is here: > http://www.onlamp.com/pub/a/onlamp/2002/11/07/linux_threads.html?page=2 > (though this is Linux) This paper has been commented on before. The test programs used for the benchmarks are not representative of a general purpose computer with a mixed load, and only give good numbers when the system load is low and homogenous. Please see the list archives for details. If you are really interested in this, the original KSE discussions were in usenet news groups from 1994 and again in 1996. One of the participants was the architect of the threads in Solaris. The 1:1 model is definitely suboptimal, since it increases kernel/user boundary crossing frequency significantly. The Linux argument is that their implementation of this crossing has low overhead on x86 architectures. My initial complaints about the Solaris/SVR4 model in the 1994 discussion were in the context of non-use of threads for an internal product at Novell/USG (the former USL) at the time. -- Terry To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message From owner-freebsd-arch Sat Dec 14 21:22:43 2002 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 3FFC237B401 for ; Sat, 14 Dec 2002 21:22:42 -0800 (PST) Received: from gnuppy.monkey.org (wsip68-15-8-100.sd.sd.cox.net [68.15.8.100]) by mx1.FreeBSD.org (Postfix) with ESMTP id CDFC543EC5 for ; Sat, 14 Dec 2002 21:22:41 -0800 (PST) (envelope-from billh@gnuppy.monkey.org) Received: from billh by gnuppy.monkey.org with local (Exim 3.36 #1 (Debian)) id 18NRET-0001Te-00; Sat, 14 Dec 2002 21:22:29 -0800 Date: Sat, 14 Dec 2002 21:22:28 -0800 To: Terry Lambert Cc: Nathan Arun , arch@freebsd.org, "Bill Huey (Hui)" Subject: Re: Threads in FreeBSD Message-ID: <20021215052228.GA5677@gnuppy.monkey.org> References: <3DFC06E4.9474F4C2@mindspring.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3DFC06E4.9474F4C2@mindspring.com> User-Agent: Mutt/1.4i From: Bill Huey (Hui) Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Sat, Dec 14, 2002 at 08:36:52PM -0800, Terry Lambert wrote: > If you are really interested in this, the original KSE discussions > were in usenet news groups from 1994 and again in 1996. One of > the participants was the architect of the threads in Solaris. The > 1:1 model is definitely suboptimal, since it increases kernel/user > boundary crossing frequency significantly. The Linux argument is > that their implementation of this crossing has low overhead on x86 > architectures. My initial complaints about the Solaris/SVR4 model > in the 1994 discussion were in the context of non-use of threads > for an internal product at Novell/USG (the former USL) at the time. They, Linux kernel folks, were complaining about sucky syscall performance recently with the P4 against the P3: http://marc.theaimsgroup.com/?l=linux-kernel&m=103942289025149&w=2 bill To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message