From owner-freebsd-arch@FreeBSD.ORG Sun May 30 02:07:20 2004 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 4F6B816A4CE; Sun, 30 May 2004 02:07:20 -0700 (PDT) Received: from asterix.rsu.ru (asterix.rsu.ru [195.208.245.250]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4D36C43D5F; Sun, 30 May 2004 02:07:19 -0700 (PDT) (envelope-from bushman@rsu.ru) Received: from [195.208.252.82] (stinger.cc.rsu.ru [195.208.252.82]) by asterix.rsu.ru (8.12.11/8.12.11) with ESMTP id i4U970hF090924; Sun, 30 May 2004 13:07:00 +0400 (MSD) (envelope-from bushman@rsu.ru) From: Michael Bushkov To: freebsd-hackers@freebsd.org, freebsd-arch@freebsd.org Content-Type: text/plain Organization: Rostov State University Message-Id: <1085908242.2006.44.camel@stinger.cc.rsu.ru> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 Date: Sun, 30 May 2004 13:10:42 +0400 Content-Transfer-Encoding: 7bit X-Spam-Status: No, hits=-104.9 required=5.0 tests=AWL,BAYES_00, USER_IN_WHITELIST autolearn=ham version=2.63 X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on asterix.rsu.ru cc: and@rsu.ru cc: bmilekic@technokratis.com cc: nectar@freebsd.org cc: csjp@freebsd.org cc: os@rsu.ru cc: bork@rsu.ru Subject: lookupd 0.2a X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: bushman@rsu.ru List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 May 2004 09:07:20 -0000 Good day! We are glad to anounce a 0.2 version of LookupD implementation for FreeBSD. It was released under BSD license. Currently it has caching system and such modules as: files, dns and ldap. Besides, our modules structure is quite similar to current FreeBSD nsswitch modules structure, so it's quite easy to port existing modules. So as our ldap module is a port of nss_ldap. And it uses the same nss_ldap.conf file. You can download it from here: sources: http://www.rsu.ru/~bushman/lookupd/downloads/0_2_a/lookupd-0.2a.tar.gz port: http://www.rsu.ru/~bushman/lookupd/downloads/0_2_a/lookupd.tar.gz You can use lookupd by plugging it to the FreeBSD nsswitch system as a module (copy nss_lookupd.so to you libraries folder). If you install from port, it will be done automatically. For more information see manual for lookupd(8). We'll be very thankful for any help with testing and developing of this project. Michael Bushkov Rostov State University From owner-freebsd-arch@FreeBSD.ORG Sun May 30 11:42:15 2004 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 623B916A4CE for ; Sun, 30 May 2004 11:42:15 -0700 (PDT) Received: from mail-in-07.arcor-online.net (mail-in-07.arcor-online.net [151.189.21.47]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6630A43D2D for ; Sun, 30 May 2004 11:42:14 -0700 (PDT) (envelope-from mailnull@mips.inka.de) Received: from kemoauc.mips.inka.de (dsl-082-082-076-216.arcor-ip.net [82.82.76.216]) by mail-in-07.arcor-online.net (Postfix) with ESMTP id BCA3FE84BF for ; Sun, 30 May 2004 20:42:12 +0200 (CEST) Received: from kemoauc.mips.inka.de (localhost [127.0.0.1]) by kemoauc.mips.inka.de (8.12.11/8.12.10) with ESMTP id i4UIgC3n024798 for ; Sun, 30 May 2004 20:42:12 +0200 (CEST) (envelope-from mailnull@kemoauc.mips.inka.de) Received: (from mailnull@localhost) by kemoauc.mips.inka.de (8.12.11/8.12.11/Submit) id i4UIgBQZ024797 for freebsd-arch@freebsd.org; Sun, 30 May 2004 20:42:11 +0200 (CEST) (envelope-from mailnull) From: naddy@mips.inka.de (Christian Weisgerber) Date: Sun, 30 May 2004 18:42:11 +0000 (UTC) Message-ID: Originator: naddy@mips.inka.de (Christian Weisgerber) To: freebsd-arch@freebsd.org Subject: ether_crc32_[bl]e() 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: Sun, 30 May 2004 18:42:15 -0000 NetBSD and OpenBSD have two helper functions in if_ethersubr.c ether_crc32_le(const u_int8_t *buf, size_t len) ether_crc32_be(const u_int8_t *buf, size_t len) that will calculate an ethernet CRC-32 in little endian/big endian fashion. These CRCs are used all over our network drivers, e.g. for setting up multicast hash filters. Functions to calculate them are duplicated all over. These could be factored out of some thirty drivers. NetBSD has done so, btw. The patch below adds the functions to if_ethersubr.c and, as an example, switches re(4) to make use of this. 1. Do we want this? 2. If yes, there are probably stylistic issues I could use some help with. Index: net/ethernet.h =================================================================== RCS file: /home/ncvs/src/sys/net/ethernet.h,v retrieving revision 1.22 diff -u -r1.22 ethernet.h --- net/ethernet.h 14 Nov 2002 23:28:47 -0000 1.22 +++ net/ethernet.h 30 May 2004 16:06:22 -0000 @@ -358,6 +358,8 @@ struct mbuf *, struct sockaddr *, struct rtentry *); extern int ether_output_frame(struct ifnet *, struct mbuf *); extern char *ether_sprintf(const u_int8_t *); +uint32_t ether_crc32_le(const uint8_t *, size_t); +uint32_t ether_crc32_be(const uint8_t *, size_t); #else /* _KERNEL */ Index: net/if_ethersubr.c =================================================================== RCS file: /home/ncvs/src/sys/net/if_ethersubr.c,v retrieving revision 1.169 diff -u -r1.169 if_ethersubr.c --- net/if_ethersubr.c 25 Apr 2004 09:24:51 -0000 1.169 +++ net/if_ethersubr.c 30 May 2004 16:05:49 -0000 @@ -878,6 +878,77 @@ SYSCTL_INT(_net_link_ether, OID_AUTO, ipfw, CTLFLAG_RW, ðer_ipfw,0,"Pass ether pkts through firewall"); +#if 0 +/* + * This is for reference. We have a table-driven version + * of the little-endian crc32 generator, which is faster + * than the double-loop. + */ +uint32_t +ether_crc32_le(const uint8_t *buf, size_t len) +{ + uint32_t crc; + size_t i, bit; + uint8_t data; + + crc = 0xffffffff; /* initial value */ + + for (i = 0; i < len; i++) { + for (data = *buf++, bit = 0; bit < 8; bit++, data >>= 1) + carry = (crc ^ data) & 1; + crc >>= 1; + if (carry) + crc = (crc ^ ETHER_CRC_POLY_LE); + } + + return (crc); +} +#else +uint32_t +ether_crc32_le(const uint8_t *buf, size_t len) +{ + static const uint32_t crctab[] = { + 0x00000000, 0x1db71064, 0x3b6e20c8, 0x26d930ac, + 0x76dc4190, 0x6b6b51f4, 0x4db26158, 0x5005713c, + 0xedb88320, 0xf00f9344, 0xd6d6a3e8, 0xcb61b38c, + 0x9b64c2b0, 0x86d3d2d4, 0xa00ae278, 0xbdbdf21c + }; + uint32_t crc; + size_t i; + + crc = 0xffffffff; /* initial value */ + + for (i = 0; i < len; i++) { + crc ^= buf[i]; + crc = (crc >> 4) ^ crctab[crc & 0xf]; + crc = (crc >> 4) ^ crctab[crc & 0xf]; + } + + return (crc); +} +#endif + +uint32_t +ether_crc32_be(const u_int8_t *buf, size_t len) +{ + uint32_t crc, carry; + size_t i, bit; + uint8_t data; + + crc = 0xffffffff; /* initial value */ + + for (i = 0; i < len; i++) { + for (data = *buf++, bit = 0; bit < 8; bit++, data >>= 1) { + carry = ((crc & 0x80000000) ? 1 : 0) ^ (data & 0x01); + crc <<= 1; + if (carry) + crc = (crc ^ ETHER_CRC_POLY_BE) | carry; + } + } + + return (crc); +} + int ether_ioctl(struct ifnet *ifp, int command, caddr_t data) { Index: dev/re/if_re.c =================================================================== RCS file: /home/ncvs/src/sys/dev/re/if_re.c,v retrieving revision 1.23 diff -u -r1.23 if_re.c --- dev/re/if_re.c 24 May 2004 19:39:23 -0000 1.23 +++ dev/re/if_re.c 30 May 2004 16:42:17 -0000 @@ -225,7 +225,6 @@ static int re_miibus_writereg (device_t, int, int, int); static void re_miibus_statchg (device_t); -static uint32_t re_mchash (const uint8_t *); static void re_setmulti (struct rl_softc *); static void re_reset (struct rl_softc *); @@ -573,33 +572,6 @@ } /* - * Calculate CRC of a multicast group address, return the upper 6 bits. - */ -static uint32_t -re_mchash(addr) - const uint8_t *addr; -{ - uint32_t crc, carry; - int idx, bit; - uint8_t data; - - /* Compute CRC for the address value. */ - crc = 0xFFFFFFFF; /* initial value */ - - for (idx = 0; idx < 6; idx++) { - for (data = *addr++, bit = 0; bit < 8; bit++, data >>= 1) { - carry = ((crc & 0x80000000) ? 1 : 0) ^ (data & 0x01); - crc <<= 1; - if (carry) - crc = (crc ^ 0x04c11db6) | carry; - } - } - - /* return the filter bit position */ - return(crc >> 26); -} - -/* * Program the 64-bit multicast hash filter. */ static void @@ -633,7 +605,8 @@ TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) { if (ifma->ifma_addr->sa_family != AF_LINK) continue; - h = re_mchash(LLADDR((struct sockaddr_dl *)ifma->ifma_addr)); + h = ether_crc32_be(LLADDR((struct sockaddr_dl *) + ifma->ifma_addr), ETHER_ADDR_LEN) >> 26; if (h < 32) hashes[0] |= (1 << h); else -- Christian "naddy" Weisgerber naddy@mips.inka.de From owner-freebsd-arch@FreeBSD.ORG Sun May 30 12:56:30 2004 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 0D2AB16A4CE for ; Sun, 30 May 2004 12:56:30 -0700 (PDT) Received: from pfepc.post.tele.dk (pfepc.post.tele.dk [195.41.46.237]) by mx1.FreeBSD.org (Postfix) with ESMTP id 945F143D31 for ; Sun, 30 May 2004 12:56:29 -0700 (PDT) (envelope-from phk@phk.freebsd.dk) Received: from critter.freebsd.dk (0x50c7994c.naenxx7.adsl-dhcp.tele.dk [80.199.153.76]) by pfepc.post.tele.dk (Postfix) with ESMTP id 15BED26288C; Sun, 30 May 2004 21:56:19 +0200 (CEST) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.12.11/8.12.11) with ESMTP id i4UJuImk098762; Sun, 30 May 2004 21:56:19 +0200 (CEST) (envelope-from phk@phk.freebsd.dk) To: naddy@mips.inka.de (Christian Weisgerber) From: "Poul-Henning Kamp" In-Reply-To: Your message of "Sun, 30 May 2004 18:42:11 -0000." Date: Sun, 30 May 2004 21:56:18 +0200 Message-ID: <98761.1085946978@critter.freebsd.dk> cc: freebsd-arch@freebsd.org Subject: Re: ether_crc32_[bl]e() 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: Sun, 30 May 2004 19:56:30 -0000 In message , Christian Weisgerber writes: >NetBSD and OpenBSD have two helper functions in if_ethersubr.c > >ether_crc32_le(const u_int8_t *buf, size_t len) >ether_crc32_be(const u_int8_t *buf, size_t len) > >that will calculate an ethernet CRC-32 in little endian/big endian >fashion. > >These CRCs are used all over our network drivers, e.g. for setting >up multicast hash filters. Functions to calculate them are duplicated >all over. These could be factored out of some thirty drivers. >NetBSD has done so, btw. > >The patch below adds the functions to if_ethersubr.c and, as an >example, switches re(4) to make use of this. > >1. Do we want this? In general for stuff like this, if you save more than a handful of lines in more than a handful of drivers you can assume that we want it. -- 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. From owner-freebsd-arch@FreeBSD.ORG Mon May 31 01:58:40 2004 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 690BB16A4CE for ; Mon, 31 May 2004 01:58:40 -0700 (PDT) Received: from hanoi.cronyx.ru (hanoi.cronyx.ru [144.206.181.53]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3259143D48 for ; Mon, 31 May 2004 01:58:39 -0700 (PDT) (envelope-from rik@cronyx.ru) Received: (from root@localhost) by hanoi.cronyx.ru id i4V8uETx026284 for arch@freebsd.org.checked; (8.12.8/vak/2.1) Mon, 31 May 2004 12:56:14 +0400 (MSD) (envelope-from rik@cronyx.ru) Received: from cronyx.ru (hi.cronyx.ru [144.206.181.94]) by hanoi.cronyx.ru with ESMTP id i4V8sYp2026219; (8.12.8/vak/2.1) Mon, 31 May 2004 12:54:34 +0400 (MSD) (envelope-from rik@cronyx.ru) Message-ID: <40BAF304.5000802@cronyx.ru> Date: Mon, 31 May 2004 12:55:32 +0400 From: Roman Kurakin User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.6b) Gecko/20031208 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Kirk McKusick References: <200405282055.i4SKtOU9028071@beastie.mckusick.com> In-Reply-To: <200405282055.i4SKtOU9028071@beastie.mckusick.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit cc: arch@freebsd.org Subject: Re: The Design and Implementation of the FreeBSD Operating System 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, 31 May 2004 08:58:40 -0000 Thanks! Kirk McKusick wrote: >>Date: Fri, 28 May 2004 18:13:01 +0400 >>From: Roman Kurakin >>To: Kirk McKusick >>CC: arch@freebsd.org >>Subject: Re: The Design and Implementation of the FreeBSD Operating System >>X-ASK-Info: Our key was found in the mail >>Kirk McKusick wrote: >> >> >>>My forthcoming book, ``The Design and Implementation of the FreeBSD >>>Operating System'' can now be pre-ordered from Amazon.com, see >>>http://tinyurl.com/2bklt. Details on its coverage can be found >>>at http://www.mckusick.com/FreeBSDbook.html. >>> Kirk McKusick >>> >>> >>Any discounts for commiters? >> >>rik >> >> > >I have not been successful in getting discounts in the past as this >book is put out through the textbook side of Addison-Wesley. Since >they have a lock on the student market - that is students generally >have to buy the books for their classes - the books just sell for >list price. I can get a 10% discount if I buy 50 books, but by the >time I pay to ship them the savings is lost over paying list price >to Amazon.com and getting free shipping. So far at least even >Amazon.com is offering no discount and they have a bit more leverage >than I do :-) Anyway, if I do find out about a better deal, I will >let you (and the other committers) know. > > Kirk McKusick >_______________________________________________ >freebsd-arch@freebsd.org mailing list >http://lists.freebsd.org/mailman/listinfo/freebsd-arch >To unsubscribe, send any mail to "freebsd-arch-unsubscribe@freebsd.org" > > > > From owner-freebsd-arch@FreeBSD.ORG Mon May 31 08:11:06 2004 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 CCE7216A4CE for ; Mon, 31 May 2004 08:11:06 -0700 (PDT) Received: from ioskeha.hittite.isp.9tel.net (ioskeha.hittite.isp.9tel.net [62.62.156.27]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1BEF143D31 for ; Mon, 31 May 2004 08:11:06 -0700 (PDT) (envelope-from clefevre-lists@9online.fr) Received: from pc2k (200-62-118-80.kaptech.net [80.118.62.200]) by ioskeha.hittite.isp.9tel.net (Postfix) with SMTP id 457B017B577; Mon, 31 May 2004 17:11:43 +0200 (CEST) Message-ID: <05ff01c44721$7239cce0$7890a8c0@dyndns.org> From: "Cyrille Lefevre" To: , "Garance A Drosihn" References: Date: Mon, 31 May 2004 17:08:47 +0200 Organization: ACME MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1409 X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 Subject: Re: Change to "kludge option processing" in /bin/ps 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, 31 May 2004 15:11:07 -0000 "Garance A Drosihn" wrote: > After staring at the kludge-option processing in `ps' for awhile, I > found enough edge-cases where it simply did not work "right" (for my > definition of "right", at keast...), so I rewrote it. As part of that, > I also removed the ancient "BACKWARD_COMPATIBILITY" compile-time > option, where: > ps -options arg1 arg2 > (with no '-' on "arg1" and "arg2") was treated as: > ps -options -N arg1 -M arg2 how about to keep the historical compability if there is no `-' and to get rid of it if there is a trailing `-' ? > I did this because I have often been puzzled/annoyed when I type: > ps 12 > to get process 12, and then realize I wanted it shown in a > different format so I type: > ps -u 12 well, this should be fixed, but w/o breaking the historical compability. > and I get a completely different list of processes, or I type: > ps 12 34 old plain ps does not support multiple process IDs, the newer one would, at most, accept "ps '12 34'" or "ps '12,34'", but not "ps 12 34". > and I only see process 12, or I type > ps 12 34 56 > and get the error message: > ps: 56: No such file or directory > This BACKWARD_COMPATIBILITY is not documented in the usage() > or the man page, so I'd like to replace it. this is historical and should not be touch even if not documented, or better, this has to be documented. > So, I changed `ps' to check for any additional arguments after > processing all '-'-options, and if those start with a digit then > `ps' will try to use the entire argument as a pid or pidlist. > If an extra argument does not start with a digit, then `ps' just > prints an error and exits. so, the historical behaviour of ps will be broken :( > I want to do more testing on this before committing, but I thought > that all this was enough of a change that I should also give people > a chance to scream before I commit it. Also, I'm not sure if I > might have clobbered some subtle aspect of the kludge processing. before to commit new changes, think about how to fix the following ones :) # ps -p ,, PID TT STAT TIME COMMAND 0 ?? ZW 0:00.00 (sshd) # psx -p ,, psx: no process id specified # ps -p 1, PID TT STAT TIME COMMAND 0 ?? ZW 0:00.00 (sshd) # psx -p 1, psx: no process id specified PID TTY TIME COMMAND 1 ?? 00:00:07 init PS : as you can see, the changes I proposed does work in such cases :P also, what about the proposed changes I have submitted ? http://www.freebsd.org/cgi/query-pr.cgi?pr=bin/65803 the next step will be the dynamic field sizing and probably the support of "-k sortlist" option, both from NetBSD. > If anyone wants to try the update, it is available at: > > http://people.freebsd.org/~gad/ps-kludge.diff > > [disclaimer: at the moment it's only had about 15 minutes of > testing, but I *think* this is about the way I want it to work] > > Assuming there aren't any major objections to these ideas, I plan > to do some more testing on this and commit it next weekend. as said before, I dislike the change as proposed, but would accept it w/ a little more work. Cyrille Lefevre. -- home: mailto:cyrille.lefevre@laposte.net From owner-freebsd-arch@FreeBSD.ORG Mon May 31 09:45:16 2004 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from green.homeunix.org (freefall.freebsd.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 2686916A4CE; Mon, 31 May 2004 09:45:16 -0700 (PDT) Received: from green.homeunix.org (green@localhost [127.0.0.1]) by green.homeunix.org (8.12.11/8.12.11) with ESMTP id i4VGjFe4013978; Mon, 31 May 2004 12:45:15 -0400 (EDT) (envelope-from green@green.homeunix.org) Received: (from green@localhost) by green.homeunix.org (8.12.11/8.12.11/Submit) id i4VGjEVN013974; Mon, 31 May 2004 12:45:14 -0400 (EDT) (envelope-from green) Date: Mon, 31 May 2004 12:45:14 -0400 From: Brian Feldman To: Christian Weisgerber Message-ID: <20040531164514.GA7776@green.homeunix.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.6i cc: freebsd-arch@freebsd.org Subject: Re: ether_crc32_[bl]e() 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, 31 May 2004 16:45:16 -0000 On Sun, May 30, 2004 at 06:42:11PM +0000, Christian Weisgerber wrote: > NetBSD and OpenBSD have two helper functions in if_ethersubr.c > > ether_crc32_le(const u_int8_t *buf, size_t len) > ether_crc32_be(const u_int8_t *buf, size_t len) > [...] > The patch below adds the functions to if_ethersubr.c and, as an > example, switches re(4) to make use of this. > > 1. Do we want this? Yeah :) > 2. If yes, there are probably stylistic issues I could use some > help with. Here are what looks like style bugs to me: The header changes aren't using tabs to line up the function names and return values with the ones in the rest of the prototypes, and should be sorted in lexically, besides. Inside the functions, size_t may or may not be larger than uint32_t, but should never be smaller on FreeBSD, so it should come sorted before them. I'm not sure if it is a style bug to perpetuate BSD u_intsize_t when uintsize_t is standardized and available as well. -- Brian Fundakowski Feldman \'[ FreeBSD ]''''''''''\ <> green@FreeBSD.org \ The Power to Serve! \ Opinions expressed are my own. \,,,,,,,,,,,,,,,,,,,,,,\ From owner-freebsd-arch@FreeBSD.ORG Mon May 31 10:24:35 2004 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 D765A16A4CE; Mon, 31 May 2004 10:24:35 -0700 (PDT) Received: from harmony.village.org (rover.village.org [168.103.84.182]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4CF5A43D5E; Mon, 31 May 2004 10:24:35 -0700 (PDT) (envelope-from imp@bsdimp.com) Received: from localhost (warner@rover2.village.org [10.0.0.1]) by harmony.village.org (8.12.11/8.12.11) with ESMTP id i4VHKWHX097296; Mon, 31 May 2004 11:20:35 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Mon, 31 May 2004 11:20:57 -0600 (MDT) Message-Id: <20040531.112057.52958848.imp@bsdimp.com> To: green@freebsd.org From: "M. Warner Losh" In-Reply-To: <20040531164514.GA7776@green.homeunix.org> References: <20040531164514.GA7776@green.homeunix.org> X-Mailer: Mew version 3.3 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit cc: naddy@mips.inka.de cc: freebsd-arch@freebsd.org Subject: Re: ether_crc32_[bl]e() 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, 31 May 2004 17:24:36 -0000 In message: <20040531164514.GA7776@green.homeunix.org> Brian Feldman writes: : On Sun, May 30, 2004 at 06:42:11PM +0000, Christian Weisgerber wrote: : > NetBSD and OpenBSD have two helper functions in if_ethersubr.c : > : > ether_crc32_le(const u_int8_t *buf, size_t len) : > ether_crc32_be(const u_int8_t *buf, size_t len) : > [...] : > The patch below adds the functions to if_ethersubr.c and, as an : > example, switches re(4) to make use of this. : > : > 1. Do we want this? : : Yeah :) I think so too. I had something like this on my list after I found a very badly implemented big endian crc routine whose provenance was in question. So this is excellent timing. : I'm not sure if : it is a style bug to perpetuate BSD u_intsize_t when uintsize_t is : standardized and available as well. I'd say that it is, since style(9) says we're moving towards that as well. Warner From owner-freebsd-arch@FreeBSD.ORG Mon May 31 10:30:01 2004 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 17C4B16A4CE for ; Mon, 31 May 2004 10:30:01 -0700 (PDT) Received: from harmony.village.org (rover.village.org [168.103.84.182]) by mx1.FreeBSD.org (Postfix) with ESMTP id A804B43D49 for ; Mon, 31 May 2004 10:30:00 -0700 (PDT) (envelope-from imp@bsdimp.com) Received: from localhost (warner@rover2.village.org [10.0.0.1]) by harmony.village.org (8.12.11/8.12.11) with ESMTP id i4VHSqMl097380; Mon, 31 May 2004 11:28:52 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Mon, 31 May 2004 11:29:17 -0600 (MDT) Message-Id: <20040531.112917.111988212.imp@bsdimp.com> To: naddy@mips.inka.de From: "M. Warner Losh" In-Reply-To: References: X-Mailer: Mew version 3.3 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit cc: freebsd-arch@freebsd.org Subject: Re: ether_crc32_[bl]e() 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, 31 May 2004 17:30:01 -0000 In message: naddy@mips.inka.de (Christian Weisgerber) writes: : NetBSD and OpenBSD have two helper functions in if_ethersubr.c : : ether_crc32_le(const u_int8_t *buf, size_t len) ------------------------^^^^^^^^ uint8_t : ether_crc32_be(const u_int8_t *buf, size_t len) ------------------------^^^^^^^^ uint8_t : These CRCs are used all over our network drivers, e.g. for setting : up multicast hash filters. Functions to calculate them are duplicated : all over. These could be factored out of some thirty drivers. : NetBSD has done so, btw. ... The other comment that I have about this stuff is to make sure that if you are directly copying these routines form somewhere, you make sure that you give proper credit in the if_ethersubr.c file. : +ether_crc32_be(const u_int8_t *buf, size_t len) ------------------------^^^^^^^^ uint8_t Warner From owner-freebsd-arch@FreeBSD.ORG Mon May 31 16:48:34 2004 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 6268916A4CE for ; Mon, 31 May 2004 16:48:34 -0700 (PDT) Received: from smtp2.server.rpi.edu (smtp2.server.rpi.edu [128.113.2.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id D6E3C43D39 for ; Mon, 31 May 2004 16:48:33 -0700 (PDT) (envelope-from drosih@rpi.edu) Received: from [128.113.24.47] (gilead.netel.rpi.edu [128.113.24.47]) by smtp2.server.rpi.edu (8.12.8/8.12.8) with ESMTP id i4VNmDIX031131; Mon, 31 May 2004 19:48:33 -0400 Mime-Version: 1.0 X-Sender: drosih@mail.rpi.edu Message-Id: In-Reply-To: <05ff01c44721$7239cce0$7890a8c0@dyndns.org> References: <05ff01c44721$7239cce0$7890a8c0@dyndns.org> Date: Mon, 31 May 2004 19:48:11 -0400 To: "Cyrille Lefevre" , From: Garance A Drosihn Content-Type: text/plain; charset="us-ascii" ; format="flowed" X-Scanned-By: CanIt (www . canit . ca) Subject: Re: Change to "kludge option processing" in /bin/ps 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, 31 May 2004 23:48:34 -0000 At 5:08 PM +0200 5/31/04, Cyrille Lefevre wrote: >also, what about the proposed changes I have submitted ? I never got an answer from the last two or three messages I sent to you, so I am going ahead with bits of your changes and bits of my own pending changes. -- Garance Alistair Drosehn = gad@gilead.netel.rpi.edu Senior Systems Programmer or gad@freebsd.org Rensselaer Polytechnic Institute or drosih@rpi.edu From owner-freebsd-arch@FreeBSD.ORG Mon May 31 20:36:13 2004 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 41CD216A4CE for ; Mon, 31 May 2004 20:36:13 -0700 (PDT) Received: from smtp2.server.rpi.edu (smtp2.server.rpi.edu [128.113.2.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id BD41143D49 for ; Mon, 31 May 2004 20:36:12 -0700 (PDT) (envelope-from drosih@rpi.edu) Received: from [128.113.24.47] (gilead.netel.rpi.edu [128.113.24.47]) by smtp2.server.rpi.edu (8.12.8/8.12.8) with ESMTP id i513aAIX024542; Mon, 31 May 2004 23:36:10 -0400 Mime-Version: 1.0 X-Sender: drosih@mail.rpi.edu Message-Id: In-Reply-To: <05ff01c44721$7239cce0$7890a8c0@dyndns.org> References: <05ff01c44721$7239cce0$7890a8c0@dyndns.org> Date: Mon, 31 May 2004 23:36:09 -0400 To: "Cyrille Lefevre" , From: Garance A Drosihn Content-Type: text/plain; charset="us-ascii" ; format="flowed" X-Scanned-By: CanIt (www . canit . ca) Subject: Re: Change to "kludge option processing" in /bin/ps 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, 01 Jun 2004 03:36:13 -0000 At 5:08 PM +0200 5/31/04, Cyrille Lefevre wrote: > >before to commit new changes, think about how to fix the >following ones :) > ># ps -p ,, > PID TT STAT TIME COMMAND > 0 ?? ZW 0:00.00 (sshd) ># psx -p ,, >psx: no process id specified The above issue was pretty trivial to fix, and I have committed a change which should fix it. -- Garance Alistair Drosehn = gad@gilead.netel.rpi.edu Senior Systems Programmer or gad@freebsd.org Rensselaer Polytechnic Institute or drosih@rpi.edu From owner-freebsd-arch@FreeBSD.ORG Mon May 31 21:25:06 2004 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 ECF7116A4CE for ; Mon, 31 May 2004 21:25:06 -0700 (PDT) Received: from beastie.mckusick.com (dsl081-247-227.sfo1.dsl.speakeasy.net [64.81.247.227]) by mx1.FreeBSD.org (Postfix) with ESMTP id E067D43D48 for ; Mon, 31 May 2004 21:25:04 -0700 (PDT) (envelope-from mckusick@mckusick.com) Received: from beastie.mckusick.com (localhost [127.0.0.1]) by beastie.mckusick.com (8.12.8/8.12.9) with ESMTP id i512H0Da003044 for ; Mon, 31 May 2004 19:17:00 -0700 (PDT) (envelope-from mckusick@beastie.mckusick.com) Message-Id: <200406010217.i512H0Da003044@beastie.mckusick.com> To: arch@freebsd.org Date: Mon, 31 May 2004 19:17:00 -0700 From: Kirk McKusick Subject: Possible Discounts on Design and Implementation of the FreeBSD OS 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, 01 Jun 2004 04:25:07 -0000 ------- Forwarded Message Date: Mon, 31 May 2004 20:35:56 -0400 From: Ben Thomas To: mckusick@mckusick.com Subject: fyi - Book discounts on D&I of FreeBSD OS FWIW, bookpool.com generally offers discounts on many technical books. Their approach is to buy in volume and pass on the savings. Indeed, they often pass on savings on UPS rates to commercial addresses. I have found them reputable, fast and dependable. Example, your older book is currently 22% off. I don't recall at what discount level I purchased it, but it was certainly at discount. http://www.bookpool.com/.x/inw82iqyz8/ss/1?qs=mckusick&Go.x=0&Go.y=0&Go=Go Pass this on if you find it a useful data point. -b ------- End of Forwarded Message From owner-freebsd-arch@FreeBSD.ORG Tue Jun 1 02:37:52 2004 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 A819A16A4CE; Tue, 1 Jun 2004 02:37:52 -0700 (PDT) Received: from mailout07.sul.t-online.com (mailout07.sul.t-online.com [194.25.134.83]) by mx1.FreeBSD.org (Postfix) with ESMTP id E1DB543D48; Tue, 1 Jun 2004 02:37:49 -0700 (PDT) (envelope-from Alexander@Leidinger.net) Received: from fwd00.aul.t-online.de by mailout07.sul.t-online.com with smtp id 1BV5iK-0003t2-01; Tue, 01 Jun 2004 11:37:44 +0200 Received: from Andro-Beta.Leidinger.net (SalNgOZVgepw4V4e4+Ge7lad5rFrGme735kwmqPdrwXqrylBUSqErF@[84.128.204.101]) by fmrl00.sul.t-online.com with esmtp id 1BV5hZ-0QY2l60; Tue, 1 Jun 2004 11:36:57 +0200 Received: from Magellan.Leidinger.net (Magellan.Leidinger.net [192.168.1.1]) i519b5Lf054113; Tue, 1 Jun 2004 11:37:05 +0200 (CEST) (envelope-from Alexander@Leidinger.net) Date: Tue, 1 Jun 2004 11:38:25 +0200 From: Alexander Leidinger To: "M. Warner Losh" Message-Id: <20040601113825.54e5b57b@Magellan.Leidinger.net> In-Reply-To: <20040531.112057.52958848.imp@bsdimp.com> References: <20040531164514.GA7776@green.homeunix.org> <20040531.112057.52958848.imp@bsdimp.com> X-Mailer: Sylpheed version 0.9.10claws (GTK+ 1.2.10; i386-portbld-freebsd5.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Seen: false X-ID: SalNgOZVgepw4V4e4+Ge7lad5rFrGme735kwmqPdrwXqrylBUSqErF@t-dialin.net cc: naddy@mips.inka.de cc: freebsd-arch@freebsd.org Subject: Re: ether_crc32_[bl]e() 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, 01 Jun 2004 09:37:52 -0000 On Mon, 31 May 2004 11:20:57 -0600 (MDT) "M. Warner Losh" wrote: > In message: <20040531164514.GA7776@green.homeunix.org> > Brian Feldman writes: > : On Sun, May 30, 2004 at 06:42:11PM +0000, Christian Weisgerber wrote: > : > NetBSD and OpenBSD have two helper functions in if_ethersubr.c > : > > : > ether_crc32_le(const u_int8_t *buf, size_t len) > : > ether_crc32_be(const u_int8_t *buf, size_t len) > : > [...] > : > The patch below adds the functions to if_ethersubr.c and, as an > : > example, switches re(4) to make use of this. > : > > : > 1. Do we want this? > : > : Yeah :) > > I think so too. I had something like this on my list after I found a > very badly implemented big endian crc routine whose provenance was in > question. So this is excellent timing. Is someone interested in improving our IP checksum code too? On i386 it uses assembly language which "works ok" with gcc 3.x (so far), but it isn't guaranteed it will work with future versions of gcc. Intels C compiler already has problems with it (and it's verified it's because of bugs in the asm code), so in case of the use of icc a C version is used. All other architectures use a C version ("MD" code, even if it could be made MI... at least it could be shared between the big and little endian architectures). Matthew Dillon rewrote the IP checksum code in dragonfly: ---snip--- Modified files: sys/conf files.i386 sys/i386/i386 in_cksum.c sys/i386/include in_cksum.h sys/netinet igmp.c in.h ip_icmp.c Added files: sys/i386/i386 in_cksum2.s Log: Rewrite the IP checksum code. Get rid of all the inline assembly garbage, get rid of old APIs that are no longer used, and build a new 'core' checksum function in C capable of handling any alignment. Add an assembly procedure (in its own file) for handling large blocks of 32-bit aligned data. This new code is better suited for modern cpus and should at least as good as the previous code, and it is far more portable. Note that in_cksum_hdr() still assumes 32 bit alignment. This will be fixed soon. Revision Changes Path 1.12 +1 -0 src/sys/conf/files.i386 1.4 +142 -558 src/sys/i386/i386/in_cksum.c 1.5 +33 -69 src/sys/i386/include/in_cksum.h 1.5 +2 -0 src/sys/netinet/igmp.c 1.6 +0 -1 src/sys/netinet/in.h 1.6 +2 -0 src/sys/netinet/ip_icmp.c ---snip--- If someone wants to look at this I can forward additional commit logs regarding this issue (e.g. moving in_cksum.h from MD to MI). Bye, Alexander. -- I'm available to get hired (preferred in .lu). http://www.Leidinger.net Alexander @ Leidinger.net GPG fingerprint = C518 BC70 E67F 143F BE91 3365 79E2 9C60 B006 3FE7 From owner-freebsd-arch@FreeBSD.ORG Tue Jun 1 08:19:34 2004 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from green.homeunix.org (freefall.freebsd.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 3C29D16A4CE for ; Tue, 1 Jun 2004 08:19:34 -0700 (PDT) Received: from green.homeunix.org (green@localhost [127.0.0.1]) by green.homeunix.org (8.12.11/8.12.11) with ESMTP id i51FJXoL027850 for ; Tue, 1 Jun 2004 11:19:33 -0400 (EDT) (envelope-from green@green.homeunix.org) Received: (from green@localhost) by green.homeunix.org (8.12.11/8.12.11/Submit) id i51FJXrs027849 for arch@FreeBSD.org; Tue, 1 Jun 2004 11:19:33 -0400 (EDT) (envelope-from green) Date: Tue, 1 Jun 2004 11:19:32 -0400 From: Brian Feldman To: arch@FreeBSD.org Message-ID: <20040601151932.GB26589@green.homeunix.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.6i Subject: once again, MP-safe kqueue... 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, 01 Jun 2004 15:19:34 -0000 I haven't seen anything about further work being done on kqueue recently, so I decided to go ahead and overhaul the implementation; it now seems to solve all reported issues, i.e. it doesn't deimplement EVFILT_PROC+NOTE_TRACK and allows recursing KNOTE() (knote()) calls. However, it doesn't have deadlock avoidance, so consumers that do that (mostly putting kqueues on kqueues) need to not cause ordering reversals. There is one subsystem lock still, just like the select(3) subsystem uses one, but each klist uses that to implement a single reader/writer recursive lock that is a subset of what lockmgr(9) can do. In fact, it is much like how vnodes are locked. There can be one reader, which must not sleep, signified by the thread pointer being NULL. There can be one writer which may sleep and drop the kqueue subsystem lock (klist interlock), signified by putting curthread in the klist's owner thread pointer. For knote (events), the kqueue subsystem (blocking) lock is acquired and then the klist is locked non-blockingly. For kqueue_register, the klist lock is blockingly acquired, which still works from knote() because the klist has already been locked and it only has to increase the recursion count. The kevent system call uses blocking acquisitions of knotes, but it does not sleep with them held, so it does not set the ownership thread pointer. Check out the following patch to try it out. I notice no instability, using kqueues heavily on SMP, and have reports of it functioning just fine elsewhere. Please let me know of any problems either conceptually or in the implementation. (I've not separated the two sets of changes to my local -CURRENT tree; the VM changes also appear to be perfectly stable, but are not slated for committing any time soon.) -- Brian Fundakowski Feldman \'[ FreeBSD ]''''''''''\ <> green@FreeBSD.org \ The Power to Serve! \ Opinions expressed are my own. \,,,,,,,,,,,,,,,,,,,,,,\ From owner-freebsd-arch@FreeBSD.ORG Tue Jun 1 11:29:49 2004 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 3CBD516A4CE for ; Tue, 1 Jun 2004 11:29:49 -0700 (PDT) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id 293A243D3F for ; Tue, 1 Jun 2004 11:29:49 -0700 (PDT) (envelope-from mux@freebsd.org) Received: by elvis.mu.org (Postfix, from userid 1920) id 22EFC5C836; Tue, 1 Jun 2004 11:29:49 -0700 (PDT) Date: Tue, 1 Jun 2004 20:29:49 +0200 From: Maxime Henrion To: arch@FreeBSD.org Message-ID: <20040601182949.GC9228@elvis.mu.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="xgyAXRrhYN0wYx8y" Content-Disposition: inline User-Agent: Mutt/1.4.2.1i Subject: The new dev sysctl tree 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, 01 Jun 2004 18:29:49 -0000 --xgyAXRrhYN0wYx8y Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi all, Dag-Erling recently committed some code that makes it extremely easy and convenient to have per-devices sysctl. I changed the fxp(4) driver to use this new framework for its sysctls, which allows to remove a bit of code from this driver. However, there is a significant drawback. For instance, what used to be "hw.fxp0.int_delay" is now called (on my box) : "dev.root0.nexus0.acpi0.pcib0.pci0.fxp0.int_delay". Obviously, this is really too long to be convenient to use. Furthermore, the name of this sysctl is not unique anymore. This is particularly annoying in some cases. For instance, if someone needs to boot without acpi while he's using it the rest of the time, the sysctl won't be named the same. So I made a patch to flatten this sysctl tree. This doesn't cause any conflict since attached drivers' names are unique. As a consequence, we lose the hierarchy information from the sysctl tree, however I believe this isn't a problem since we can get this information with devinfo(8) already. If for some reason, we really need the hierarchy information in this sysctl tree, I can easily add a .parent sysctl to each device node. I'm attaching the patch that flattens the sysctl tree to this mail. Opinions are of course welcome, but please, this isn't a call for yet another bikeshed of hell, so keep to the point. Cheers, Maxime --xgyAXRrhYN0wYx8y Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="dev_sysctl.patch" Index: subr_bus.c =================================================================== RCS file: /space2/ncvs/src/sys/kern/subr_bus.c,v retrieving revision 1.146 diff -u -p -r1.146 subr_bus.c --- subr_bus.c 26 May 2004 16:36:32 -0000 1.146 +++ subr_bus.c 31 May 2004 23:58:00 -0000 @@ -241,22 +241,13 @@ device_sysctl_handler(SYSCTL_HANDLER_ARG static void device_sysctl_init(device_t dev) { - struct sysctl_oid_list *parent_node; - if (dev->parent) { - if (dev->parent->sysctl_tree == NULL) - device_sysctl_init(dev->parent); - parent_node = SYSCTL_CHILDREN(dev->parent->sysctl_tree); - } else { - parent_node = SYSCTL_STATIC_CHILDREN(_dev); - } - if (dev->sysctl_tree != NULL) { - sysctl_move_oid(dev->sysctl_tree, parent_node); + if (dev->sysctl_tree != NULL) return; - } sysctl_ctx_init(&dev->sysctl_ctx); - dev->sysctl_tree = SYSCTL_ADD_NODE(&dev->sysctl_ctx, parent_node, - OID_AUTO, dev->nameunit, CTLFLAG_RD, 0, ""); + dev->sysctl_tree = SYSCTL_ADD_NODE(&dev->sysctl_ctx, + SYSCTL_STATIC_CHILDREN(_dev), OID_AUTO, dev->nameunit, + CTLFLAG_RD, 0, ""); SYSCTL_ADD_PROC(&dev->sysctl_ctx, SYSCTL_CHILDREN(dev->sysctl_tree), OID_AUTO, "%class", CTLFLAG_RD, dev, DEVICE_SYSCTL_CLASS, device_sysctl_handler, "A", --xgyAXRrhYN0wYx8y-- From owner-freebsd-arch@FreeBSD.ORG Tue Jun 1 23:56:38 2004 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 4BB2D16A4CE; Tue, 1 Jun 2004 23:56:38 -0700 (PDT) Received: from critter.freebsd.dk (critter.freebsd.dk [212.242.86.163]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7357343D1D; Tue, 1 Jun 2004 23:56:37 -0700 (PDT) (envelope-from phk@phk.freebsd.dk) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.12.11/8.12.11) with ESMTP id i526uZFG014403; Wed, 2 Jun 2004 08:56:36 +0200 (CEST) (envelope-from phk@phk.freebsd.dk) To: Maxime Henrion From: "Poul-Henning Kamp" In-Reply-To: Your message of "Tue, 01 Jun 2004 20:29:49 +0200." <20040601182949.GC9228@elvis.mu.org> Date: Wed, 02 Jun 2004 08:56:35 +0200 Message-ID: <14402.1086159395@critter.freebsd.dk> cc: arch@freebsd.org Subject: Re: The new dev sysctl tree 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: Wed, 02 Jun 2004 06:56:38 -0000 In message <20040601182949.GC9228@elvis.mu.org>, Maxime Henrion writes: >Dag-Erling recently committed some code that makes it extremely easy >and convenient to have per-devices sysctl. I changed the fxp(4) >driver to use this new framework for its sysctls, which allows to >remove a bit of code from this driver. > >However, there is a significant drawback. For instance, what used to >be "hw.fxp0.int_delay" is now called (on my box) : >"dev.root0.nexus0.acpi0.pcib0.pci0.fxp0.int_delay". This is one of the major reasons why I hate Solaris device handling :-) Flatten it please. -- 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. From owner-freebsd-arch@FreeBSD.ORG Wed Jun 2 03:50:40 2004 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 0703016A505; Wed, 2 Jun 2004 03:50:40 -0700 (PDT) Received: from smtp.des.no (flood.des.no [217.116.83.31]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5FA1C43D39; Wed, 2 Jun 2004 03:50:39 -0700 (PDT) (envelope-from des@des.no) Received: by smtp.des.no (Pony Express, from userid 666) id 25B845309; Wed, 2 Jun 2004 12:50:38 +0200 (CEST) Received: from dwp.des.no (des.no [80.203.228.37]) by smtp.des.no (Pony Express) with ESMTP id 9B3CD530E; Wed, 2 Jun 2004 12:50:31 +0200 (CEST) Received: by dwp.des.no (Postfix, from userid 2602) id 83ADC33CAA; Wed, 2 Jun 2004 12:50:31 +0200 (CEST) To: Maxime Henrion References: <20040601182949.GC9228@elvis.mu.org> From: des@des.no (=?iso-8859-1?q?Dag-Erling_Sm=F8rgrav?=) Date: Wed, 02 Jun 2004 12:50:31 +0200 In-Reply-To: <20040601182949.GC9228@elvis.mu.org> (Maxime Henrion's message of "Tue, 1 Jun 2004 20:29:49 +0200") Message-ID: User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on flood.des.no X-Spam-Level: X-Spam-Status: No, hits=0.0 required=5.0 tests=AWL autolearn=no version=2.63 cc: arch@FreeBSD.org Subject: Re: The new dev sysctl tree 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: Wed, 02 Jun 2004 10:50:40 -0000 Maxime Henrion writes: > So I made a patch to flatten this sysctl tree. This doesn't cause any > conflict since attached drivers' names are unique. As a consequence, > we lose the hierarchy information from the sysctl tree, however I > believe this isn't a problem since we can get this information with > devinfo(8) already. No objections from me. > If for some reason, we really need the hierarchy > information in this sysctl tree, I can easily add a .parent sysctl to > each device node. That would be nice. DES --=20 Dag-Erling Sm=F8rgrav - des@des.no From owner-freebsd-arch@FreeBSD.ORG Wed Jun 2 22:29:51 2004 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 BAA1916A4CE for ; Wed, 2 Jun 2004 22:29:51 -0700 (PDT) Received: from mail2.speakeasy.net (mail2.speakeasy.net [216.254.0.202]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7C44443D2D for ; Wed, 2 Jun 2004 22:29:51 -0700 (PDT) (envelope-from jmg@hydrogen.funkthat.com) Received: (qmail 5486 invoked from network); 3 Jun 2004 05:29:50 -0000 Received: from gate.funkthat.com (HELO hydrogen.funkthat.com) ([69.17.45.168]) (envelope-sender ) by mail2.speakeasy.net (qmail-ldap-1.03) with SMTP for ; 3 Jun 2004 05:29:50 -0000 Received: from hydrogen.funkthat.com (jajcho@localhost.funkthat.com [127.0.0.1])i535TnEx051897; Wed, 2 Jun 2004 22:29:50 -0700 (PDT) (envelope-from jmg@hydrogen.funkthat.com) Received: (from jmg@localhost) by hydrogen.funkthat.com (8.12.10/8.12.10/Submit) id i535TnTx051896; Wed, 2 Jun 2004 22:29:49 -0700 (PDT) Date: Wed, 2 Jun 2004 22:29:49 -0700 From: John-Mark Gurney To: Brian Feldman Message-ID: <20040603052949.GA44544@funkthat.com> Mail-Followup-To: Brian Feldman , arch@FreeBSD.org References: <20040601151932.GB26589@green.homeunix.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040601151932.GB26589@green.homeunix.org> User-Agent: Mutt/1.4.1i X-Operating-System: FreeBSD 4.2-RELEASE i386 X-PGP-Fingerprint: B7 EC EF F8 AE ED A7 31 96 7A 22 B3 D8 56 36 F4 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ X-Resume: http://resnet.uoregon.edu/~gurney_j/resume.html cc: arch@FreeBSD.org Subject: Re: once again, MP-safe kqueue... X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: John-Mark Gurney List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Jun 2004 05:29:51 -0000 Brian Feldman wrote this message on Tue, Jun 01, 2004 at 11:19 -0400: > I haven't seen anything about further work being done on kqueue > recently, so I decided to go ahead and overhaul the implementation; it I am waiting for information from work to confirm that I have permission to commit the work that I have done on kqueue so far. Once I have this go ahead, I'll release a patch that contains working per-kqueue locks for PROC, pipes and VFS... I have not tested AIO, and the socket code can not reliably be locked until the socket code is fixed to be locked properly... I'll probe them tomorrow. -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not." From owner-freebsd-arch@FreeBSD.ORG Thu Jun 3 14:21:02 2004 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 100C816A4CE for ; Thu, 3 Jun 2004 14:21:02 -0700 (PDT) Received: from harmony.village.org (rover.village.org [168.103.84.182]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7E88543D3F for ; Thu, 3 Jun 2004 14:21:01 -0700 (PDT) (envelope-from imp@bsdimp.com) Received: from localhost (warner@rover2.village.org [10.0.0.1]) by harmony.village.org (8.12.11/8.12.11) with ESMTP id i53LHQ3Z050083; Thu, 3 Jun 2004 15:17:27 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Thu, 03 Jun 2004 15:17:31 -0600 (MDT) Message-Id: <20040603.151731.118628002.imp@bsdimp.com> To: des@des.no From: "M. Warner Losh" In-Reply-To: References: <20040603.092954.114645644.imp@bsdimp.com> X-Mailer: Mew version 3.3 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable cc: arch@freebsd.org Subject: Re: cvs commit: src/sys/dev/fxp if_fxp.c if_fxpvar.h 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: Thu, 03 Jun 2004 21:21:02 -0000 In message: des@des.no (Dag-Erling Sm=F8rgrav) writes: : "M. Warner Losh" writes: : > des@des.no (Dag-Erling Sm=F8rgrav) writes: : > : "M. Warner Losh" writes: : > : > How about an API? How does the driver deal with the global/ins= tance : > : > variable split? If I set dev.fxp.gerbil to 1 and dev.fxp.1.ger= bil to : > : > 23? Is that order dependent? : > : that's up to the driver author to decide. : > That's why I want to know the API the driver will use so that it ca= n : > be judged as sufficient or not. I also think we should have some k= ind : > of default design pattern. : = : The API will be {devclass,device}_get_sysctl_{ctx,tree}(). The drive= r : then adds children to these nodes using sysctl_add_*(). We're going to wind up with the same code in a bunch of drivers for the global sysctls then. It will look like if (!devclass_get_sysctl("foo")) add_global_sysctl("foo"); add_local_sysctl(device_get_sysctl(), "foo"); This is going to lead to some drivers not having global settings for some systclts. The question that I was trying to ask is 'is this desirable?' Does it make sense to break symmetry like this? Maybe it does, but I guess I need to see what you do and play with it a little with cbb to see how well it works in practice... Warner From owner-freebsd-arch@FreeBSD.ORG Fri Jun 4 12:34:17 2004 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 6B98116A4CE for ; Fri, 4 Jun 2004 12:34:17 -0700 (PDT) Received: from ioskeha.hittite.isp.9tel.net (ioskeha.hittite.isp.9tel.net [62.62.156.27]) by mx1.FreeBSD.org (Postfix) with ESMTP id 253E443D1F for ; Fri, 4 Jun 2004 12:34:17 -0700 (PDT) (envelope-from root@gits.dyndns.org) Received: from mail.gits.dyndns.org (unknown [84.97.145.139]) by ioskeha.hittite.isp.9tel.net (Postfix) with ESMTP id 6D5A417B8AD for ; Fri, 4 Jun 2004 21:34:49 +0200 (CEST) Posted-Date: Fri, 4 Jun 2004 21:33:20 +0200 (CEST) X-Envelope-To: Received: from mail.gits.dyndns.org (IDENT:330a4h7n0yp01y32@localhost [127.0.0.1])i54JX2um082201 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Fri, 4 Jun 2004 21:33:20 +0200 (CEST) (envelope-from root@gits.dyndns.org) Received: (from root@localhost) by mail.gits.dyndns.org (8.12.11/8.12.11/Submit) id i54JX23v052074 for freebsd-arch@FreeBSD.org; Fri, 4 Jun 2004 21:33:02 +0200 (CEST) (envelope-from root) Message-Id: <200406041933.i54JX23v052074@mail.gits.dyndns.org> From: "Cyrille Lefevre" To: Date: Thu, 3 Jun 2004 22:12:40 +0200 Organization: ACME MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1409 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 X-UID: 6819 Sender: root@gits.dyndns.org X-Spam-Status: No, hits=-98.033 required=5 tests=DATE_IN_PAST_12_24,FORGED_MUA_OUTLOOK,USER_IN_WHITELIST X-Scanned-By: MIMEDefang 2.39 Subject: Re: Change to "kludge option processing" in /bin/ps 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: Fri, 04 Jun 2004 19:34:17 -0000 why this message does not reach -arch ? don't know if Garance reeived it also ? "Garance A Drosihn" wrote: > At 5:08 PM +0200 5/31/04, Cyrille Lefevre wrote: > >also, what about the proposed changes I have submitted ? > > I never got an answer from the last two or three messages I sent > to you, so I am going ahead with bits of your changes and bits > of my own pending changes. sorry, but I don't remember to have received anything recently, the last message from you was "So, my silence on `ps' is because I am too busy elsewhere..." on 27/04/2004 ! so, could you resend your last messages, if any ? thanks in advance. Cyrille Lefevre. -- home: mailto:cyrille.lefevre@laposte.net From owner-freebsd-arch@FreeBSD.ORG Fri Jun 4 12:40:55 2004 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 CE31F16A4CE for ; Fri, 4 Jun 2004 12:40:55 -0700 (PDT) Received: from ioskeha.hittite.isp.9tel.net (ioskeha.hittite.isp.9tel.net [62.62.156.27]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5353943D3F for ; Fri, 4 Jun 2004 12:40:55 -0700 (PDT) (envelope-from root@gits.dyndns.org) Received: from mail.gits.dyndns.org (unknown [84.97.145.139]) by ioskeha.hittite.isp.9tel.net (Postfix) with ESMTP id B4F5F17B833 for ; Fri, 4 Jun 2004 21:41:26 +0200 (CEST) Posted-Date: Fri, 4 Jun 2004 21:39:36 +0200 (CEST) X-Envelope-To: Received: from mail.gits.dyndns.org (IDENT:9g5v0hy498j0isih@localhost [127.0.0.1])i54JdFMt069945 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Fri, 4 Jun 2004 21:39:36 +0200 (CEST) (envelope-from root@gits.dyndns.org) Received: (from root@localhost) by mail.gits.dyndns.org (8.12.11/8.12.11/Submit) id i54JX9kj040764 for freebsd-arch@FreeBSD.org; Fri, 4 Jun 2004 21:33:09 +0200 (CEST) (envelope-from root) Message-Id: <200406041933.i54JX9kj040764@mail.gits.dyndns.org> From: "Cyrille Lefevre" To: Date: Thu, 3 Jun 2004 22:13:24 +0200 Organization: ACME MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1409 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 X-UID: 6820 Sender: root@gits.dyndns.org X-Spam-Status: No, hits=-98.033 required=5 tests=DATE_IN_PAST_12_24,FORGED_MUA_OUTLOOK,USER_IN_WHITELIST X-Scanned-By: MIMEDefang 2.39 Subject: Re: Change to "kludge option processing" in /bin/ps 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: Fri, 04 Jun 2004 19:40:55 -0000 why this message does not reach -arch ? don't know if Garance reeived it also ? "Garance A Drosihn" wrote: > At 5:08 PM +0200 5/31/04, Cyrille Lefevre wrote: > > > >before to commit new changes, think about how to fix the > >following ones :) > > > ># ps -p ,, > > PID TT STAT TIME COMMAND > > 0 ?? ZW 0:00.00 (sshd) > ># psx -p ,, > >psx: no process id specified > > The above issue was pretty trivial to fix, and I have committed a > change which should fix it. ok, let's try another issue : # ps -G " nobody " PID TT STAT TIME COMMAND 75483 con- S 0:10.97 /usr/local/sbin/junkbuster configfile # ps -G ,nobody, ps: Invalid (zero-length) group name ps: Invalid (zero-length) group name # ps -G , ps: Invalid (zero-length) group name ps: Invalid (zero-length) group name instead of : # ps -G " nobody " PID TT STAT TIME COMMAND 75483 co- S 0:10.97 /usr/local/sbin/junkbuster configfile # ps -G ,nobody, PID TT STAT TIME COMMAND 75483 co- S 0:10.97 /usr/local/sbin/junkbuster configfile # ps -G , psx: no group name or id specified why do you make a difference while parsing commas and spaces ? in other words, ignore empty values (which may be generated by a shell script, so, don't warn), except if all values are empty. Cyrille Lefevre. -- home: mailto:cyrille.lefevre@laposte.net From owner-freebsd-arch@FreeBSD.ORG Fri Jun 4 12:56:38 2004 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 C467416A4CE for ; Fri, 4 Jun 2004 12:56:38 -0700 (PDT) Received: from apollo.backplane.com (apollo.backplane.com [216.240.41.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9B04F43D39 for ; Fri, 4 Jun 2004 12:56:38 -0700 (PDT) (envelope-from dillon@apollo.backplane.com) Received: from apollo.backplane.com (localhost [127.0.0.1]) i54Jtw7Z053965; Fri, 4 Jun 2004 12:55:58 -0700 (PDT) (envelope-from dillon@apollo.backplane.com) Received: (from dillon@localhost) by apollo.backplane.com (8.12.9p2/8.12.9/Submit) id i54Jtv0V053964; Fri, 4 Jun 2004 12:55:57 -0700 (PDT) (envelope-from dillon) Date: Fri, 4 Jun 2004 12:55:57 -0700 (PDT) From: Matthew Dillon Message-Id: <200406041955.i54Jtv0V053964@apollo.backplane.com> To: Alexander Leidinger References: <20040531164514.GA7776@green.homeunix.org> <20040601113825.54e5b57b@Magellan.Leidinger.net> cc: naddy@mips.inka.de cc: freebsd-arch@freebsd.org Subject: New TCP/IP checksum code and a HOWTO on how to modernize and fix FreeBSD's FP-unit use in the kernel (was Re: ether_crc32_[bl]e()) 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: Fri, 04 Jun 2004 19:56:38 -0000 :Is someone interested in improving our IP checksum code too? : :On i386 it uses assembly language which "works ok" with gcc 3.x (so :far), but it isn't guaranteed it will work with future versions of gcc. :Intels C compiler already has problems with it (and it's verified it's :because of bugs in the asm code), so in case of the use of icc a C :version is used. : :All other architectures use a C version ("MD" code, even if it could be :made MI... at least it could be shared between the big and little endian :architectures). : :Matthew Dillon rewrote the IP checksum code in dragonfly: :---snip--- : Modified files: : sys/conf files.i386 : sys/i386/i386 in_cksum.c : sys/i386/include in_cksum.h : sys/netinet igmp.c in.h ip_icmp.c : Added files: : sys/i386/i386 in_cksum2.s : Log: : Rewrite the IP checksum code. Get rid of all the inline assembly garbage, : get rid of old APIs that are no longer used, and build a new 'core' checksum :... I should add that I finally got tired of the original checksum code failing at high -On optimization levels with GCC2 and GCC3, not to mention the ridiculously unreadable source that tried to optimize down to the byte, which is just dumb. That is why I rewrote it. At this point the code has been in our tree for quite a while, with no complaints, so I would regard it as 'extremely well tested'. I strongly recommend that FreeBSD adopt either this code or the core of this code and scrap that aweful C-hybrid-inline-assembly junk. Also, final note: remember that IP/TCP checksums are 1's complement checksums, which means that they are byte-order-agnostic (the byte order of the result will be the same as the byte order of the data, and the result will be correct, so if the original data is in network byte order, the resulting 1's complement checksum using normal (non translating) instructions will also be in network byte order). This is why one can simply use adcl instructions on an Intel/Amd cpu. In fact, it might be possible to use 128-bit media instructions but that's probably overkill. -- You might also want to look at our new MMX/XMM optimized bcopy/copyin/copyout. That was a lot harder to get right (and, most especially, it was a lot harder to make the FP state in kernel mode be properly saved and restored). I lost a few filesystems on my test box getting the code right :-). You would not be able to copy it directly since our FP state handling is very different from FreeBSD's now (which I will describe below), but you ought to be able to use the core MMX code. Right now FreeBSD is using old FP-stack instructions. This runs about as fast as MMX on an Athlon but, generally speaking, it is a decrepid, obsolete use of the FP unit. On DFly I made the following changes: * I implemented the comment in the old FBSD code (I think DG or Dyson made the comment) about having a separate FP save area pointer. This allows the kernel to use the FP unit trivially rather then having to copy/restore the user process's FP save area. This saves an ungodly number of cycles in the copy path and greatly simplifies the ability of the kernel to use the FP unit. Our FP copy code's overhead is now such that we can use the FP unit for copies half the size as on FreeBSD and it will still be more optimal then an integer copy, and XMM copies are much, much faster (esp on Athlon64's and Opterons) verses the old FBSD code. * DFly guarentees that if the FP unit is marked unused, the FP state is such that no fninit is required prior to using FP instructions. This saves ~50+ cycles in the best-case copy path. * FP-in-use-by-kernel is a per-cpu bit. * DFly does not try to optimize copies on pre-fxsave machines. The minimum required support is FXSAVE + MMX now. If XMM is available (SSE2), then 128 bit media instructions will be used. I saw no point in retaining code that was only just a bit faster then the integer code on old machines. * I scrapped the old integer copy code as being too complex and rewrote it using a middle-of-the-road integer copy (rather then having umpteen versions of integer copy). * If you attempt to use more of our code, remember that DFly does not preemptively migrate threads across cpus so our code doesn't have to worry about that. * I scrapped the separately-optimized copyin/copyout code and wrote a more generic pcb_oncall capability that allows the copy routine itself to push the restoration function on its stack, so the same optimized copy code is now used for ALL copies (memcpy, bcopy, copyin, copyout). Cavets on doing any of this for FreeBSD: The FP code in FreeBSD is extremely fragile, as I found to my horror when I first tried modifying it. In fact, I think there may still be interrupt and/or cpu migration races in the current FreeBSD FP borrowing. If anyone in FBSDland intends to make these changes, I recommend doing it one piece at a time, one commit per week: - week1: Redo the onfault API to allow the individual copy routines to push their own restore function in a stackable manner. That way copyin/copyout can push its restore function, then call a general optimized bcopy routine which pushes ITS restore function (to clean up the FP unit). i.e. onfault failure handling can now be stacked in DFly which allows us to use thet FP optimized bcopy code for copyin/copyout. (refer to the DFly codebase for how to do this). - week2: make the save area a pointer instead of fixed in pcb. Just point it at the PCB for this commit. I recommend putting the save pointer in the machine dependant thread (per-thread) structure and not embedding it in the PCB. Make sure fork() does the right thing. - week3: change the existing FP optimized code to use the new pointer method instead of the exchange-save-area method (create a fixed save area in the per-cpu data structure, do not allocate the 512 bytes required for fxsave on the stack). Keep the global kernel-is-using-fp bit (make it per-cpu), and pin the cpu for the duration of the FP copy. - week4: (rest) give the last set of changes 2 weeks to settle and do intensive testing to make sure there aren't any leaks, because a mistake here can cause filesystem corruption. - week5: change the FP copy requirements to require FXSAVE/FXRSTR and adjust the existing FP copy code to use FXSAVE/FXRSTR instead of fnsave/frstr. - week6: rip out the old FP copy code and replace it with the new MMX/XMM code. Rip out the old integer copy code and just use a good solid integer copy algorithm as we have that works well with 586 and later cpus. (import the DFLY FP copy core here. It would be the absolute last step). p.s. and if you need a kick in the pants, our PIPE code and any medium-sized block copies from the filesystem cache (e.g. using dd), which basically just tests copyin/copyout/bcopy performance, beats the crap out of FreeBSD-5 now on P4's and Athlon64/Opterons. Both are able to take advantage of the MMX/XMM optimized copies, especially due to the far lower FP setup overhead our kernel has now due to the pointer save area change and other things. (after a few runs to pre-cache) dhcp62# dd if=test.dat bs=32k | cat > /dev/null 335544320 bytes transferred in 0.570208 secs (588459681 bytes/sec) (DRAGONFLY) dhcp61# dd if=test.dat bs=32k | cat > /dev/null 335544320 bytes transferred in 0.901231 secs (372317753 bytes/sec) (FREEBSD-5) dhcp62# dd if=test.dat of=/dev/null bs=32k 335544320 bytes transferred in 0.283803 secs (1182313275 bytes/sec) (DRAGONFLY) dhcp61# dd if=test.dat of=/dev/null bs=32k 335544320 bytes transferred in 0.378349 secs (886864966 bytes/sec) (FREEBSD-5) (with witness turned off in FreeBSD-5, so you don't get that cop-out. with witness turned on the results are so horrible I won't even bother pasting them in, to save you guys the embarassment). That is what being able to use an XMM based copy for copyin/copyout gives you. I think it is well worth the effort, but a *lot* of effort is required if FreeBSD wants to do it right. It took me three weeks to get it right in DragonFly working nearly full time, but you would have the advantage of learning from all my mistakes :-). -Matt From owner-freebsd-arch@FreeBSD.ORG Fri Jun 4 13:12:05 2004 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 CCCB016A4CE for ; Fri, 4 Jun 2004 13:12:05 -0700 (PDT) Received: from smtp2.server.rpi.edu (smtp2.server.rpi.edu [128.113.2.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id 757D043D1D for ; Fri, 4 Jun 2004 13:12:05 -0700 (PDT) (envelope-from drosih@rpi.edu) Received: from [128.113.24.47] (gilead.netel.rpi.edu [128.113.24.47]) by smtp2.server.rpi.edu (8.12.8/8.12.8) with ESMTP id i54KBDIX028150; Fri, 4 Jun 2004 16:11:14 -0400 Mime-Version: 1.0 X-Sender: drosih@mail.rpi.edu Message-Id: In-Reply-To: <200406041933.i54JX23v052074@mail.gits.dyndns.org> References: <200406041933.i54JX23v052074@mail.gits.dyndns.org> Date: Fri, 4 Jun 2004 16:11:12 -0400 To: "Cyrille Lefevre" , From: Garance A Drosihn Content-Type: text/plain; charset="us-ascii" ; format="flowed" X-Scanned-By: CanIt (www . canit . ca) Subject: Re: Change to "kludge option processing" in /bin/ps 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: Fri, 04 Jun 2004 20:12:05 -0000 At 10:12 PM +0200 6/3/04, Cyrille Lefevre wrote: >why this message does not reach -arch ? >don't know if Garance reeived it also ? Hmm? Both my message (the one you are replying to) and your reply to it showed up in my mailbox via the arch mailing list. I was about to send another message to you directly (via whatever addresses I could find for you) to see what happened. I'm wondering if I've been sending to the wrong place, or if maybe you are losing messages from "drosih@rpi.edu" but you might see the messages if I sent them as "gad@FreeBSD.org" instead. Did you see my other replies in this thread? I think they all went to freebsd-arch (although our earlier thread was actually done mostly in freebsd-standards). I've made a few more commits to `ps', and have others almost ready to commit, but at the moment I'm actually working on a major update to finally fix some issues in newsyslog that I've been promising to do for almost a year now. >"Garance A Drosihn" wrote: >> At 5:08 PM +0200 5/31/04, Cyrille Lefevre wrote: >> >also, what about the proposed changes I have submitted ? >> >> I never got an answer from the last two or three messages I sent >> to you, so I am going ahead with bits of your changes and bits >> of my own pending changes. > >sorry, but I don't remember to have received anything recently, >the last message from you was "So, my silence on `ps' is because >I am too busy elsewhere..." on 27/04/2004 ! >so, could you resend your last messages, if any ? Yes, I do have some of them. For a few of those, it looks like I was sending to "Cyrille Lefevre" which must have been your return address on whatever message I was replying to. But the most important ones look like they were sent to Cyrille Lefevre would messages to that address be likely to get lost? -- Garance Alistair Drosehn = gad@gilead.netel.rpi.edu Senior Systems Programmer or gad@freebsd.org Rensselaer Polytechnic Institute or drosih@rpi.edu From owner-freebsd-arch@FreeBSD.ORG Fri Jun 4 13:17:02 2004 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 A9AAA16A4CE for ; Fri, 4 Jun 2004 13:17:02 -0700 (PDT) Received: from mailout02.sul.t-online.com (mailout02.sul.t-online.com [194.25.134.17]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1B72043D2F for ; Fri, 4 Jun 2004 13:17:02 -0700 (PDT) (envelope-from Alexander@Leidinger.net) Received: from fwd03.aul.t-online.de by mailout02.sul.t-online.com with smtp id 1BWL7G-0001hB-02; Fri, 04 Jun 2004 22:16:38 +0200 Received: from Andro-Beta.Leidinger.net (VscPnaZSQeDn0h2OLqG4iN55mZFFUrpQy4xpa3GCE5GeeBHC2nXQgR@[84.128.205.214]) by fmrl03.sul.t-online.com with esmtp id 1BWL7B-1zml0K0; Fri, 4 Jun 2004 22:16:33 +0200 Received: from Magellan.Leidinger.net (Magellan.Leidinger.net [192.168.1.1]) i54KGhqh057690; Fri, 4 Jun 2004 22:16:43 +0200 (CEST) (envelope-from Alexander@Leidinger.net) Date: Fri, 4 Jun 2004 22:18:09 +0200 From: Alexander Leidinger To: Matthew Dillon Message-Id: <20040604221809.3e444757@Magellan.Leidinger.net> In-Reply-To: <200406041955.i54Jtv0V053964@apollo.backplane.com> References: <20040531164514.GA7776@green.homeunix.org> <20040531.112057.52958848.imp@bsdimp.com> <20040601113825.54e5b57b@Magellan.Leidinger.net> <200406041955.i54Jtv0V053964@apollo.backplane.com> X-Mailer: Sylpheed version 0.9.11claws (GTK+ 1.2.10; i386-portbld-freebsd5.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Seen: false X-ID: VscPnaZSQeDn0h2OLqG4iN55mZFFUrpQy4xpa3GCE5GeeBHC2nXQgR@t-dialin.net cc: freebsd-arch@freebsd.org Subject: Re: New TCP/IP checksum code and a HOWTO on how to modernize and fix FreeBSD's FP-unit use in the kernel (was Re: ether_crc32_[bl]e()) 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: Fri, 04 Jun 2004 20:17:02 -0000 On Fri, 4 Jun 2004 12:55:57 -0700 (PDT) Matthew Dillon wrote: > You might also want to look at our new MMX/XMM optimized > bcopy/copyin/copyout. I monitor the DFly newsgroups and have a special folder where I save some interesting commit logs. The memcpy/bcopy/bzero commit logs are already there... :-) But I don't think I will be able to do anything with them in the near future. Thanks for providing a guide, Alexander. -- I'm available to get hired (preferred in .lu). http://www.Leidinger.net Alexander @ Leidinger.net GPG fingerprint = C518 BC70 E67F 143F BE91 3365 79E2 9C60 B006 3FE7 From owner-freebsd-arch@FreeBSD.ORG Fri Jun 4 14:35:10 2004 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 3557716A4CE for ; Fri, 4 Jun 2004 14:35:10 -0700 (PDT) Received: from smtp2.server.rpi.edu (smtp2.server.rpi.edu [128.113.2.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id E119843D3F for ; Fri, 4 Jun 2004 14:35:09 -0700 (PDT) (envelope-from drosih@rpi.edu) Received: from [128.113.24.47] (gilead.netel.rpi.edu [128.113.24.47]) by smtp2.server.rpi.edu (8.12.8/8.12.8) with ESMTP id i54LYEIX021037; Fri, 4 Jun 2004 17:34:15 -0400 Mime-Version: 1.0 X-Sender: drosih@mail.rpi.edu Message-Id: In-Reply-To: <200406041933.i54JX9kj040764@mail.gits.dyndns.org> References: <200406041933.i54JX9kj040764@mail.gits.dyndns.org> Date: Fri, 4 Jun 2004 17:34:13 -0400 To: "Cyrille Lefevre" , From: Garance A Drosihn Content-Type: text/plain; charset="us-ascii" ; format="flowed" X-Scanned-By: CanIt (www . canit . ca) Subject: Re: Change to "kludge option processing" in /bin/ps 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: Fri, 04 Jun 2004 21:35:10 -0000 At 10:13 PM +0200 6/3/04, Cyrille Lefevre wrote: > >"Garance A Drosihn" wrote: >> At 5:08 PM +0200 5/31/04, Cyrille Lefevre wrote: >> > >> >before to commit new changes, think about how to fix the >> >following ones :) >> > >> ># ps -p ,, >> > PID TT STAT TIME COMMAND >> > 0 ?? ZW 0:00.00 (sshd) >> ># psx -p ,, >> >psx: no process id specified >> >> The above issue was pretty trivial to fix, and I have committed a > > change which should fix it. > >ok, let's try another issue : > ># ps -G " nobody " > PID TT STAT TIME COMMAND >75483 con- S 0:10.97 /usr/local/sbin/junkbuster configfile ># ps -G ,nobody, >ps: Invalid (zero-length) group name >ps: Invalid (zero-length) group name ># ps -G , >ps: Invalid (zero-length) group name >ps: Invalid (zero-length) group name frankly, polishing off the error-messages for INVALID input is not high on my list of priorities right now. It just isn't. And no, it would not be trivial to "just drop in" the massive update you had written (particularly when parts of it don't seem to work for me). From my point of view, I've gone more than a month without replies to email that I sent when I was eager to follow up on some of your work. Eventually I decided to just go ahead. I'm still interested, but not interested enough to throw out the updates I have been testing just so I can start over from scratch. >why do you make a difference while parsing commas and spaces ? What I have committed is an improvement from what was there. If there is a burning need to skip over blanks, then I'll be happy to write another one-or-two line update to allow that. But at the moment I am focusing on newsyslog, because there are a few users who are having some serious headaches due to limitations in newsyslog, and I believe it is more important for me to address those problems... Once I get my upcoming changes to newsyslog sorted out, then I will drop back to working on my upcoming changes to `ps'. Any other minor parsing issues will be fixed as time permits. I'm just a volunteer here, I am afraid I only have a little spare time that I can spend on freebsd. -- Garance Alistair Drosehn = gad@gilead.netel.rpi.edu Senior Systems Programmer or gad@freebsd.org Rensselaer Polytechnic Institute or drosih@rpi.edu From owner-freebsd-arch@FreeBSD.ORG Fri Jun 4 15:05:37 2004 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 16F8A16A4CE for ; Fri, 4 Jun 2004 15:05:37 -0700 (PDT) Received: from smtp2.server.rpi.edu (smtp2.server.rpi.edu [128.113.2.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id C6DE943D2D for ; Fri, 4 Jun 2004 15:05:36 -0700 (PDT) (envelope-from drosih@rpi.edu) Received: from [128.113.24.47] (gilead.netel.rpi.edu [128.113.24.47]) by smtp2.server.rpi.edu (8.12.8/8.12.8) with ESMTP id i54M5AIX027688; Fri, 4 Jun 2004 18:05:11 -0400 Mime-Version: 1.0 X-Sender: drosih@mail.rpi.edu Message-Id: In-Reply-To: <20040604221809.3e444757@Magellan.Leidinger.net> References: <20040531164514.GA7776@green.homeunix.org> <20040531.112057.52958848.imp@bsdimp.com> <20040601113825.54e5b57b@Magellan.Leidinger.net> <200406041955.i54Jtv0V053964@apollo.backplane.com> <20040604221809.3e444757@Magellan.Leidinger.net> Date: Fri, 4 Jun 2004 18:05:09 -0400 To: Alexander Leidinger , Matthew Dillon From: Garance A Drosihn Content-Type: text/plain; charset="us-ascii" ; format="flowed" X-Scanned-By: CanIt (www . canit . ca) cc: freebsd-arch@freebsd.org Subject: Re: New TCP/IP checksum code and a HOWTO on how to modernize and fix FreeBSD's FP-unit use in the kernel (was Re: ether_crc32_[bl]e()) 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: Fri, 04 Jun 2004 22:05:37 -0000 At 10:18 PM +0200 6/4/04, Alexander Leidinger wrote: >On Fri, 4 Jun 2004 12:55:57 -0700 (PDT) >Matthew Dillon wrote: > > >> You might also want to look at our new MMX/XMM optimized >> bcopy/copyin/copyout. > >I monitor the DFly newsgroups and have a special folder where I save >some interesting commit logs. The memcpy/bcopy/bzero commit logs are >already there... :-) But I don't think I will be able to do anything >with them in the near future. > >Thanks for providing a guide, Heh. I have a few different things I have saved away too, and I hope to get back to sometime this summer. (not that one, though. I don't do much of anything special with networking...) -- Garance Alistair Drosehn = gad@gilead.netel.rpi.edu Senior Systems Programmer or gad@freebsd.org Rensselaer Polytechnic Institute or drosih@rpi.edu From owner-freebsd-arch@FreeBSD.ORG Sat Jun 5 04:03:47 2004 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 61AF116A4CE for ; Sat, 5 Jun 2004 04:03:47 -0700 (PDT) Received: from huva.hittite.isp.9tel.net (huva.hittite.isp.9tel.net [62.62.156.28]) by mx1.FreeBSD.org (Postfix) with ESMTP id D37CA43D3F for ; Sat, 5 Jun 2004 04:03:46 -0700 (PDT) (envelope-from clefevre-lists@9online.fr) Received: from pc2k (unknown [84.97.145.139]) by huva.hittite.isp.9tel.net (Postfix) with SMTP id C08D1B8908 for ; Thu, 3 Jun 2004 22:15:03 +0200 (CEST) Message-ID: <018001c449a7$3a5f80c0$7890a8c0@dyndns.org> From: "Cyrille Lefevre" To: Date: Thu, 3 Jun 2004 22:13:24 +0200 Organization: ACME MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1409 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 Subject: Re: Change to "kludge option processing" in /bin/ps 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, 05 Jun 2004 11:03:47 -0000 why this message does not reach -arch ? don't know if Garance reeived it also ? "Garance A Drosihn" wrote: > At 5:08 PM +0200 5/31/04, Cyrille Lefevre wrote: > > > >before to commit new changes, think about how to fix the > >following ones :) > > > ># ps -p ,, > > PID TT STAT TIME COMMAND > > 0 ?? ZW 0:00.00 (sshd) > ># psx -p ,, > >psx: no process id specified > > The above issue was pretty trivial to fix, and I have committed a > change which should fix it. ok, let's try another issue : # ps -G " nobody " PID TT STAT TIME COMMAND 75483 con- S 0:10.97 /usr/local/sbin/junkbuster configfile # ps -G ,nobody, ps: Invalid (zero-length) group name ps: Invalid (zero-length) group name # ps -G , ps: Invalid (zero-length) group name ps: Invalid (zero-length) group name instead of : # ps -G " nobody " PID TT STAT TIME COMMAND 75483 co- S 0:10.97 /usr/local/sbin/junkbuster configfile # ps -G ,nobody, PID TT STAT TIME COMMAND 75483 co- S 0:10.97 /usr/local/sbin/junkbuster configfile # ps -G , psx: no group name or id specified why do you make a difference while parsing commas and spaces ? in other words, ignore empty values (which may be generated by a shell script, so, don't warn), except if all values are empty. Cyrille Lefevre. -- home: mailto:cyrille.lefevre@laposte.net From owner-freebsd-arch@FreeBSD.ORG Sat Jun 5 13:48:28 2004 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 930B316A4CE for ; Sat, 5 Jun 2004 13:48:28 -0700 (PDT) Received: from comp.chem.msu.su (comp.chem.msu.su [158.250.32.97]) by mx1.FreeBSD.org (Postfix) with ESMTP id A45AA43D31 for ; Sat, 5 Jun 2004 13:48:27 -0700 (PDT) (envelope-from yar@comp.chem.msu.su) Received: from comp.chem.msu.su (localhost [127.0.0.1]) by comp.chem.msu.su (8.12.9p2/8.12.9) with ESMTP id i55KmNca004885 for ; Sun, 6 Jun 2004 00:48:23 +0400 (MSD) (envelope-from yar@comp.chem.msu.su) Received: (from yar@localhost) by comp.chem.msu.su (8.12.9p2/8.12.9/Submit) id i55KmNY9004884 for arch@freebsd.org; Sun, 6 Jun 2004 00:48:23 +0400 (MSD) (envelope-from yar) Date: Sun, 6 Jun 2004 00:48:23 +0400 From: Yar Tikhiy To: arch@freebsd.org Message-ID: <20040605204823.GC692@comp.chem.msu.su> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.6i Subject: signal(SIGCHLD, SIG_IGN) 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, 05 Jun 2004 20:48:28 -0000 Hi folks, The SysV way to get rid of child zombies seems to have been supported by CURRENT for about 2 years, but I can see no pointers to it in the man pages. Can we conclude that the testing of the feature has succeeded, and finally document it? -- Yar From owner-freebsd-arch@FreeBSD.ORG Sat Jun 5 22:52:51 2004 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 AA50C16A4CE; Sat, 5 Jun 2004 22:52:51 -0700 (PDT) Received: from rwcrmhc12.comcast.net (rwcrmhc12.comcast.net [216.148.227.85]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8BC8143D4C; Sat, 5 Jun 2004 22:52:51 -0700 (PDT) (envelope-from DougB@freebsd.org) Received: from lap (c-24-130-110-32.we.client2.attbi.com[24.130.110.32]) by comcast.net (rwcrmhc12) with SMTP id <2004060605525101400hubgte>; Sun, 6 Jun 2004 05:52:51 +0000 Date: Sat, 5 Jun 2004 22:52:50 -0700 (PDT) From: Doug Barton To: "Crist J. Clark" In-Reply-To: <20040521193605.GA8246@blossom.cjclark.org> Message-ID: <20040605225226.I27943@ync.qbhto.arg> References: <20040521193605.GA8246@blossom.cjclark.org> Organization: http://www.FreeBSD.org/ X-message-flag: Outlook -- Not just for spreading viruses anymore! MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed cc: "freebsd-arch@freebsd.org" Subject: Re: Move /usr/sup to /var/db/sup? 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: Sun, 06 Jun 2004 05:52:51 -0000 On Fri, 21 May 2004, Crist J. Clark wrote: > Just a minor thing, but I would think[0] most people would agree that > /var/db/sup is a much more logical place for the CVSup "base" directory > than /usr/sup. Yes, it doesn't take up much space on /usr, but for > those who don't want to write to /usr[1] too much or mount /usr read- > only, it's an irritant. FWIW, I started doing this on boxes I was responsible for a long time ago, and it works just fine. One could argue that the proper default for the config files is /usr/local/etc/, and the proper location for the base files is /var/db/sup. Either way, getting both out of /usr is a step in the right direction, and I support your effort on this. Doug -- This .signature sanitized for your protection