From owner-freebsd-hackers Sun Jan 23 3:55:35 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from smtp01.wxs.nl (smtp01.wxs.nl [195.121.6.61]) by hub.freebsd.org (Postfix) with ESMTP id BBBF414DD7; Sun, 23 Jan 2000 03:55:23 -0800 (PST) (envelope-from asmodai@wxs.nl) Received: from daemon.ninth-circle.org ([195.121.196.211]) by smtp01.wxs.nl (Netscape Messaging Server 3.61) with ESMTP id AAA65F2; Sun, 23 Jan 2000 12:55:01 +0100 Received: (from asmodai@localhost) by daemon.ninth-circle.org (8.9.3/8.9.3) id MAA22582; Sun, 23 Jan 2000 12:54:39 +0100 (CET) (envelope-from asmodai) Date: Sun, 23 Jan 2000 12:54:39 +0100 From: Jeroen Ruigrok/Asmodai To: Bill Maniatty Cc: FreeBSD-doc@FreeBSD.org, maniatty@cs.albany.edu, freebsd-hackers@FreeBSD.org, Greg Lehey Subject: Re: Learning the FreeBSD Kernel Message-ID: <20000123125439.A20851@daemon.ninth-circle.org> References: <200001230406.XAA43423@cs.rpi.edu> <20000123153526.I930@mojave.worldwide.lemis.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0i In-Reply-To: <20000123153526.I930@mojave.worldwide.lemis.com>; from grog@lemis.com on Sun, Jan 23, 2000 at 03:35:26PM +0800 Organisation: Ninth-Circle Enterprises Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG -On [20000123 11:11], Greg Lehey (grog@lemis.com) wrote: >[adding -doc, which is more appropriate for some of the questions] > >On Saturday, 22 January 2000 at 23:06:41 -0500, Bill Maniatty wrote: >> I have a student this semester in my Operating Systems class who would like >> to become a bit more knowledgeable about systems software. I suggested >> that he learn a bit about how device drivers are written in FreeBSD >> as a minor project. My questions are: >> >> 1) Does any current documentation of how to write and/or install a >> device driver exist in English (note C != English)? > >Yes, with reservations. Big reservations. The main question is, are you going to use the default (old) style of Unix drivers (based on character and block devices with their appropriate cdevsw and bdevsw), or are you willing to have the student participate in the new style busspace/newbus system which is present in CURRENT (soon to be released 4.0)? >> We would love to have a level documentation like the document by >> Pragmatic at http://thc.pimmel.com/files/thc/bsdkern.html, we are >> looking for a how to guide. > >Somewhere we have a tutorial. I think it's been retired because it's >out of date, but it could be a very rewarding starting point for >somebody who wanted to work his way into the material and either >update it or bring out a new document based on the structure. This >would also give the student good visibility in the (Free)BSD >community. The Device Driver Writers Guide (DDWG) was retired because the contents were too old to apply to modern day FreeBSD. I am getting more and more progress to get the relevant background information to: a) write the busspace and newbus manpages b) write a new DDWG which will include migration paths for old drivers to the new style >> 2) If no existing documentation exists, would it be a good idea to >> put together a sort of how to guide for a simple driver (with an >> eye to generalization later if warranted)? Heh, I am working on that, except things keep interrupting my work. I was thinking of making a small document for the time being which gives some general clue to the community for the new type drivers, or at least summarises what has changed. In /usr/src/sys/pci there is meteor.c which still uses some old style driver code. You can compare that to most of the if_XYZ.c files by Bill Paul which make extensive use of the new system. Or take a look at Matthew N. Dodd's files and see even more examples. >> 3) If the answer to 2 is yes, can we get constructive help from the FreeBSD >> community? > >Definitely. -hackers would be the right forum there. I would also >personally commit to helping within the constraints of my other work. I'll second Greg here. I am here to write the documentation for this subject (on voluntarily basis of course) and I think that questions coming from your student, or from others for that matter, will make sure I keep on top of things and document them. Aside from -hackers, you might want to consider -newbus, which is the forum to discuss newbus in depth. >> Assuming that this constitutes an interesting project, what would be >> a good initial approach? I was considering: >> 1) Get and build the FreeBSD kernel (4.0?) Please use this yes. 4.0 has IMHO better bus architecture code to look into for writing drivers. >> 2) Choose a non-essential device with a simple preexisting driver. >> 3) Remove all trace of the driver from the kernel source. >> 4) Reapply the changes used to install the driver (perhaps one step at a time). >> We could suggest some simple sanity checks to support stepwise refinement. > >(1) and (2) are a good start. You don't need to remove the old >driver; it would in fact make it easier for debugging purposes if it >remained. Instead, choose another major number and name, and write a >new driver. This procedure is definitely *not* documented, but it's >the way we introduce new drivers, and I think a couple of other people >who have done it would be pleased to help. *nod* There are certainly people who are be able and willing to help. >A possibly better alternative is to find a device which isn't >currently supported by FreeBSD and write a driver for it. This would >have the advantage that the work would also be a contribution to >FreeBSD. The question that I can't answer here is: what would be an >appropriate device? Definately not an ethernet card. *g* Seems no-one can keep up with Bill Paul in that aspect. =) You could try usb devices and contact Nick Hibma for his expertise on that area. Also make sure the vendor is not problematic with handing out documentation. Intel and Motorola are good examples of companies who have pdf's available for download. >> If this is a good idea, I would like the following help from the FreeBSD >> community: >> 1) Identify a simple driver (perhaps something like a joystick >> driver?) > >I don't know if anybody uses it any more. The driver database (URL doesn't come to mind, it's on the freebsd.org site under project IIRC) has an entry from someone working on getting the joystick device to work under 4.0 and being compatible with the Linux one. >> 2) Identify all source code associated with the driver (including configuration >> files, makefiles etc...). Some files may have only one or two lines >> devoted to the driver, so we will need to know how to recognize such lines >> and would appreciate pointers to such lines. > >That should be relatively straightforward after examination of the old >tutorial, the sources and hier(7). If not, ask away. Important >directories are: > > /sys symlink to /usr/src/sys; I'll use it below > /sys/config generic configuration files > /sys/i386/config configuration files for i386 > /sys/dev sources for generic device drivers > /sys/isa sources for generic ISA device drivers > /sys/i386/isa sources for i386-only ISA device drivers Of course, in addition: /sys/pci Noteworthy header files: /usr/include/machine/bus.h /usr/include/machine/bus_memio.h /usr/include/machine/bus_pio.h /usr/include/machine/resource.h /usr/include/sys/bus.h /usr/include/sys/rman.h /sys/kern/subr_bus.c -- Jeroen Ruigrok vd W/Asmodai asmodai@[wxs.nl|bart.nl|freebsd.org] Documentation nutter/B-rated Coder BSD: Technical excellence at its best The BSD Programmer's Documentation Project Ain't gonna spend the rest of my Life, quietly fading away... To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sun Jan 23 3:59:22 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from smtp04.wxs.nl (smtp04.wxs.nl [195.121.6.59]) by hub.freebsd.org (Postfix) with ESMTP id AD39D14E9B for ; Sun, 23 Jan 2000 03:59:17 -0800 (PST) (envelope-from asmodai@wxs.nl) Received: from daemon.ninth-circle.org ([195.121.196.211]) by smtp04.wxs.nl (Netscape Messaging Server 3.61) with ESMTP id AAA213; Sun, 23 Jan 2000 12:58:36 +0100 Received: (from asmodai@localhost) by daemon.ninth-circle.org (8.9.3/8.9.3) id MAA22590; Sun, 23 Jan 2000 12:58:29 +0100 (CET) (envelope-from asmodai) Date: Sun, 23 Jan 2000 12:58:29 +0100 From: Jeroen Ruigrok/Asmodai To: Marwan Fayed Cc: Thierry Herbelot , freebsd-hackers@freebsd.org Subject: Re: disappearing mount points after install Message-ID: <20000123125829.B20851@daemon.ninth-circle.org> References: <3889ECB5.9E75171B@cybercable.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0i In-Reply-To: ; from s0121430@cs.laurentian.ca on Sat, Jan 22, 2000 at 01:11:10PM -0500 Organisation: Ninth-Circle Enterprises Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG -On [20000122 20:00], Marwan Fayed (s0121430@cs.laurentian.ca) wrote: >There have been two suggestions both very related, both of which I have >already considered. I thought perhaps my BIOS required a DOS partition so >I installed RedHat 6.1 to be sure. Guess what? It worked! My past recollection of slices/partitions wrt differences in them between FreeBSD and Linux tend me to believe you cannot compare the two since the system which handles them is highly different. IIRC Linux allows you to install into extended partitions. I cannot remember that we supported (or that it is even possible) with FreeBSD. Of course, this may all have changed and I have not been paying attention. =) -- Jeroen Ruigrok vd W/Asmodai asmodai@[wxs.nl|bart.nl|freebsd.org] Documentation nutter/B-rated Coder BSD: Technical excellence at its best The BSD Programmer's Documentation Project Ain't gonna spend the rest of my Life, quietly fading away... To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sun Jan 23 5:29:22 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from smtp01.wxs.nl (smtp01.wxs.nl [195.121.6.61]) by hub.freebsd.org (Postfix) with ESMTP id A75111564F for ; Sun, 23 Jan 2000 05:29:14 -0800 (PST) (envelope-from asmodai@wxs.nl) Received: from daemon.ninth-circle.org ([195.121.196.211]) by smtp01.wxs.nl (Netscape Messaging Server 3.61) with ESMTP id AAA5D34; Sun, 23 Jan 2000 14:26:45 +0100 Received: (from asmodai@localhost) by daemon.ninth-circle.org (8.9.3/8.9.3) id OAA22658; Sun, 23 Jan 2000 14:03:51 +0100 (CET) (envelope-from asmodai) Date: Sun, 23 Jan 2000 14:03:51 +0100 From: Jeroen Ruigrok/Asmodai To: Saurabh Bhandari Cc: freebsd-hackers@freebsd.org Subject: Re: Query?? Message-ID: <20000123140351.C20851@daemon.ninth-circle.org> References: <20000121015130.74516.qmail@hotmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0i In-Reply-To: <20000121015130.74516.qmail@hotmail.com>; from saurabh_bhandari@hotmail.com on Fri, Jan 21, 2000 at 01:51:30AM +0000 Organisation: Ninth-Circle Enterprises Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG -On [20000121 04:02], Saurabh Bhandari (saurabh_bhandari@hotmail.com) wrote: >Dear Sir, Hi, >I am a M.S. student with major as Computer Science. I am doing an >independent study with my professor. I have been told that BSD drivers are >not documented at this point of time. So I would like to document the BSD >Drivers. You don't happen to be the student of the professor of rpi.edu (if I am not mistaken) whom I just mailed back are you? =) If you want to document the writing of the drivers, you might want to stick around me, since I have been dogging in this subject for the past few months. >It would be a big help for me if you could answer the following questions: > >1)Are BSD drivers not really documented?(I fear that I may not end up >re-inventing the wheel) Depends on which version of FreeBSD. Prior to CURRENT (4.0) we used the standard BSD/Unix way of writing device drivers. That means we used bdevsw[] and cdevsw[]. We recently collapsed both the character devices and block devices into one cdevsw. >2)I am new in this field. Will it be possible for you to tell me from where >should I start as I dont have any experience in this field? Please see the email from Greg Lehey and myself in response to another inquiry about writing device drivers, since it is too long to repeat here. Kind regards, -- Jeroen Ruigrok vd W/Asmodai asmodai@[wxs.nl|bart.nl|freebsd.org] Documentation nutter/B-rated Coder BSD: Technical excellence at its best The BSD Programmer's Documentation Project Ain't gonna spend the rest of my Life, quietly fading away... To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sun Jan 23 8:34: 8 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from polaris.cs.laurentian.ca (polaris.cs.laurentian.ca [142.51.24.200]) by hub.freebsd.org (Postfix) with SMTP id 7A3F314DD1 for ; Sun, 23 Jan 2000 08:34:01 -0800 (PST) (envelope-from s0121430@cs.laurentian.ca) Received: (qmail 4441 invoked from network); 23 Jan 2000 16:33:56 -0000 Received: from altair.cs.laurentian.ca (HELO altair) (142.51.24.206) by polaris.cs.laurentian.ca with SMTP; 23 Jan 2000 16:33:56 -0000 Date: Sun, 23 Jan 2000 11:33:56 -0500 (EST) From: Marwan Fayed To: Thierry Herbelot Cc: freebsd-hackers@freebsd.org, freebsd-mobile@freebsd.org Subject: Re: disappearing mount points after install In-Reply-To: <3889ECB5.9E75171B@cybercable.fr> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG So, as it turns out I have found the answer it seems... a bit of a fluke, rather. I'll detail in short (if there is such a thing) so others are aware. As Thierry (and one other I think) suggested, a DOS partition is required. Before this was suggested to me I tried dual booting with a small DOS partition of 2 megs to save as much space as possible. This didn't work. Well, last night a chain of events forced me to realize that Win95, of course, uses partitions greater than 2 megs and that I should try using larger partitions (Thierry uses 20 on his machine). I first tried it with 5 megs... nothing. Then 10, 16, and still nothing. Finally when I expanded the DOS partition to 20 megs it worked. I can only assume this is how IBM manufactured their BIOS. And hey, it's 20 megs lost but at least it worked. I'm writing this after doing a dummy install with the minimal option so as to save time in installing. Let's hope my results aren't a lucky shot in the dark so that I can now re-install everything properly! Thanks for everyone's help. btw, who gets dinner!? Marwan ps. You all have impressed me so much that I think I will try to find ways to contribute to the freebsd project (as long as it doesn't interfere with school, of course ) On Sat, 22 Jan 2000, Thierry Herbelot wrote: > Hello > > [-mobile trimmed] > > Marwan Fayed wrote: > > > > Hello, > > > > I am a seasoned UNIX user but have been using freebsd for only about 6 > > months. I have posted this problem to freebsd-questions with no response > > so, figuring it must be a bug in the install program i'm going to try > > here. Oh, I would like to have traced the code to try to find the bug (if > > one exists) but being a senior year undergrad with a full course load and > > thesis, I have been left with little time... please forgive me. > > > > My problem is this. I am trying to install 3.3-R on an IBM Thinkpad 365XD > > (although I have received mail from a man in France who is having the same > > problem on a desktop). The installation runs completely smoothly but when > > I finish and reboot the machine reports no resident O.S. > > This may be due to a faulty BIOS : some BIOSes do not like at all not > having a DOS partition at the beginning of the disk (I have some HP PCs > with just 20 Megs of FAT at the start of the disk to keep them booting - > from , which is FreeBSD) > > > > > After trying many different things (including messing with the MBR, double > > and triple checking disk geometry, and using a Fixit disk to try to > > diagnose the problem), I booted from the install floppy to the main > > install menu. Rather than re-install all over again for the nth time I > > just entered the label editor. The partitions were still there but the > > mount points were lost. What appeared was > > this: > > > > 40M // supposed to be root > > swap 84M // swap is obviously OK > > 651M // supposed to be /usr > > The mount points for each partition are recorded in /etc/fstab : what > you are seeing is completely normal, as sysinstall has not read the > fstab file from the root partition of your disk. > > > > > This is clearly not what I designated so I tried relabelling the mount > > points, writing the information using 'w' and exiting install only to have > > the BIOS report no O.S. yet again! > > Try and leave a small DOS partition at the beginning of your disk, as > said above. > > > > > The machine is a P100,40M ram,810HD, standard PCI (as far as I have been > > able to tell/test). Has anyone encountered this or know the problem? > > > > Thanks a TON! > > > > Marwan :-) > > TfH > > > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > > with "unsubscribe freebsd-hackers" in the body of the message > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sun Jan 23 8:48:57 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from cs.rpi.edu (mumble.cs.rpi.edu [128.213.8.16]) by hub.freebsd.org (Postfix) with ESMTP id 5CF9F14D15; Sun, 23 Jan 2000 08:48:47 -0800 (PST) (envelope-from maniattb@cs.rpi.edu) Received: from cs.rpi.edu (maniattb@dishwasher.cs.rpi.edu [128.213.8.31]) by cs.rpi.edu (8.9.3/8.9.3) with ESMTP id LAA53658; Sun, 23 Jan 2000 11:48:42 -0500 (EST) Message-Id: <200001231648.LAA53658@cs.rpi.edu> X-Mailer: exmh version 2.0.1 12/23/97 To: Jeroen Ruigrok/Asmodai Cc: Bill Maniatty , FreeBSD-doc@FreeBSD.ORG, maniatty@cs.albany.edu, freebsd-hackers@FreeBSD.ORG, Greg Lehey , maniattb@cs.rpi.edu Subject: Re: Learning the FreeBSD Kernel In-reply-to: Your message of "Sun, 23 Jan 2000 12:54:39 +0100." <20000123125439.A20851@daemon.ninth-circle.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sun, 23 Jan 2000 11:48:39 -0500 From: Bill Maniatty Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Hello Jeroen: Jeroen Ruigrok (in response to Greg Lehey and myself): > -On [20000123 11:11], Greg Lehey (grog@lemis.com) wrote: > >[adding -doc, which is more appropriate for some of the questions] > > > >On Saturday, 22 January 2000 at 23:06:41 -0500, Bill Maniatty wrote: > > >> I have a student this semester in my Operating Systems class who would like > >> to become a bit more knowledgeable about systems software. I suggested > >> that he learn a bit about how device drivers are written in FreeBSD > >> as a minor project. My questions are: > >> > >> 1) Does any current documentation of how to write and/or install a > >> device driver exist in English (note C != English)? > > > >Yes, with reservations. > > Big reservations. The main question is, are you going to use the > default (old) style of Unix drivers (based on character and block > devices with their appropriate cdevsw and bdevsw), or are you willing to > have the student participate in the new style busspace/newbus system > which is present in CURRENT (soon to be released 4.0)? > > >> We would love to have a level of documentation like the document by > >> Pragmatic at http://thc.pimmel.com/files/thc/bsdkern.html, we are > >> looking for a how to guide. > > > >Somewhere we have a tutorial. I think it's been retired because it's > >out of date, but it could be a very rewarding starting point for > >somebody who wanted to work his way into the material and either > >update it or bring out a new document based on the structure. This > >would also give the student good visibility in the (Free)BSD > >community. > > The Device Driver Writers Guide (DDWG) was retired because the contents > were too old to apply to modern day FreeBSD. The document that I seem to remember FreeBSD having on line at one point had problems in my eyes: 1) It was too preliminary IMHO, the person who started it did not give enough detail to first time driver writers. 2) As you mentioned it became obsolete. 3) It was meant as a reference, not as a tutorial. Again I think Pragmatic's documentation exemplifies the style I am looking for, I want people to have an exercise to learn stepwise how to build a driver (my goal is to cultivate local expertise first). Actually the lack a reference or tutorial document is kind of damning in a way, since it gives hardware vendors a powerful excuse not to support FreeBSD in the way that say Lin*x is supported. > I am getting more and more > progress to get the relevant background information to: > > a) write the busspace and newbus manpages > b) write a new DDWG which will include migration paths for old > drivers to the new style These are good things. > >> 2) If no existing documentation exists, would it be a good idea to > >> put together a sort of how to guide for a simple driver (with an > >> eye to generalization later if warranted)? > > Heh, I am working on that, except things keep interrupting my work. > > I was thinking of making a small document for the time being which gives > some general clue to the community for the new type drivers, or at least > summarises what has changed. In /usr/src/sys/pci there is meteor.c > which still uses some old style driver code. You can compare that to > most of the if_XYZ.c files by Bill Paul which make extensive use of the > new system. Or take a look at Matthew N. Dodd's files and see even more > examples. If you have something for us to look at we would appreciate it, otherwise we may wind up rolling our own (in which event we would keep you informed). > >> 3) If the answer to 2 is yes, can we get constructive help from the FreeBSD > >> community? > > > >Definitely. -hackers would be the right forum there. I would also > >personally commit to helping within the constraints of my other work. > > I'll second Greg here. I am here to write the documentation for this > subject (on voluntarily basis of course) and I think that questions > coming from your student, or from others for that matter, will make sure > I keep on top of things and document them. Aside from -hackers, you > might want to consider -newbus, which is the forum to discuss newbus in > depth. Thanks, will do. > >> Assuming that this constitutes an interesting project, what would be > >> a good initial approach? I was considering: > >> 1) Get and build the FreeBSD kernel (4.0?) > > Please use this yes. 4.0 has IMHO better bus architecture code to look > into for writing drivers. > > >> 2) Choose a non-essential device with a simple preexisting driver. > >> 3) Remove all trace of the driver from the kernel source. > >> 4) Reapply the changes used to install the driver (perhaps one step at a time). > >> We could suggest some simple sanity checks to support stepwise refinement. > > > >(1) and (2) are a good start. You don't need to remove the old > >driver; it would in fact make it easier for debugging purposes if it > >remained. Instead, choose another major number and name, and write a > >new driver. This procedure is definitely *not* documented, but it's > >the way we introduce new drivers, and I think a couple of other people > >who have done it would be pleased to help. > > *nod* There are certainly people who are be able and willing to help. > > >A possibly better alternative is to find a device which isn't > >currently supported by FreeBSD and write a driver for it. This would > >have the advantage that the work would also be a contribution to > >FreeBSD. The question that I can't answer here is: what would be an > >appropriate device? First we want to get the mechanism of driver installation down, then try our hands at writing our own driver. I fear that if we roll our own driver software we may find that if we have errors (not that we ever have errors mind you :-) we may not be able to isolate the cause. This is why I was leaning towards reinstalling a working driver first. > Definately not an ethernet card. *g* > Seems no-one can keep up with Bill Paul in that aspect. =) We probably could not compete :-), but we are interested in ethernet card drivers (at some point) and would like to learn. > You could try usb devices and contact Nick Hibma for his expertise on > that area. How mature is the USB driver technology? If it is pretty preliminary we may wish to visit that later. Please recall that we are on a learning curve here. > Also make sure the vendor is not problematic with handing out > documentation. Intel and Motorola are good examples of companies who > have pdf's available for download. Very good idea. > >> If this is a good idea, I would like the following help from the FreeBSD > >> community: > >> 1) Identify a simple driver (perhaps something like a joystick > >> driver?) > > > >I don't know if anybody uses it any more. > > The driver database (URL doesn't come to mind, it's on the freebsd.org > site under project IIRC) has an entry from someone working on getting > the joystick device to work under 4.0 and being compatible with the > Linux one. Thanks, I only suggested the joystick driver because I thought it would be one of the least difficult drivers (and perhaps easy to test). > >> 2) Identify all source code associated with the driver (including configuration > >> files, makefiles etc...). Some files may have only one or two lines > >> devoted to the driver, so we will need to know how to recognize such lines > >> and would appreciate pointers to such lines. > > > >That should be relatively straightforward after examination of the old > >tutorial, the sources and hier(7). If not, ask away. Important > >directories are: > > > > /sys symlink to /usr/src/sys; I'll use it below > > /sys/config generic configuration files > > /sys/i386/config configuration files for i386 > > /sys/dev sources for generic device drivers > > /sys/isa sources for generic ISA device drivers > > /sys/i386/isa sources for i386-only ISA device drivers > > Of course, in addition: > > /sys/pci > > Noteworthy header files: > > /usr/include/machine/bus.h > /usr/include/machine/bus_memio.h > /usr/include/machine/bus_pio.h > /usr/include/machine/resource.h > /usr/include/sys/bus.h > /usr/include/sys/rman.h > /sys/kern/subr_bus.c Thanks for your help Jeroen (and Greg), this kind of input is very constructive. Regards; Bill Maniatty To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sun Jan 23 8:50:46 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from PacHell.TelcoSucks.org (PacHell.TelcoSucks.org [207.90.181.5]) by hub.freebsd.org (Postfix) with ESMTP id 6501214D16; Sun, 23 Jan 2000 08:50:40 -0800 (PST) (envelope-from ulf@PacHell.TelcoSucks.org) Received: (from ulf@localhost) by PacHell.TelcoSucks.org (8.9.3/8.9.1) id IAA83330; Sun, 23 Jan 2000 08:50:43 -0800 (PST) (envelope-from ulf) Date: Sun, 23 Jan 2000 08:50:43 -0800 From: Ulf Zimmermann To: Marwan Fayed Cc: Thierry Herbelot , freebsd-hackers@FreeBSD.ORG, freebsd-mobile@FreeBSD.ORG Subject: Re: disappearing mount points after install Message-ID: <20000123085043.C39472@PacHell.TelcoSucks.org> Reply-To: ulf@Alameda.net References: <3889ECB5.9E75171B@cybercable.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0i In-Reply-To: ; from s0121430@cs.laurentian.ca on Sun, Jan 23, 2000 at 11:33:56AM -0500 Organization: Alameda Networks, Inc. X-Operating-System: FreeBSD 3.2-STABLE Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Sun, Jan 23, 2000 at 11:33:56AM -0500, Marwan Fayed wrote: > So, as it turns out I have found the answer it seems... a bit of a fluke, > rather. I'll detail in short (if there is such a thing) so others are > aware. > > As Thierry (and one other I think) suggested, a DOS partition is required. > Before this was suggested to me I tried dual booting with a small DOS > partition of 2 megs to save as much space as possible. This didn't work. > Well, last night a chain of events forced me to realize that Win95, of > course, uses partitions greater than 2 megs and that I should try using > larger partitions (Thierry uses 20 on his machine). > > I first tried it with 5 megs... nothing. Then 10, 16, and still nothing. > Finally when I expanded the DOS partition to 20 megs it worked. I can only > assume this is how IBM manufactured their BIOS. And hey, it's 20 megs lost > but at least it worked. > > I'm writing this after doing a dummy install with the minimal option so as > to save time in installing. Let's hope my results aren't a lucky shot in > the dark so that I can now re-install everything properly! FYI: be also aware about how some notebooks do suspend to disk. Some Toshibas need +1MB free at the end of the disk to do so. Some other Toshibas make a file inside of the dos partition. Not sure how IBM or others do it, have only experience with Toshibas lately and haven't bothered to check on my Sony (does the Z505R even do suspend to disk?) > > Thanks for everyone's help. btw, who gets dinner!? > > Marwan > > ps. You all have impressed me so much that I think I will try to find ways > to contribute to the freebsd project (as long as it doesn't interfere with > school, of course ) > > On Sat, 22 Jan 2000, Thierry Herbelot wrote: > > > Hello > > > > [-mobile trimmed] > > > > Marwan Fayed wrote: > > > > > > Hello, > > > > > > I am a seasoned UNIX user but have been using freebsd for only about 6 > > > months. I have posted this problem to freebsd-questions with no response > > > so, figuring it must be a bug in the install program i'm going to try > > > here. Oh, I would like to have traced the code to try to find the bug (if > > > one exists) but being a senior year undergrad with a full course load and > > > thesis, I have been left with little time... please forgive me. > > > > > > My problem is this. I am trying to install 3.3-R on an IBM Thinkpad 365XD > > > (although I have received mail from a man in France who is having the same > > > problem on a desktop). The installation runs completely smoothly but when > > > I finish and reboot the machine reports no resident O.S. > > > > This may be due to a faulty BIOS : some BIOSes do not like at all not > > having a DOS partition at the beginning of the disk (I have some HP PCs > > with just 20 Megs of FAT at the start of the disk to keep them booting - > > from , which is FreeBSD) > > > > > > > > After trying many different things (including messing with the MBR, double > > > and triple checking disk geometry, and using a Fixit disk to try to > > > diagnose the problem), I booted from the install floppy to the main > > > install menu. Rather than re-install all over again for the nth time I > > > just entered the label editor. The partitions were still there but the > > > mount points were lost. What appeared was > > > this: > > > > > > 40M // supposed to be root > > > swap 84M // swap is obviously OK > > > 651M // supposed to be /usr > > > > The mount points for each partition are recorded in /etc/fstab : what > > you are seeing is completely normal, as sysinstall has not read the > > fstab file from the root partition of your disk. > > > > > > > > This is clearly not what I designated so I tried relabelling the mount > > > points, writing the information using 'w' and exiting install only to have > > > the BIOS report no O.S. yet again! > > > > Try and leave a small DOS partition at the beginning of your disk, as > > said above. > > > > > > > > The machine is a P100,40M ram,810HD, standard PCI (as far as I have been > > > able to tell/test). Has anyone encountered this or know the problem? > > > > > > Thanks a TON! > > > > > > Marwan :-) > > > > TfH > > > > > > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > > > with "unsubscribe freebsd-hackers" in the body of the message > > > > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-mobile" in the body of the message -- Regards, Ulf. --------------------------------------------------------------------- Ulf Zimmermann, 1525 Pacific Ave., Alameda, CA-94501, #: 510-769-2936 Alameda Networks, Inc. | http://www.Alameda.net | Fax#: 510-521-5073 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sun Jan 23 9: 2: 5 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from vorbis.noc.easynet.net (vorbis.noc.easynet.net [195.40.1.254]) by hub.freebsd.org (Postfix) with SMTP id 68406156DC for ; Sun, 23 Jan 2000 09:01:51 -0800 (PST) (envelope-from chrisy@vorbis.noc.easynet.net) Received: (qmail 95663 invoked by uid 1943); 23 Jan 2000 16:59:38 -0000 Date: Sun, 23 Jan 2000 16:59:38 +0000 From: Chrisy Luke To: freebsd-hackers@freebsd.org Cc: mjacob@feral.com, crossd@cs.rpi.edu, cgriffiths@quansoo.com, owensc@enc.edu Subject: ypldap-0.8 Message-ID: <20000123165938.A95452@flix.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0pre2i Organization: The Flirble Internet Exchange X-URL: http://www.flix.net/ X-FTP: ftp://ftp.flirble.org/ Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG First public release. Version 0.8. ftp://ftp.flirble.org/pub/unix/ypldap/ypldap-0.8.tar.gz Read the README and TODO files for an idea for how far it has got. It's a drop-in replacement for ypserv - it will in fact still use any YP databases that already exist on the machine if what it's looking for doesn't exist in LDAP (or in the case of first/next and xfer's, it will concatenate the existing YP DB's in it's output). It works for me. Let me know if it doesn't for you with a message to ypldap@flix.net Regards, Chris Luke. -- == chris@easynet.net, chrisy@flirble.org. +44 20 7900 4444 == Systems Manager for Easynet, a part of Easynet Group PLC. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sun Jan 23 10:44:14 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from skynet.ctr.columbia.edu (skynet.ctr.columbia.edu [128.59.64.70]) by hub.freebsd.org (Postfix) with SMTP id DBD8C14D1B for ; Sun, 23 Jan 2000 10:44:07 -0800 (PST) (envelope-from wpaul@skynet.ctr.columbia.edu) Received: (from wpaul@localhost) by skynet.ctr.columbia.edu (8.6.12/8.6.9) id NAA17880; Sun, 23 Jan 2000 13:48:01 -0500 From: Bill Paul Message-Id: <200001231848.NAA17880@skynet.ctr.columbia.edu> Subject: Re: ypldap-0.8 To: chrisy@flix.net (Chrisy Luke) Date: Sun, 23 Jan 2000 13:48:00 -0500 (EST) Cc: freebsd-hackers@FreeBSD.ORG, mjacob@feral.com, crossd@cs.rpi.edu, cgriffiths@quansoo.com, owensc@enc.edu In-Reply-To: <20000123165938.A95452@flix.net> from "Chrisy Luke" at Jan 23, 2000 04:59:38 pm X-Mailer: ELM [version 2.4 PL24] Content-Type: text Content-Length: 934 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Of all the gin joints in all the towns in all the world, Chrisy Luke had to walk into mine and say: > First public release. Version 0.8. > > ftp://ftp.flirble.org/pub/unix/ypldap/ypldap-0.8.tar.gz Hah. You wish. Trying to gunzip this file yields: gunzip: ypldap-0.8.tar.gz: invalid compressed data--format violated Try again, and this time test it to make sure you did it right. -Bill -- ============================================================================= -Bill Paul (212) 854-6020 | System Manager, Master of Unix-Fu Work: wpaul@ctr.columbia.edu | Center for Telecommunications Research Home: wpaul@skynet.ctr.columbia.edu | Columbia University, New York City ============================================================================= "It is not I who am crazy; it is I who am mad!" - Ren Hoek, "Space Madness" ============================================================================= To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sun Jan 23 12:12:52 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from canonware.com (canonware.com [207.20.242.18]) by hub.freebsd.org (Postfix) with SMTP id 73BA014C57 for ; Sun, 23 Jan 2000 12:12:50 -0800 (PST) (envelope-from jasone@canonware.com) Received: (qmail 60518 invoked by uid 1001); 23 Jan 2000 20:10:55 -0000 Date: Sun, 23 Jan 2000 12:10:55 -0800 From: Jason Evans To: Mikhail Teterin Cc: David Schwartz , bde@freebsd.org, hackers@freebsd.org Subject: Re: kern/13644 Message-ID: <20000123121055.F27689@sturm.canonware.com> References: <000a01bf655e$314bb6c0$021d85d1@youwant.to> <200001231636.LAA43285@rtfm.newton> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0i In-Reply-To: <200001231636.LAA43285@rtfm.newton>; from mi@kot.ne.mediaone.net on Sun, Jan 23, 2000 at 11:36:08AM -0500 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Sun, Jan 23, 2000 at 11:36:08AM -0500, Mikhail Teterin wrote: > David Schwartz once stated: > > => =FreeBSD: > => ==> => If timeout is a non-nil pointer, it specifies a maximum > => ==> => interval to wait for the selection to complete. > > = While the pthreads case is clearly a bug, in the other cases, > =FreeBSD's behavior seems correct. The timeout is bounding the time we > =wait for the selection to complete. However, the time to get back to > =the task includes more than just the time spent waiting for the > =selection to complete. I don't think this is "clearly a bug" in the pthreads case. > It appears, that you, as well as other developers, speak from the > implementation point of view. I only look at the man-page. The man page > says, the time out is the UPPER limit. The pthread case is broken even > further... > > Bruce, it appeared, tried to say the man-page is broken, while the > implementation is correct, but remains silent despite me quoting all > sorts of other man-pages from all sorts of other vendors, who all say > (almost) the same thing: > > that the timeout is indeed the UPPER limit, and not the LOWER. I thought Bruce was pretty clear when he explained that such upper bounds are not possible unless the operating system can make hard real-time guarantees. FreeBSD is clearly not capable of hard real-time. If I remember correctly, neither are any of the operating systems from which you quoted man pages. That makes *all* of those man pages inaccurate. FreeBSD can put a process to sleep for a specified period of time, but it absolutely does not guarantee that the process will be run again precisely when the timeout has expired. In fact, as explained in earlier email, the timeout is rounded up in order to be certain that the process isn't woken up too early. Our man page is wrong: If timeout is a non-nil pointer, it specifies a maximum interval to wait for the selection to complete. This could perhaps be rewritten to say: If timeout is a non-nil pointer, it specifies a constrained lower bound on the maximum interval to wait for the selection to complete before again allowing the process to run. This reflects reality more closely, but I wouldn't argue for it being a better man page explanation of select() timeout semantics. If you can come up with some better wording that you can convince a committer is accurate and comprehensible, you might consider pursuing this issue. That's the only direction I have any interest in following this discussion in, however. Jason To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sun Jan 23 13:33:19 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from vorbis.noc.easynet.net (vorbis.noc.easynet.net [195.40.1.254]) by hub.freebsd.org (Postfix) with SMTP id 630E414E9E for ; Sun, 23 Jan 2000 13:33:14 -0800 (PST) (envelope-from chrisy@vorbis.noc.easynet.net) Received: (qmail 97569 invoked by uid 1943); 23 Jan 2000 21:31:08 -0000 Date: Sun, 23 Jan 2000 21:31:08 +0000 From: Chrisy Luke To: freebsd-hackers@freebsd.org Cc: mjacob@feral.com, crossd@cs.rpi.edu, cgriffiths@quansoo.com, owensc@enc.edu Subject: Re: ypldap-0.8 Message-ID: <20000123213108.K95452@flix.net> References: <20000123165938.A95452@flix.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0pre2i In-Reply-To: <20000123165938.A95452@flix.net> Organization: The Flirble Internet Exchange X-URL: http://www.flix.net/ X-FTP: ftp://ftp.flirble.org/ Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Chrisy Luke wrote (on Jan 23): > First public release. Version 0.8. > ftp://ftp.flirble.org/pub/unix/ypldap/ypldap-0.8.tar.gz *cough* It's now *really* available. Honest. :-) Regards, Chris. -- == chris@easynet.net, chrisy@flirble.org. +44 20 7900 4444 == Systems Manager for Easynet, a part of Easynet Group PLC. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sun Jan 23 13:50:26 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from alcanet.com.au (mail.alcanet.com.au [203.62.196.10]) by hub.freebsd.org (Postfix) with ESMTP id 5FA6915606 for ; Sun, 23 Jan 2000 13:50:22 -0800 (PST) (envelope-from jeremyp@gsmx07.alcatel.com.au) Received: by border.alcanet.com.au id <115201>; Mon, 24 Jan 2000 08:50:56 +1100 Content-return: prohibited From: Peter Jeremy Subject: Re: Better fixit (was: Why was rsh removed from the fixit floppy?) To: hackers@FreeBSD.ORG Cc: grog@lemis.com Message-Id: <00Jan24.085056est.115201@border.alcanet.com.au> MIME-version: 1.0 X-Mailer: Mutt 1.0i Content-type: text/plain; charset=us-ascii Date: Mon, 24 Jan 2000 08:50:55 +1100 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Fri, 21 Jan 2000 18:01:34 +0530, Greg Lehey wrote: >If you want a better fixit floppy, you should consider the new custom >disk pair with PicoBSD ... There's still space on there; what >else could we put there? ssh or OpenSSH (though this might cause distribution problems - how did Jordan's visit to WC's Counsel go?) Peter To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sun Jan 23 13:59:22 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from mimer.webgiro.com (mimer.webgiro.com [212.209.29.5]) by hub.freebsd.org (Postfix) with ESMTP id 3DEB514FD6; Sun, 23 Jan 2000 13:59:18 -0800 (PST) (envelope-from abial@webgiro.com) Received: by mimer.webgiro.com (Postfix, from userid 66) id 19EDC2DC09; Sun, 23 Jan 2000 22:59:02 +0100 (CET) Received: by mx.webgiro.com (Postfix, from userid 1001) id 662F87811; Sun, 23 Jan 2000 22:59:23 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by mx.webgiro.com (Postfix) with ESMTP id 5B46410E10; Sun, 23 Jan 2000 22:59:23 +0100 (CET) Date: Sun, 23 Jan 2000 22:59:23 +0100 (CET) From: Andrzej Bialecki To: Bill Maniatty Cc: Jeroen Ruigrok/Asmodai , FreeBSD-doc@FreeBSD.ORG, maniatty@cs.albany.edu, freebsd-hackers@FreeBSD.ORG, Greg Lehey Subject: Re: Learning the FreeBSD Kernel In-Reply-To: <200001231648.LAA53658@cs.rpi.edu> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Sun, 23 Jan 2000, Bill Maniatty wrote: > > Definately not an ethernet card. *g* > > Seems no-one can keep up with Bill Paul in that aspect. =) > > We probably could not compete :-), but we are interested in ethernet > card drivers (at some point) and would like to learn. > > > You could try usb devices and contact Nick Hibma for his expertise on > > that area. > > How mature is the USB driver technology? If it is pretty preliminary > we may wish to visit that later. Please recall that we are on a learning > curve here. Another thing to consider (AFAIU the issues here, of course :-) is whether to choose a device that sits directly on one of standard buses (like PCI or ISA), or has intermediate bus abstraction layer in between (like e.g. ppbus or usb). I would assume that learning the latter would take more time. Andrzej Bialecki // WebGiro AB, Sweden (http://www.webgiro.com) // ------------------------------------------------------------------- // ------ FreeBSD: The Power to Serve. http://www.freebsd.org -------- // --- Small & Embedded FreeBSD: http://www.freebsd.org/~picobsd/ ---- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sun Jan 23 14:37:42 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from frmug.org (frmug-gw.frmug.org [193.56.58.252]) by hub.freebsd.org (Postfix) with ESMTP id 9448214C1D; Sun, 23 Jan 2000 14:35:44 -0800 (PST) (envelope-from roberto@keltia.freenix.fr) Received: (from uucp@localhost) by frmug.org (8.9.3/frmug-2.5/nospam) with UUCP id XAA12368; Sun, 23 Jan 2000 23:35:41 +0100 (CET) (envelope-from roberto@keltia.freenix.fr) Received: by keltia.freenix.fr (Postfix, from userid 101) id 5FBD68863; Sun, 23 Jan 2000 20:48:39 +0100 (CET) Date: Sun, 23 Jan 2000 20:48:39 +0100 From: Ollivier Robert To: freebsd-hackers@FreeBSD.ORG, freebsd-mobile@FreeBSD.ORG Subject: Re: disappearing mount points after install Message-ID: <20000123204839.A52481@keltia.freenix.fr> Mail-Followup-To: freebsd-hackers@FreeBSD.ORG, freebsd-mobile@FreeBSD.ORG References: <3889ECB5.9E75171B@cybercable.fr> <20000123085043.C39472@PacHell.TelcoSucks.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0i In-Reply-To: <20000123085043.C39472@PacHell.TelcoSucks.org>; from ulf@Alameda.net on Sun, Jan 23, 2000 at 08:50:43AM -0800 X-Operating-System: FreeBSD 4.0-CURRENT/ELF AMD-K6/200 & 2x PPro/200 SMP Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG According to Ulf Zimmermann: > and haven't bothered to check on my Sony (does the Z505R even do suspend > to disk?) Oh yes. My Z505SX has a 200 MB slice at the end of the disk reserved for that purpose. It works beautifully. -- Ollivier ROBERT -=- FreeBSD: The Power to Serve! -=- roberto@keltia.freenix.fr FreeBSD keltia.freenix.fr 4.0-CURRENT #77: Thu Dec 30 12:49:51 CET 1999 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sun Jan 23 14:53:56 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from mail-ob.kamp.net (mail-ob.kamp.net [195.62.97.26]) by hub.freebsd.org (Postfix) with ESMTP id E263514F86 for ; Sun, 23 Jan 2000 14:53:47 -0800 (PST) (envelope-from Joachim.Jaeckel@d.kamp.net) Received: from d.kamp.net (port-25.d.kamp.de [195.62.120.217]) by mail-ob.kamp.net (8.9.3/8.9.3) with ESMTP id XAA03855; Sun, 23 Jan 2000 23:53:41 +0100 Message-ID: <388B8724.D3B9707C@d.kamp.net> Date: Sun, 23 Jan 2000 23:56:36 +0100 From: "Joachim Jäckel" X-Mailer: Mozilla 4.07 [en] (X11; I; FreeBSD 3.3-19991111-STABLE i386) MIME-Version: 1.0 To: asmodai@wxs.nl, nox@jelal.kn-bremen.de, "freebsd-hackers@freebsd.org" Subject: Re: How to write a device-driver? Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Hello again, thanks for your answers, last week, I was really busy to work, gather information for the card, inspect the existing drivers and so on... Here´s some information to the card I'd like to support: It's a Miro DC10+ Video Grabber Card for Non-Linear Video-Editing. It uses a Siemens SAA7110, a Zoran 36060+36067 and a ADV???? chip to en- and decode the video-information. I got the specifications for the chips from Siemens and Zoran's Web-Sites and a first driver-skeleton was generated through the /usr/share/examples/drivers/make_pci... script for me. Currently I get a boot-message from my kernel, that he has found the card.(I read the pci_id and send a text-message :-) Additionally I found a linux-driver for this card (an early one...) but it is not fully compatible with the documentation, I got. The chip-documentation is a little bit hard to read for someone who is used to program commercial-applications. (and another thing at the moment is to understand, what is needed in the driver to communicate with these chips...) But I'm working on it... (I think that I could get it running one day...) Currently I'm reading the sources of the bktr- and meteor-device to examine the equals etc. Maybe you would allow me one question? (To get a little faster to the information than browsing through the source.) The card uses several registers in the "front-end" chip, the zoran 36067, which are described in the documentation. I found the pci_map_mem function, where I've to pass a virtual and a base address to the function which are usually defined in the softc structure. My softc structure should therefore look something like this: typedef struct mdcten_softc { struct zoran36067_regs *base; vm_offset_t phys_base; ... and the zoran36067_regs like: struct zoran36067_regs { u_int rega; u_int regb; etc. But how get's the zoran36067_regs structure the information from the chip? If I change the content of the structure, which function would change the registers on the chip accordingly? (Or is it done through the call of pci_map_mem? And is everything I change to the structure automatically changed on the card?) It would be nice if you would answer my question, to make it a little bit easier for me. Sorry, if these questions are real dumb ones! Thanks in advance. -- Joachim.Jaeckel@d.kamp.net -- http://home.kamp.net/home/joachim.jaeckel To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sun Jan 23 16:41: 5 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from mass.cdrom.com (castles537.castles.com [208.214.165.101]) by hub.freebsd.org (Postfix) with ESMTP id B0A7614D18; Sun, 23 Jan 2000 16:41:00 -0800 (PST) (envelope-from msmith@mass.cdrom.com) Received: from mass.cdrom.com (localhost [127.0.0.1]) by mass.cdrom.com (8.9.3/8.9.3) with ESMTP id QAA09005; Sun, 23 Jan 2000 16:49:18 -0800 (PST) (envelope-from msmith@mass.cdrom.com) Message-Id: <200001240049.QAA09005@mass.cdrom.com> X-Mailer: exmh version 2.1.1 10/15/1999 To: Bill Maniatty Cc: Jeroen Ruigrok/Asmodai , FreeBSD-doc@FreeBSD.ORG, maniatty@cs.albany.edu, freebsd-hackers@FreeBSD.ORG, Greg Lehey Subject: Re: Learning the FreeBSD Kernel In-reply-to: Your message of "Sun, 23 Jan 2000 11:48:39 EST." <200001231648.LAA53658@cs.rpi.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sun, 23 Jan 2000 16:49:18 -0800 From: Mike Smith Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > > Actually the lack a reference or tutorial document is kind of damning > in a way, since it gives hardware vendors a powerful excuse not to > support FreeBSD in the way that say Lin*x is supported. We have a better solution; they just give us the documentation and we write the drivers for them. The end result is a better driver, produced in less time, and with a motivated maintainer. I've also written skeleton drivers for hardware vendors; typically they just have to fill in the very lowest level of the driver for their device, the rest can be generated in a couple of hours based on only the very simplest description. Writing documentation is a resource-sucking nuisance; supporting outdated documentation even more so. The BSD driver model is sufficiently simple that it's fair to say that if you can't work it out from the code, you probably shouldn't be writing a driver in the first place. That's not to say that a document describing the process wouldn't be good, merely that such a document isn't actually going to help _us_ very much at all. -- \\ Give a man a fish, and you feed him for a day. \\ Mike Smith \\ Tell him he should learn how to fish himself, \\ msmith@freebsd.org \\ and he'll hate you for a lifetime. \\ msmith@cdrom.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sun Jan 23 17:16:28 2000 Delivered-To: freebsd-hackers@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 758) id 55E4C14A24; Sun, 23 Jan 2000 17:16:27 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by hub.freebsd.org (Postfix) with ESMTP id 4741C1CD689; Sun, 23 Jan 2000 17:16:27 -0800 (PST) (envelope-from kris@hub.freebsd.org) Date: Sun, 23 Jan 2000 17:16:27 -0800 (PST) From: Kris Kennaway To: Peter Jeremy Cc: hackers@FreeBSD.ORG, grog@lemis.com Subject: Re: Better fixit (was: Why was rsh removed from the fixit floppy?) In-Reply-To: <00Jan24.085056est.115201@border.alcanet.com.au> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Mon, 24 Jan 2000, Peter Jeremy wrote: > On Fri, 21 Jan 2000 18:01:34 +0530, Greg Lehey wrote: > >If you want a better fixit floppy, you should consider the new custom > >disk pair with PicoBSD ... There's still space on there; what > >else could we put there? > > ssh or OpenSSH (though this might cause distribution problems - how did > Jordan's visit to WC's Counsel go?) Unfortunately openssh is quite a bit bigger than the standard ssh, because openssl isn't exactly the slimmest crypto library in the world :-) But, it would definitely be a cool thing. Kris ---- "How many roads must a man walk down, before you call him a man?" "Eight!" "That was a rhetorical question!" "Oh..then, seven!" -- Homer Simpson To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sun Jan 23 17:21:40 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from taurus.cs.albany.edu (taurus.cs.albany.edu [169.226.2.109]) by hub.freebsd.org (Postfix) with ESMTP id D122814C4F; Sun, 23 Jan 2000 17:21:34 -0800 (PST) (envelope-from maniatty@cs.albany.edu) Received: from richard.cs.albany.edu (richard.cs.albany.edu [169.226.2.48]) by taurus.cs.albany.edu (8.9.3+Sun/8.9.1) with ESMTP id UAA22758; Sun, 23 Jan 2000 20:21:30 -0500 (EST) From: "William A. Maniatty" Received: (from maniatty@localhost) by richard.cs.albany.edu (SMI-8.6/CLI2) id UAA01945; Sun, 23 Jan 2000 20:23:01 -0500 Date: Sun, 23 Jan 2000 20:23:01 -0500 Message-Id: <200001240123.UAA01945@richard.cs.albany.edu> To: maniattb@cs.rpi.edu, msmith@freebsd.org Subject: Re: Learning the FreeBSD Kernel Cc: FreeBSD-doc@freebsd.org, asmodai@wxs.nl, freebsd-hackers@freebsd.org, grog@lemis.com, maniatty@cs.albany.edu Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Mike Smith Writes (in response to me): > >> >> Actually the lack a reference or tutorial document is kind of damning >> in a way, since it gives hardware vendors a powerful excuse not to >> support FreeBSD in the way that say Lin*x is supported. > >We have a better solution; they just give us the documentation and we >write the drivers for them. The end result is a better driver, produced >in less time, and with a motivated maintainer. This might not be right, many vendors don't want their competitors to know their interface specification (to prevent cheap clones). FreeBSD does not have that restriction, so you may have it backwards. >I've also written skeleton drivers for hardware vendors; typically they >just have to fill in the very lowest level of the driver for their device, >the rest can be generated in a couple of hours based on only the very >simplest description. So where is that very simplest description written, maintained and published? >Writing documentation is a resource-sucking nuisance; supporting outdated >documentation even more so. The BSD driver model is sufficiently simple >that it's fair to say that if you can't work it out from the code, you >probably shouldn't be writing a driver in the first place. That's not to >say that a document describing the process wouldn't be good, merely that >such a document isn't actually going to help _us_ very much at all. I do not happen to agree. A better solution is to lower the barrier to entry so that people (including hardware vendors) can supply drivers. Right now the situation is that both sides say "Documentation is not in our best interest, so you cannot have any.", which is bad. Actually such a document COULD INCREASE DEVICE SUPPORT which is a MAJOR FACTOR in people's decision to use or avoid an OS. Perhaps less time could be spent whining about lack of users and how users don't have clue and more time could be spent making the good technology accessible. Regards: Bill Maniatty To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sun Jan 23 17:26:26 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from kot.ne.mediaone.net (kot.ne.mediaone.net [24.218.15.190]) by hub.freebsd.org (Postfix) with ESMTP id 7D50614C4F; Sun, 23 Jan 2000 17:26:22 -0800 (PST) (envelope-from mi@kot.ne.mediaone.net) Received: from rtfm.newton (mi@rtfm.newton [10.10.0.1]) by kot.ne.mediaone.net (8.9.3/8.9.1) with ESMTP id UAA06402; Sun, 23 Jan 2000 20:26:15 -0500 (EST) From: Mikhail Teterin X-Relay-IP: 10.10.0.1 Received: (from mi@localhost) by rtfm.newton (8.9.3/8.9.3) id UAA44772; Sun, 23 Jan 2000 20:26:15 -0500 (EST) (envelope-from mi@kot.ne.mediaone.net) Message-Id: <200001240126.UAA44772@rtfm.newton> Subject: Re: kern/13644 In-Reply-To: <20000123121055.F27689@sturm.canonware.com> from Jason Evans at "Jan 23, 2000 12:10:55 pm" To: Jason Evans Date: Sun, 23 Jan 2000 20:26:15 -0500 (EST) Cc: Mikhail Teterin , David Schwartz , bde@freebsd.org, hackers@freebsd.org X-Face: %UW#n0|w>ydeGt/b@1-.UFP=K^~-:0f#O:D7w hJ5G_<5143Bb3kOIs9XpX+"V+~$adGP:J|SLieM31VIhqXeLBli"; Sun, 23 Jan 2000 17:33:01 -0800 (PST) (envelope-from jazepeda@pacbell.net) Received: from zippy.dyn.ml.org ([207.214.116.100]) by mta4.snfc21.pbi.net (Sun Internet Mail Server sims.3.5.1999.09.16.21.57.p8) with ESMTP id <0FOT0019VG9KB6@mta4.snfc21.pbi.net> for freebsd-hackers@FreeBSD.ORG; Sun, 23 Jan 2000 17:32:14 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by zippy.dyn.ml.org (Postfix) with ESMTP id 4B31E918C9; Sun, 23 Jan 2000 17:32:08 -0800 (PST) Date: Sun, 23 Jan 2000 17:32:08 -0800 (PST) From: Alex Zepeda Subject: Re: Learning the FreeBSD Kernel In-reply-to: <20000123125439.A20851@daemon.ninth-circle.org> To: Jeroen Ruigrok/Asmodai Cc: Bill Maniatty , freebsd-hackers@FreeBSD.ORG Message-id: MIME-version: 1.0 Content-type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Sun, 23 Jan 2000, Jeroen Ruigrok/Asmodai wrote: > >A possibly better alternative is to find a device which isn't > >currently supported by FreeBSD and write a driver for it. This would > >have the advantage that the work would also be a contribution to > >FreeBSD. The question that I can't answer here is: what would be an > >appropriate device? > > Definately not an ethernet card. *g* > Seems no-one can keep up with Bill Paul in that aspect. =) > > You could try usb devices and contact Nick Hibma for his expertise on > that area. > > Also make sure the vendor is not problematic with handing out > documentation. Intel and Motorola are good examples of companies who > have pdf's available for download. Well hey. If you're looking for something rather esoteric, I've got an ancient Logitech handheld scanner that I wouldn't mind seeing a driver for. There's supposed Linux drivers out there (didn't try too hard, but it didn't work for me) and a Win 3.1 driver that doesn't work on Win95 or newer. I'd be willing to FedEx it somewhere in the states if you're hard up for something to write a driver for :^) - alex To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sun Jan 23 17:50:29 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from fw.wintelcom.net (ns1.wintelcom.net [209.1.153.20]) by hub.freebsd.org (Postfix) with ESMTP id 68F97150AD; Sun, 23 Jan 2000 17:50:27 -0800 (PST) (envelope-from bright@fw.wintelcom.net) Received: (from bright@localhost) by fw.wintelcom.net (8.9.3/8.9.3) id SAA10613; Sun, 23 Jan 2000 18:14:23 -0800 (PST) Date: Sun, 23 Jan 2000 18:14:23 -0800 From: Alfred Perlstein To: Mikhail Teterin Cc: Jason Evans , David Schwartz , bde@FreeBSD.ORG, hackers@FreeBSD.ORG Subject: Re: kern/13644 Message-ID: <20000123181423.W26520@fw.wintelcom.net> References: <20000123121055.F27689@sturm.canonware.com> <200001240126.UAA44772@rtfm.newton> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0.1i In-Reply-To: <200001240126.UAA44772@rtfm.newton>; from mi@kot.ne.mediaone.net on Sun, Jan 23, 2000 at 08:26:15PM -0500 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG * Mikhail Teterin [000123 17:51] wrote: > Jason Evans once stated: > > =I thought Bruce was pretty clear when he explained that such upper > =bounds are not possible unless the operating system can make hard > =real-time guarantees. > > His explanation contradicted ALL of the documentation I was able to > find, and he chose not to comment on the contradiction. > > =FreeBSD is clearly not capable of hard real-time. If I remember > =correctly, neither are any of the operating systems from which you > =quoted man pages. That makes *all* of those man pages inaccurate. > > In other words, we found a flow in the most (all?) Unix implementations? > Including FreeBSD. Alright. > > =In fact, as explained in earlier email, the timeout is rounded up in > =order to be certain that the process isn't woken up too early. > > I did not want to be dragged into discussing the implementation, which > is something I'm only beginning to learn. But, perhaps, it can be > rounded DOWN instead? An application written by the man-page will expect > to be waken up EARLY (like TCL's implementation of after(n)), but no > man-page hints at the possibility to be waken up LATE. And yes, it > should, of course, understand that it may not actually get to run > because of the scheduling issues. > > =Our man page is wrong: > = > = If timeout is a non-nil pointer, it specifies a > = maximum interval to wait for the selection to complete. > > =If you can come up with some better wording that you can convince a > =committer is accurate and comprehensible, you might consider pursuing > =this issue. That's the only direction I have any interest in following > =this discussion in, however. > > That's very nice, thank you. How about re-opening the PR? > > Peter Jeremy wrote: > > =Please provide a test program and results from these other vendors > =demonstrating that their select() will return before the specified time > =limit in the absence of any other event. > > Never claimed it will... All of the man pages say, it is possible, > though. They do NOT say it is possible to return AFTER. Of course, the > program may not get to actually run right then. Just like it may be > delayed returning from a printf()... > > The test program is very simple -- one line of TCL: > > time {after 20} 100 > > This will report how many microseconds did a select for 20 milliseconds > _really_ take -- an average over 100 attempts. On an idle DUAL processor > PentiumII-300, with 3.4-STABLE, the typical result is 29937 microseconds > per iteration. On SunOS tornado 5.5.1 Generic_103640-24 sun4m sparc > SUNW,SPARCstation-20 it is a little better: 28167 microseconds per > iteration. Similarly for Irix. The TCL's over-head can be measured by > something simple, like: > > time {set a 5} 100 > 3 microseconds per iteration # On FreeBSD > 16 microseconds per iteration # On SunOS > 28 microseconds per iteration # On Irix 6.5 > > HOWEVER! The reason I brought up the other vendors, was not to > claim, their IMPLEMENTATION was better then FreeBSD's, but that their > DOCUMENTATION was the same as ours. Bruce was saying our man page is > broken. I wanted him, or someone else, to confirm that all those other > vendors are incorrect in their man pages too. > > You are saying, the man-pages are correct (contradicting Bruce)... No the manpages are wrong on every single system you've mentioned as it's nearly impossible to return to the user in the exact amount of time specified. I'll be fixing the manpage shortly, you should contact other vendors. -- -Alfred Perlstein - [bright@wintelcom.net|alfred@freebsd.org] To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sun Jan 23 18: 5: 7 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from rover.village.org (rover.village.org [204.144.255.49]) by hub.freebsd.org (Postfix) with ESMTP id E92A915093; Sun, 23 Jan 2000 18:04:48 -0800 (PST) (envelope-from imp@harmony.village.org) Received: from harmony.village.org (harmony.village.org [10.0.0.6]) by rover.village.org (8.9.3/8.9.3) with ESMTP id TAA97916; Sun, 23 Jan 2000 19:02:06 -0700 (MST) (envelope-from imp@harmony.village.org) Received: from harmony.village.org (localhost.village.org [127.0.0.1]) by harmony.village.org (8.9.3/8.8.3) with ESMTP id TAA47817; Sun, 23 Jan 2000 19:02:38 -0700 (MST) Message-Id: <200001240202.TAA47817@harmony.village.org> To: Jeroen Ruigrok/Asmodai Subject: Re: Learning the FreeBSD Kernel Cc: Bill Maniatty , FreeBSD-doc@FreeBSD.ORG, maniatty@cs.albany.edu, freebsd-hackers@FreeBSD.ORG, Greg Lehey In-reply-to: Your message of "Sun, 23 Jan 2000 12:54:39 +0100." <20000123125439.A20851@daemon.ninth-circle.org> References: <20000123125439.A20851@daemon.ninth-circle.org> <200001230406.XAA43423@cs.rpi.edu> <20000123153526.I930@mojave.worldwide.lemis.com> Date: Sun, 23 Jan 2000 19:02:38 -0700 From: Warner Losh Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG I'd also concentrate more on the relatively completely newbused drivers: dev/ed dev/ep dev/sn and ignore the incomplete ones, of which only one comes to bind (aha). Warner To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sun Jan 23 18: 8:43 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by hub.freebsd.org (Postfix) with ESMTP id 743D214E03; Sun, 23 Jan 2000 18:08:40 -0800 (PST) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.9.3/8.9.3) id UAA20228; Sun, 23 Jan 2000 20:08:07 -0600 (CST) (envelope-from dan) Date: Sun, 23 Jan 2000 20:08:07 -0600 From: Dan Nelson To: Mikhail Teterin Cc: Jason Evans , David Schwartz , bde@FreeBSD.ORG, hackers@FreeBSD.ORG Subject: Re: kern/13644 Message-ID: <20000123200807.A19917@dan.emsphone.com> References: <20000123121055.F27689@sturm.canonware.com> <200001240126.UAA44772@rtfm.newton> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0.1i In-Reply-To: <200001240126.UAA44772@rtfm.newton>; from "Mikhail Teterin" on Sun Jan 23 20:26:15 GMT 2000 X-OS: FreeBSD 4.0-CURRENT Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG In the last episode (Jan 23), Mikhail Teterin said: > =FreeBSD is clearly not capable of hard real-time. If I > =remember correctly, neither are any of the operating systems from > =which you quoted man pages. That makes *all* of those man pages > =inaccurate. > > In other words, we found a flow in the most (all?) Unix implementations? > Including FreeBSD. Alright. If you want to call it a flaw, then yes. The kernel always has priority over user processes. If an ethernet packet comes in, a character is received over a serial port, or a disk wants to return a block of data requested by the system, your user process *will* stop and the kernel will processes the interrupt. If that interrupt takes a while, a select() or poll() may very well return later than the timeout specified. Apart from writing your own kernel module, blocking all interrupts, and buzz-looping on a timer variable, there's not much you can do about it under Unix. And I'll not even mention what happens to this when you start swapping. -- Dan Nelson dnelson@emsphone.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sun Jan 23 18:14:33 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from kot.ne.mediaone.net (kot.ne.mediaone.net [24.218.15.190]) by hub.freebsd.org (Postfix) with ESMTP id 951101576C; Sun, 23 Jan 2000 18:14:21 -0800 (PST) (envelope-from mi@kot.ne.mediaone.net) Received: from rtfm.newton (mi@rtfm.newton [10.10.0.1]) by kot.ne.mediaone.net (8.9.3/8.9.1) with ESMTP id VAA06601; Sun, 23 Jan 2000 21:14:09 -0500 (EST) From: Mikhail Teterin X-Relay-IP: 10.10.0.1 Received: (from mi@localhost) by rtfm.newton (8.9.3/8.9.3) id VAA45195; Sun, 23 Jan 2000 21:14:09 -0500 (EST) (envelope-from mi@kot.ne.mediaone.net) Message-Id: <200001240214.VAA45195@rtfm.newton> Subject: Re: kern/13644 In-Reply-To: <20000123200807.A19917@dan.emsphone.com> from Dan Nelson at "Jan 23, 2000 08:08:07 pm" To: Dan Nelson Date: Sun, 23 Jan 2000 21:14:09 -0500 (EST) Cc: Mikhail Teterin , Jason Evans , David Schwartz , bde@FreeBSD.ORG, hackers@FreeBSD.ORG X-Face: %UW#n0|w>ydeGt/b@1-.UFP=K^~-:0f#O:D7w hJ5G_<5143Bb3kOIs9XpX+"V+~$adGP:J|SLieM31VIhqXeLBli" =FreeBSD is clearly not capable of hard real-time. If I remember => =correctly, neither are any of the operating systems from which you => =quoted man pages. That makes *all* of those man pages inaccurate. => => In other words, we found a flaw in the most (all?) Unix => Inimplementations? cluding FreeBSD. Alright. = =If you want to call it a flaw, then yes. The kernel always has priority =over user processes. I understand. And this will also happen in case of a simple printf(). What I see, however, with select() is that it _consistently_ takes 9-10 msecs longer then specified to return. On an idle machine... Someone mentioned, that the number of ticks is, actually, rounded up. Perhaps, it should be rounded down? -mi To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sun Jan 23 19:20:32 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from mail.xmission.com (mail.xmission.com [198.60.22.22]) by hub.freebsd.org (Postfix) with ESMTP id 7B7C114F13; Sun, 23 Jan 2000 19:20:18 -0800 (PST) (envelope-from wes@softweyr.com) Received: from [204.68.178.39] (helo=softweyr.com ident=200 years too late) by mail.xmission.com with esmtp (Exim 3.03 #3) id 12Ca36-0007WU-00; Sun, 23 Jan 2000 20:20:17 -0700 Message-ID: <388BC605.FAF0479D@softweyr.com> Date: Sun, 23 Jan 2000 20:24:53 -0700 From: Wes Peters Organization: Softweyr LLC X-Mailer: Mozilla 4.7 [en] (X11; U; FreeBSD 3.3-RELEASE i386) X-Accept-Language: en MIME-Version: 1.0 To: Marwan Fayed Cc: Thierry Herbelot , freebsd-hackers@FreeBSD.ORG, freebsd-mobile@FreeBSD.ORG Subject: Re: disappearing mount points after install References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Marwan Fayed wrote: > > As Thierry (and one other I think) suggested, a DOS partition is required. > Before this was suggested to me I tried dual booting with a small DOS > partition of 2 megs to save as much space as possible. This didn't work. > Well, last night a chain of events forced me to realize that Win95, of > course, uses partitions greater than 2 megs and that I should try using > larger partitions (Thierry uses 20 on his machine). > > I first tried it with 5 megs... nothing. Then 10, 16, and still nothing. > Finally when I expanded the DOS partition to 20 megs it worked. I can only > assume this is how IBM manufactured their BIOS. And hey, it's 20 megs lost > but at least it worked. OK, let's quickly hack the VM system to allow swapping on a DOS partition. -- "Where am I, and what am I doing in this handbasket?" Wes Peters Softweyr LLC wes@softweyr.com http://softweyr.com/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sun Jan 23 19:32:25 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from pcnet1.pcnet.com (pcnet1.pcnet.com [204.213.232.3]) by hub.freebsd.org (Postfix) with ESMTP id 712AC14C13; Sun, 23 Jan 2000 19:32:23 -0800 (PST) (envelope-from eischen@vigrid.com) Received: (from eischen@localhost) by pcnet1.pcnet.com (8.8.7/PCNet) id WAA28924; Sun, 23 Jan 2000 22:32:15 -0500 (EST) Date: Sun, 23 Jan 2000 22:32:15 -0500 (EST) From: Daniel Eischen Message-Id: <200001240332.WAA28924@pcnet1.pcnet.com> To: dnelson@emsphone.com, mi@kot.ne.mediaone.net Subject: Re: kern/13644 Cc: bde@FreeBSD.ORG, davids@webmaster.com, hackers@FreeBSD.ORG, jasone@canonware.com Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > I understand. And this will also happen in case of a simple printf(). > What I see, however, with select() is that it _consistently_ takes 9-10 > msecs longer then specified to return. On an idle machine... Someone > mentioned, that the number of ticks is, actually, rounded up. Perhaps, > it should be rounded down? You can't round down and still obey POSIX semantics. "at least" will not be satisfied. You have to guarantee that the actual time is greater than or equal to the amount of time specified. Dan Eischen eischen@vigrid.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sun Jan 23 19:48:31 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from rover.village.org (rover.village.org [204.144.255.49]) by hub.freebsd.org (Postfix) with ESMTP id 562EC14A17; Sun, 23 Jan 2000 19:48:22 -0800 (PST) (envelope-from imp@harmony.village.org) Received: from harmony.village.org (harmony.village.org [10.0.0.6]) by rover.village.org (8.9.3/8.9.3) with ESMTP id UAA98473; Sun, 23 Jan 2000 20:48:01 -0700 (MST) (envelope-from imp@harmony.village.org) Received: from harmony.village.org (localhost.village.org [127.0.0.1]) by harmony.village.org (8.9.3/8.8.3) with ESMTP id UAA48859; Sun, 23 Jan 2000 20:48:34 -0700 (MST) Message-Id: <200001240348.UAA48859@harmony.village.org> To: Mikhail Teterin Subject: Re: kern/13644 Cc: Dan Nelson , Jason Evans , David Schwartz , bde@FreeBSD.ORG, hackers@FreeBSD.ORG In-reply-to: Your message of "Sun, 23 Jan 2000 21:14:09 EST." <200001240214.VAA45195@rtfm.newton> References: <200001240214.VAA45195@rtfm.newton> Date: Sun, 23 Jan 2000 20:48:34 -0700 From: Warner Losh Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG In message <200001240214.VAA45195@rtfm.newton> Mikhail Teterin writes: : I understand. And this will also happen in case of a simple printf(). : What I see, however, with select() is that it _consistently_ takes 9-10 : msecs longer then specified to return. On an idle machine... Someone : mentioned, that the number of ticks is, actually, rounded up. Perhaps, : it should be rounded down? Select(2) only guarantees that it will sleep no less than the time specified for the timeout. Rounding down will break this. Warner To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sun Jan 23 20:50:58 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from yana.lemis.com (yana.lemis.com [192.109.197.140]) by hub.freebsd.org (Postfix) with ESMTP id 099A8151A8; Sun, 23 Jan 2000 20:50:47 -0800 (PST) (envelope-from grog@mojave.worldwide.lemis.com) Received: from mojave.worldwide.lemis.com (j13.ktb6.jaring.my [161.142.234.27]) by yana.lemis.com (8.8.8/8.8.8) with ESMTP id PAA12824; Mon, 24 Jan 2000 15:19:41 +1030 (CST) (envelope-from grog@mojave.worldwide.lemis.com) Received: (from grog@localhost) by mojave.worldwide.lemis.com (8.9.3/8.9.3) id MAA02849; Mon, 24 Jan 2000 12:39:21 +0800 (MYT) (envelope-from grog) Date: Mon, 24 Jan 2000 12:39:21 +0800 From: Greg Lehey To: Bill Maniatty Cc: Jeroen Ruigrok/Asmodai , FreeBSD-doc@FreeBSD.ORG, maniatty@cs.albany.edu, freebsd-hackers@FreeBSD.ORG Subject: Re: Learning the FreeBSD Kernel Message-ID: <20000124123920.F2643@mojave.worldwide.lemis.com> Reply-To: Greg Lehey References: <20000123125439.A20851@daemon.ninth-circle.org> <200001231648.LAA53658@cs.rpi.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0i In-Reply-To: <200001231648.LAA53658@cs.rpi.edu>; from maniattb@cs.rpi.edu on Sun, Jan 23, 2000 at 11:48:39AM -0500 WWW-Home-Page: http://www.lemis.com/~grog X-PGP-Fingerprint: 6B 7B C3 8C 61 CD 54 AF 13 24 52 F8 6D A4 95 EF Organization: LEMIS, PO Box 460, Echunga SA 5153, Australia Phone: +61-8-8388-8286 Fax: +61-8-8388-8725 Mobile: +61-41-739-7062 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Sunday, 23 January 2000 at 11:48:39 -0500, Bill Maniatty wrote: > Hello Jeroen: > Jeroen Ruigrok (in response to Greg Lehey and myself): > >> -On [20000123 11:11], Greg Lehey (grog@lemis.com) wrote: >>>> 2) Choose a non-essential device with a simple preexisting driver. >>>> 3) Remove all trace of the driver from the kernel source. >>>> 4) Reapply the changes used to install the driver (perhaps one step at a time). >>>> We could suggest some simple sanity checks to support stepwise refinement. >>> >>> (1) and (2) are a good start. You don't need to remove the old >>> driver; it would in fact make it easier for debugging purposes if it >>> remained. Instead, choose another major number and name, and write a >>> new driver. This procedure is definitely *not* documented, but it's >>> the way we introduce new drivers, and I think a couple of other people >>> who have done it would be pleased to help. >> >> *nod* There are certainly people who are be able and willing to help. >> >>> A possibly better alternative is to find a device which isn't >>> currently supported by FreeBSD and write a driver for it. This would >>> have the advantage that the work would also be a contribution to >>> FreeBSD. The question that I can't answer here is: what would be an >>> appropriate device? > > First we want to get the mechanism of driver installation down, then > try our hands at writing our own driver. I fear that if we roll our > own driver software we may find that if we have errors (not that we > ever have errors mind you :-) we may not be able to isolate the > cause. This is why I was leaning towards reinstalling a working > driver first. There are two almost completely separate issues in writing drivers: 1. Writing the code to deal with the device. Having good vendor documentation helps here. 2. Fitting this code into the BSD framework. Having good OS documentation helps here. I can't agree with Mike Smith that reading the code is adequate. It certainly doesn't apply to newcomers, but it doesn't even apply to seasoned hackers like Mike: the BSD style doesn't provide for adequate comments, and so what you see from the code is mainly tactics, not strategy. For the fun of it, go through the sources in /usr/src/sys/pci and try to identify the hardware which each driver supports. The newer ones are very good in this respect, but I'd guess there would be between 10% and 20% of the files where you will be left wondering what they do. Read the code and you'll see how they do it, but you may find that that isn't enough for you :-) >> You could try usb devices and contact Nick Hibma for his expertise on >> that area. > > How mature is the USB driver technology? If it is pretty > preliminary we may wish to visit that later. Please recall that we > are on a learning curve here. I've been meaning to look at USB stuff too. So far, I haven't been brave enough. I do think that the idea of taking an existing driver and cloning it is a good one. Maybe we can identify an old and mouldy one which needs rewriting. I've heard things about the floppy disk driver, but I'm not sure that it hasn't already been done, though the code suggests it's pretty old. Greg -- Finger grog@lemis.com for PGP public key See complete headers for address and phone numbers To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sun Jan 23 20:51:29 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from yana.lemis.com (yana.lemis.com [192.109.197.140]) by hub.freebsd.org (Postfix) with ESMTP id BBD571557C; Sun, 23 Jan 2000 20:51:05 -0800 (PST) (envelope-from grog@mojave.worldwide.lemis.com) Received: from mojave.worldwide.lemis.com (j13.ktb6.jaring.my [161.142.234.27]) by yana.lemis.com (8.8.8/8.8.8) with ESMTP id PAA12830; Mon, 24 Jan 2000 15:20:43 +1030 (CST) (envelope-from grog@mojave.worldwide.lemis.com) Received: (from grog@localhost) by mojave.worldwide.lemis.com (8.9.3/8.9.3) id MAA02811; Mon, 24 Jan 2000 12:22:10 +0800 (MYT) (envelope-from grog) Date: Mon, 24 Jan 2000 12:22:10 +0800 From: Greg Lehey To: Takeshi Morishima Cc: FreeBSD Hackers Subject: Re: Looking for info about 82559 (Intel PRO/100+) Message-ID: <20000124122210.E2643@mojave.worldwide.lemis.com> Reply-To: Greg Lehey References: <200001231837.MAA03847@aquarium.ml-search.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0i In-Reply-To: <200001231837.MAA03847@aquarium.ml-search.com>; from tm@interaccess.com on Sun, Jan 23, 2000 at 12:37:08PM -0600 WWW-Home-Page: http://www.lemis.com/~grog X-PGP-Fingerprint: 6B 7B C3 8C 61 CD 54 AF 13 24 52 F8 6D A4 95 EF Organization: LEMIS, PO Box 460, Echunga SA 5153, Australia Phone: +61-8-8388-8286 Fax: +61-8-8388-8725 Mobile: +61-41-739-7062 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG [moving from -questions to -hackers] On Sunday, 23 January 2000 at 12:37:08 -0600, Takeshi Morishima wrote: > > I'm looking for information about Intel 82559 registers, to do some > experiment with fxp driver and Intel PRO/100+ fast ethernet adapter. > 82559 datasheet from the Intel web site does not contain the level of > details I need. I'd like to know if multiple (private) MAC addresses > can be programmed, and if it can, how I program it. Can the chip allow > me to add and remove any MAC address dynamically (on the fly?). I can't, but I'm sure there's somebody on -hackers who can help you. Don't send this kind of question to -questions, it goes rather beyond simple operational issues. Greg -- Finger grog@lemis.com for PGP public key See complete headers for address and phone numbers To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sun Jan 23 21:11:29 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from cs.rpi.edu (mumble.cs.rpi.edu [128.213.8.16]) by hub.freebsd.org (Postfix) with ESMTP id DF00C15005; Sun, 23 Jan 2000 21:11:21 -0800 (PST) (envelope-from maniattb@cs.rpi.edu) Received: from cs.rpi.edu (maniattb@dishwasher.cs.rpi.edu [128.213.8.31]) by cs.rpi.edu (8.9.3/8.9.3) with ESMTP id AAA68097; Mon, 24 Jan 2000 00:11:10 -0500 (EST) Message-Id: <200001240511.AAA68097@cs.rpi.edu> X-Mailer: exmh version 2.0.1 12/23/97 To: Greg Lehey Cc: Bill Maniatty , Jeroen Ruigrok/Asmodai , FreeBSD-doc@FreeBSD.ORG, maniatty@cs.albany.edu, freebsd-hackers@FreeBSD.ORG, maniattb@cs.rpi.edu Subject: Re: Learning the FreeBSD Kernel In-reply-to: Your message of "Mon, 24 Jan 2000 12:39:21 +0800." <20000124123920.F2643@mojave.worldwide.lemis.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Mon, 24 Jan 2000 00:11:08 -0500 From: Bill Maniatty Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > On Sunday, 23 January 2000 at 11:48:39 -0500, Bill Maniatty wrote: > > Hello Jeroen: > > Jeroen Ruigrok (in response to Greg Lehey and myself): > > > >> -On [20000123 11:11], Greg Lehey (grog@lemis.com) wrote: > >>>> 2) Choose a non-essential device with a simple preexisting driver. > >>>> 3) Remove all trace of the driver from the kernel source. > >>>> 4) Reapply the changes used to install the driver (perhaps one step at a time). > >>>> We could suggest some simple sanity checks to support stepwise refinement. > >>> > >>> (1) and (2) are a good start. You don't need to remove the old > >>> driver; it would in fact make it easier for debugging purposes if it > >>> remained. Instead, choose another major number and name, and write a > >>> new driver. This procedure is definitely *not* documented, but it's > >>> the way we introduce new drivers, and I think a couple of other people > >>> who have done it would be pleased to help. > >> > >> *nod* There are certainly people who are be able and willing to help. > >> > >>> A possibly better alternative is to find a device which isn't > >>> currently supported by FreeBSD and write a driver for it. This would > >>> have the advantage that the work would also be a contribution to > >>> FreeBSD. The question that I can't answer here is: what would be an > >>> appropriate device? > > > > First we want to get the mechanism of driver installation down, then > > try our hands at writing our own driver. I fear that if we roll our > > own driver software we may find that if we have errors (not that we > > ever have errors mind you :-) we may not be able to isolate the > > cause. This is why I was leaning towards reinstalling a working > > driver first. > > There are two almost completely separate issues in writing drivers: > > 1. Writing the code to deal with the device. Having good vendor > documentation helps here. > > 2. Fitting this code into the BSD framework. Having good OS > documentation helps here. Good point, while I would like to see more vendors step up and document their device interfaces, that part is not within grasp. > I can't agree with Mike Smith that reading the code is adequate. It > certainly doesn't apply to newcomers, but it doesn't even apply to > seasoned hackers like Mike: the BSD style doesn't provide for adequate > comments, and so what you see from the code is mainly tactics, not > strategy. For the fun of it, go through the sources in > /usr/src/sys/pci and try to identify the hardware which each driver > supports. The newer ones are very good in this respect, but I'd guess > there would be between 10% and 20% of the files where you will be left > wondering what they do. Read the code and you'll see how they do it, > but you may find that that isn't enough for you :-) Thanks Greg, these remarks confirm my suspiscions. [deletia] > I do think that the idea of taking an existing driver and cloning it > is a good one. Maybe we can identify an old and mouldy one which > needs rewriting. I've heard things about the floppy disk driver, but > I'm not sure that it hasn't already been done, though the code > suggests it's pretty old. I think that might be a good idea, but right now we might be better served by simply playing with a modern driver and what the installation process is. Again we want to understand how to install a driver and where it interfaces with the Kernel. But the idea of updating an older driver to the modern structure is attractive. Greg, thanks for your constructive input. Regards: Bill Maniatty To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sun Jan 23 21:24:11 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from kot.ne.mediaone.net (kot.ne.mediaone.net [24.218.15.190]) by hub.freebsd.org (Postfix) with ESMTP id E6A1A14E6D; Sun, 23 Jan 2000 21:24:05 -0800 (PST) (envelope-from mi@kot.ne.mediaone.net) Received: from rtfm.newton (mi@rtfm.newton [10.10.0.1]) by kot.ne.mediaone.net (8.9.3/8.9.1) with ESMTP id AAA07403; Mon, 24 Jan 2000 00:24:02 -0500 (EST) From: Mikhail Teterin X-Relay-IP: 10.10.0.1 Received: (from mi@localhost) by rtfm.newton (8.9.3/8.9.3) id AAA46117; Mon, 24 Jan 2000 00:24:02 -0500 (EST) (envelope-from mi@kot.ne.mediaone.net) Message-Id: <200001240524.AAA46117@rtfm.newton> Subject: Re: kern/13644 In-Reply-To: <200001240348.UAA48859@harmony.village.org> from Warner Losh at "Jan 23, 2000 08:48:34 pm" To: Warner Losh Date: Mon, 24 Jan 2000 00:24:02 -0500 (EST) Cc: Mikhail Teterin , Dan Nelson , Jason Evans , David Schwartz , bde@FreeBSD.ORG, hackers@FreeBSD.ORG X-Face: %UW#n0|w>ydeGt/b@1-.UFP=K^~-:0f#O:D7w hJ5G_<5143Bb3kOIs9XpX+"V+~$adGP:J|SLieM31VIhqXeLBli" Mikhail Teterin writes: =: I understand. And this will also happen in case of a simple printf(). =: What I see, however, with select() is that it _consistently_ takes =: 9-10 msecs longer then specified to return. On an idle machine... =: Someone mentioned, that the number of ticks is, actually, rounded up. =: Perhaps, it should be rounded down? Not again... =Select(2) only guarantees that it will sleep no less than the time =specified for the timeout. Rounding down will break this. Where does it guarantee that? Man-pages say, it is guaranteed to sleep no MORE then the timeout, not less. Is there some other specification, that's different from the man-pages, or are you talking from the implementation point of view? Yours, -mi To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sun Jan 23 21:39:30 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from rover.village.org (rover.village.org [204.144.255.49]) by hub.freebsd.org (Postfix) with ESMTP id 6147E1506F; Sun, 23 Jan 2000 21:39:26 -0800 (PST) (envelope-from imp@harmony.village.org) Received: from harmony.village.org (harmony.village.org [10.0.0.6]) by rover.village.org (8.9.3/8.9.3) with ESMTP id WAA98968; Sun, 23 Jan 2000 22:39:23 -0700 (MST) (envelope-from imp@harmony.village.org) Received: from harmony.village.org (localhost.village.org [127.0.0.1]) by harmony.village.org (8.9.3/8.8.3) with ESMTP id WAA00982; Sun, 23 Jan 2000 22:39:04 -0700 (MST) Message-Id: <200001240539.WAA00982@harmony.village.org> To: Mikhail Teterin Subject: Re: kern/13644 Cc: Dan Nelson , Jason Evans , David Schwartz , bde@FreeBSD.ORG, hackers@FreeBSD.ORG In-reply-to: Your message of "Mon, 24 Jan 2000 00:24:02 EST." <200001240524.AAA46117@rtfm.newton> References: <200001240524.AAA46117@rtfm.newton> Date: Sun, 23 Jan 2000 22:39:04 -0700 From: Warner Losh Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG In message <200001240524.AAA46117@rtfm.newton> Mikhail Teterin writes: : Where does it guarantee that? Man-pages say, it is guaranteed to sleep : no MORE then the timeout, not less. Is there some other specification, : that's different from the man-pages, or are you talking from the : implementation point of view? The man pages say exactly: If timeout is a non-nil pointer, it specifies a maximum interval to wait for the selection to complete. Which doesn't say that it will sleep no more than this. It says that it will wait no longer than this for the selection to complete. It doesn't guarantee anything, imho. It doesn't guarnatee that you will be scheduled at any given time. Besides, POSIX's definition of select clearly states what I said. Warner To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sun Jan 23 21:47:28 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from kot.ne.mediaone.net (kot.ne.mediaone.net [24.218.15.190]) by hub.freebsd.org (Postfix) with ESMTP id DEB3415607; Sun, 23 Jan 2000 21:47:24 -0800 (PST) (envelope-from mi@kot.ne.mediaone.net) Received: from rtfm.newton (mi@rtfm.newton [10.10.0.1]) by kot.ne.mediaone.net (8.9.3/8.9.1) with ESMTP id AAA07553; Mon, 24 Jan 2000 00:47:20 -0500 (EST) From: Mikhail Teterin X-Relay-IP: 10.10.0.1 Received: (from mi@localhost) by rtfm.newton (8.9.3/8.9.3) id AAA46261; Mon, 24 Jan 2000 00:47:20 -0500 (EST) (envelope-from mi@kot.ne.mediaone.net) Message-Id: <200001240547.AAA46261@rtfm.newton> Subject: Re: kern/13644 In-Reply-To: <200001240539.WAA00982@harmony.village.org> from Warner Losh at "Jan 23, 2000 10:39:04 pm" To: Warner Losh Date: Mon, 24 Jan 2000 00:47:20 -0500 (EST) Cc: Mikhail Teterin , Dan Nelson , Jason Evans , David Schwartz , bde@FreeBSD.ORG, hackers@FreeBSD.ORG X-Face: %UW#n0|w>ydeGt/b@1-.UFP=K^~-:0f#O:D7w hJ5G_<5143Bb3kOIs9XpX+"V+~$adGP:J|SLieM31VIhqXeLBli" Mikhail Teterin writes: =: Where does it guarantee that? Man-pages say, it is guaranteed to =: sleep no MORE then the timeout, not less. Is there some other =: specification, that's different from the man-pages, or are you =: talking from the implementation point of view? = =The man pages say exactly: = If timeout is a non-nil pointer, it specifies a maximum interval = to wait for the selection to complete. = =Which doesn't say that it will sleep no more than this. It says that it =will wait no longer than this for the selection to complete. It doesn't =guarantee anything, imho. It doesn't guarnatee that you will be =scheduled at any given time. Yep. But that little, that I was told of implementation, says that the rounding up is there to guarantee the sleep of no less then specified. This is consistent with my experiments, which show steady 9-10 milliseconds extra sleeping time. =Besides, POSIX's definition of select clearly states what I said. This is what I asked for, when I asked for "other specification". Could you provide the chapter/verse number of where POSIX spec contradicts the man pages? It will help me make my case on the TCL forum, since the TCL developers remain under the mistaken assumption, that select() may return earlier, but never later than specified. Thanks! -mi To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sun Jan 23 21:48:24 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from eclogite.eps.nagoya-u.ac.jp (eclogite.eps.nagoya-u.ac.jp [133.6.124.145]) by hub.freebsd.org (Postfix) with ESMTP id AFCED1580A; Sun, 23 Jan 2000 21:48:08 -0800 (PST) (envelope-from kato@ganko.eps.nagoya-u.ac.jp) Received: from localhost (gneiss.eps.nagoya-u.ac.jp [133.6.124.148]) by eclogite.eps.nagoya-u.ac.jp (8.9.3/3.7W) with ESMTP id OAA69049; Mon, 24 Jan 2000 14:47:48 +0900 (JST) To: FreeBSD-current@FreeBSD.ORG, FreeBSD-hackers@FreeBSD.ORG Cc: FreeBSD98-hackers@jp.freebsd.org, nyan@jp.FreeBSD.ORG Subject: Re: indirection in bus space From: KATO Takenori In-Reply-To: Your message of "Fri, 21 Jan 2000 17:40:11 +0900" <20000121174011G.kato@gneiss.eps.nagoya-u.ac.jp> References: <20000121174011G.kato@gneiss.eps.nagoya-u.ac.jp> X-Mailer: Mew version 1.93 on Emacs 19.34 / Mule 2.3 (SUETSUMUHANA) X-PGP-Fingerprint: 03 72 85 36 62 46 23 03 52 B1 10 22 44 10 0D 9E Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-Id: <20000124144718P.kato@gneiss.eps.nagoya-u.ac.jp> Date: Mon, 24 Jan 2000 14:47:18 +0900 X-Dispatcher: imput version 980905(IM100) Lines: 74 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Do you have any comment anout the patch? If there isn't any big problem, I hope to commit it to current. Thank you. I wrote: > Do you remember this topic? I have revised the indirection support > patch. What I have changed are: > - to make diff files more readable > - introduce the bus_simple_create_bsh() that creates > a bus_space_handle_tag from a base address. > > I have made PC98 GENERIC98 kernel and i386 LINT kernel and both of > them can be compiled. > > Changed and new files are as follows: > alpha/include/bus.h > i386/include/bus.h > i386/include/bus_at386.h (new file) > i386/include/bus_pc98.h (new file) > i386/i386/nexus.c > i386/isa/isa.c > dev/advansys/adv_isa.c > dev/advansys/adv_pci.c > pci/amd.c > pci/isp_pci.c > > I put new files and diffs as follows: > http://www.FreeBSD.ORG/~kato/busspace/index.html > INDEX > > http://www.FreeBSD.ORG/~kato/busspace/alpha_bus.h.diff > diff between old bus.h and new bus.h > > http://www.FreeBSD.ORG/~kato/busspace/i386_bus.h > i386/include/bus.h > > http://www.FreeBSD.ORG/~kato/busspace/bus_at386.h > i386/include/bus_at386.h > > http://www.FreeBSD.ORG/~kato/busspace/bus_at386.h.diff > diff between old bus.h and bus_at386.h > > http://www.FreeBSD.ORG/~kato/busspace/bus_pc98.h > i386/include/bus_pc98.h > > http://www.FreeBSD.ORG/~kato/busspace/bus_pc98.h.diff > diff between old bus.h and bus_pc98.h > > http://www.FreeBSD.ORG/~kato/busspace/isa.c.diff > diff of i386/isa/isa.c > > http://www.FreeBSD.ORG/~kato/busspace/nexus.c.diff > diff of i386/i386/nexus.c > > http://www.FreeBSD.ORG/~kato/busspace/adv_isa.c.diff > diff of dev/advansys/adv_isa.c > > http://www.FreeBSD.ORG/~kato/busspace/adv_pci.c.diff > diff of dev/advansys/adv_pci.c > > http://www.FreeBSD.ORG/~kato/busspace/amd.c.diff > diff of pci/amd.c > > http://www.FreeBSD.ORG/~kato/busspace/isp_pci.c.diff > diff of pci/isp_pci.c -----------------------------------------------+--------------------------+ KATO Takenori | FreeBSD | Dept. Earth Planet. Sci, Nagoya Univ. | The power to serve! | Nagoya, 464-8602, Japan | http://www.FreeBSD.org/ | |http://www.jp.FreeBSD.org/| ++++ FreeBSD(98) 3.3R-Rev. 01 available! +==========================+ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sun Jan 23 22: 1:27 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from rover.village.org (rover.village.org [204.144.255.49]) by hub.freebsd.org (Postfix) with ESMTP id 11582157A4; Sun, 23 Jan 2000 22:01:04 -0800 (PST) (envelope-from imp@harmony.village.org) Received: from harmony.village.org (harmony.village.org [10.0.0.6]) by rover.village.org (8.9.3/8.9.3) with ESMTP id XAA99063; Sun, 23 Jan 2000 23:01:02 -0700 (MST) (envelope-from imp@harmony.village.org) Received: from harmony.village.org (localhost.village.org [127.0.0.1]) by harmony.village.org (8.9.3/8.8.3) with ESMTP id XAA01269; Sun, 23 Jan 2000 23:00:42 -0700 (MST) Message-Id: <200001240600.XAA01269@harmony.village.org> To: Mikhail Teterin Subject: Re: kern/13644 Cc: Dan Nelson , Jason Evans , David Schwartz , bde@FreeBSD.ORG, hackers@FreeBSD.ORG In-reply-to: Your message of "Mon, 24 Jan 2000 00:47:20 EST." <200001240547.AAA46261@rtfm.newton> References: <200001240547.AAA46261@rtfm.newton> Date: Sun, 23 Jan 2000 23:00:42 -0700 From: Warner Losh Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG : This is what I asked for, when I asked for "other specification". Could : you provide the chapter/verse number of where POSIX spec contradicts the : man pages? It will help me make my case on the TCL forum, since the TCL : developers remain under the mistaken assumption, that select() may : return earlier, but never later than specified. That's trivially easy to show. Given process X with a priority N + 1 that is doing while (1) ; while process Y with a priority of N is doing the select. The kernel won't prempt X until the time slice is done, which can be a long time. If the select'd process is swapped out, then it could take a very very long time to swap back in. Somewhere in the archives have a pointer to the unified unix spec for select. Might want to look for it. A useful regular expression might be http://www.*/select.*. Warner To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sun Jan 23 22:27:52 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from mass.cdrom.com (castles537.castles.com [208.214.165.101]) by hub.freebsd.org (Postfix) with ESMTP id 9AF1D152A0; Sun, 23 Jan 2000 22:27:48 -0800 (PST) (envelope-from msmith@mass.cdrom.com) Received: from mass.cdrom.com (localhost [127.0.0.1]) by mass.cdrom.com (8.9.3/8.9.3) with ESMTP id WAA10110; Sun, 23 Jan 2000 22:35:54 -0800 (PST) (envelope-from msmith@mass.cdrom.com) Message-Id: <200001240635.WAA10110@mass.cdrom.com> X-Mailer: exmh version 2.1.1 10/15/1999 To: Greg Lehey Cc: Bill Maniatty , Jeroen Ruigrok/Asmodai , FreeBSD-doc@FreeBSD.ORG, maniatty@cs.albany.edu, freebsd-hackers@FreeBSD.ORG Subject: Re: Learning the FreeBSD Kernel In-reply-to: Your message of "Mon, 24 Jan 2000 12:39:21 +0800." <20000124123920.F2643@mojave.worldwide.lemis.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sun, 23 Jan 2000 22:35:53 -0800 From: Mike Smith Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > I can't agree with Mike Smith that reading the code is adequate. It > certainly doesn't apply to newcomers, but it doesn't even apply to > seasoned hackers like Mike: the BSD style doesn't provide for adequate > comments, and so what you see from the code is mainly tactics, not > strategy. You miss my point; you don't want to be writing a driver until you know what you're doing. Documentation on an OS' driver interface won't teach you that; it's something that's really only ever gleaned from experience. -- \\ Give a man a fish, and you feed him for a day. \\ Mike Smith \\ Tell him he should learn how to fish himself, \\ msmith@freebsd.org \\ and he'll hate you for a lifetime. \\ msmith@cdrom.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sun Jan 23 22:35:11 2000 Delivered-To: freebsd-hackers@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 758) id C1D561500D; Sun, 23 Jan 2000 22:35:06 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by hub.freebsd.org (Postfix) with ESMTP id A10171CD65B; Sun, 23 Jan 2000 22:35:06 -0800 (PST) (envelope-from kris@hub.freebsd.org) Date: Sun, 23 Jan 2000 22:35:06 -0800 (PST) From: Kris Kennaway To: Wes Peters Cc: Marwan Fayed , Thierry Herbelot , freebsd-hackers@FreeBSD.ORG, freebsd-mobile@FreeBSD.ORG Subject: Re: disappearing mount points after install In-Reply-To: <388BC605.FAF0479D@softweyr.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Sun, 23 Jan 2000, Wes Peters wrote: > OK, let's quickly hack the VM system to allow swapping on a DOS partition. dd if=/dev/zero of=/c/swap vnconfig -c -e /dev/vn0 /c/swap swap Kris ---- "How many roads must a man walk down, before you call him a man?" "Eight!" "That was a rhetorical question!" "Oh..then, seven!" -- Homer Simpson To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sun Jan 23 22:47:44 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from picnic.mat.net (picnic.mat.net [206.246.122.133]) by hub.freebsd.org (Postfix) with ESMTP id A535215095; Sun, 23 Jan 2000 22:47:37 -0800 (PST) (envelope-from chuckr@picnic.mat.net) Received: from localhost (chuckr@localhost [127.0.0.1]) by picnic.mat.net (8.9.3/8.9.3) with ESMTP id BAA31745; Mon, 24 Jan 2000 01:47:43 -0500 (EST) (envelope-from chuckr@picnic.mat.net) Date: Mon, 24 Jan 2000 01:47:43 -0500 (EST) From: Chuck Robey To: Mike Smith Cc: Greg Lehey , Bill Maniatty , Jeroen Ruigrok/Asmodai , FreeBSD-doc@FreeBSD.ORG, maniatty@cs.albany.edu, freebsd-hackers@FreeBSD.ORG Subject: Re: Learning the FreeBSD Kernel In-Reply-To: <200001240635.WAA10110@mass.cdrom.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Sun, 23 Jan 2000, Mike Smith wrote: > > I can't agree with Mike Smith that reading the code is adequate. It > > certainly doesn't apply to newcomers, but it doesn't even apply to > > seasoned hackers like Mike: the BSD style doesn't provide for adequate > > comments, and so what you see from the code is mainly tactics, not > > strategy. > > You miss my point; you don't want to be writing a driver until you know > what you're doing. Documentation on an OS' driver interface won't teach > you that; it's something that's really only ever gleaned from experience. The problem is, you can't even find what the interfaces are. Reading the code isn't very useful if you can't even find the right place to start from. At least the interface points could be listed, so that someone would know where to begin. > > ---------------------------------------------------------------------------- Chuck Robey | Interests include C & Java programming, FreeBSD, chuckr@picnic.mat.net | electronics, communications, and signal processing. New Year's Resolution: I will not sphroxify gullible people into looking up fictitious words in the dictionary. ---------------------------------------------------------------------------- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sun Jan 23 23:15:19 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from taurus.cs.albany.edu (taurus.cs.albany.edu [169.226.2.109]) by hub.freebsd.org (Postfix) with ESMTP id 6EC5014FB5; Sun, 23 Jan 2000 23:15:09 -0800 (PST) (envelope-from maniatty@cs.albany.edu) Received: from richard.cs.albany.edu (richard.cs.albany.edu [169.226.2.48]) by taurus.cs.albany.edu (8.9.3+Sun/8.9.1) with ESMTP id CAA23346; Mon, 24 Jan 2000 02:15:04 -0500 (EST) From: "William A. Maniatty" Received: (from maniatty@localhost) by richard.cs.albany.edu (SMI-8.6/CLI2) id CAA02016; Mon, 24 Jan 2000 02:16:36 -0500 Date: Mon, 24 Jan 2000 02:16:36 -0500 Message-Id: <200001240716.CAA02016@richard.cs.albany.edu> To: chuckr@picnic.mat.net, msmith@freebsd.org Subject: Re: Learning the FreeBSD Kernel Cc: FreeBSD-doc@freebsd.org, asmodai@wxs.nl, freebsd-hackers@freebsd.org, grog@lemis.com, maniattb@cs.rpi.edu, maniatty@cs.albany.edu Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Chuck Robey writes: >On Sun, 23 Jan 2000, Mike Smith wrote: > >> > I can't agree with Mike Smith that reading the code is adequate. It >> > certainly doesn't apply to newcomers, but it doesn't even apply to >> > seasoned hackers like Mike: the BSD style doesn't provide for adequate >> > comments, and so what you see from the code is mainly tactics, not >> > strategy. >> >> You miss my point; you don't want to be writing a driver until you know >> what you're doing. Documentation on an OS' driver interface won't teach >> you that; it's something that's really only ever gleaned from experience. > >The problem is, you can't even find what the interfaces are. Reading the >code isn't very useful if you can't even find the right place to start >from. At least the interface points could be listed, so that someone >would know where to begin. Both Chuck Robey and Mike Smith have some points, but that won't stop me from giving my opinion :-). Mike is correct that experience is key to being a solid systems software developer, who writes device drivers. Now the next question is how can someone get experience? By developing systems software (which by the way they should only do if they have experience at it :-)). Traditionally there are two approaches: 1) Have a friend available and bug them for help when you get stuck :-) 2) Read the documentation. 3) Read the code and lose a whole lot of productivity without certainty of figuring it out on your own. 4) Dismiss the whole problem as unmanageable and throw your weight behind a more productive project. Many people cannot do 1 (but mailing lists like this help a lot!) since they don't have a kernel developer just across the hall. This leaves 2, which is not an option right now either. Options 3 and 4 are still open, and my bet is a lot of people take option 4, say going over to something like Linux because it *seems* to have more documentation (the FreeBSD man pages really are good for seasoned programmers though!). The problem is that most people who do option 4) do so silently and in larger numbers than you might think. A could document (combined with some of 3) would probably help. Actually a document with a step by step development of a very simple driver might actually tell someone how to write a driver AND give them their first experience at writing a driver :-). Regards: Bill Maniatty Give a man a fish and he eats for one day. Tell a man that he could learn to fish but that teaching him how is a nuisance and he will go to your competitors fish market. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sun Jan 23 23:28:36 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from picnic.mat.net (picnic.mat.net [206.246.122.133]) by hub.freebsd.org (Postfix) with ESMTP id 19E4E15111; Sun, 23 Jan 2000 23:28:20 -0800 (PST) (envelope-from chuckr@picnic.mat.net) Received: from localhost (chuckr@localhost [127.0.0.1]) by picnic.mat.net (8.9.3/8.9.3) with ESMTP id CAA32844; Mon, 24 Jan 2000 02:28:24 -0500 (EST) (envelope-from chuckr@picnic.mat.net) Date: Mon, 24 Jan 2000 02:28:23 -0500 (EST) From: Chuck Robey To: "William A. Maniatty" Cc: msmith@FreeBSD.ORG, FreeBSD-doc@FreeBSD.ORG, asmodai@wxs.nl, freebsd-hackers@FreeBSD.ORG, grog@lemis.com, maniattb@cs.rpi.edu Subject: Re: Learning the FreeBSD Kernel In-Reply-To: <200001240716.CAA02016@richard.cs.albany.edu> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Mon, 24 Jan 2000, William A. Maniatty wrote: > Both Chuck Robey and Mike Smith have some points, but that won't > stop me from giving my opinion :-). Mike is correct that experience is > key to being a solid systems software developer, who writes device drivers. > Now the next question is how can someone get experience? By developing > systems software (which by the way they should only do if they have > experience at it :-)). > > Traditionally there are two approaches: > 1) Have a friend available and bug them for help when you get stuck :-) > 2) Read the documentation. > 3) Read the code and lose a whole lot of productivity without certainty > of figuring it out on your own. > 4) Dismiss the whole problem as unmanageable and throw your > weight behind a more productive project. I know where Mike's coming from. Wait until the next guy posts on the list "I don't really know how to program, but please tell what 'C' is, and how to write a device driver". We had a pretty nasty flamewar over that maybe (I think) 9 months ago, and it still hurts folks, to be accused of conceit, when the guy was asking a grossly unanswerable question, and wouldn't believe it couldn't be boiled down to a 4 paragraph "device drivers for dummies" thing. Mike wants to avoid dealing with a horde of folks like that. I can't really blame Mike, it's impossible to make people understand that you can't boil everything down to a 30 second sound bite. BUT I still wish there was a map to interfaces. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sun Jan 23 23:42:55 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from sasami.jurai.net (sasami.jurai.net [63.67.141.99]) by hub.freebsd.org (Postfix) with ESMTP id E887F152AD; Sun, 23 Jan 2000 23:42:37 -0800 (PST) (envelope-from winter@jurai.net) Received: from localhost (winter@localhost) by sasami.jurai.net (8.9.3/8.8.7) with ESMTP id CAA52455; Mon, 24 Jan 2000 02:42:27 -0500 (EST) Date: Mon, 24 Jan 2000 02:42:27 -0500 (EST) From: "Matthew N. Dodd" To: "William A. Maniatty" Cc: chuckr@picnic.mat.net, msmith@FreeBSD.ORG, FreeBSD-doc@FreeBSD.ORG, asmodai@wxs.nl, freebsd-hackers@FreeBSD.ORG, grog@lemis.com, maniattb@cs.rpi.edu Subject: Re: Learning the FreeBSD Kernel In-Reply-To: <200001240716.CAA02016@richard.cs.albany.edu> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Mon, 24 Jan 2000, William A. Maniatty wrote: > Actually a document with a step by step development of a very simple > driver might actually tell someone how to write a driver AND give them > their first experience at writing a driver :-). The Digital Unix device driver writers guides are kinda nifty like that. Someone else was talking about the BSD/OS 'dog polisher' example driver as a good reference. :) -- | Matthew N. Dodd | '78 Datsun 280Z | '75 Volvo 164E | FreeBSD/NetBSD | | winter@jurai.net | 2 x '84 Volvo 245DL | ix86,sparc,pmax | | http://www.jurai.net/~winter | This Space For Rent | ISO8802.5 4ever | To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sun Jan 23 23:43:25 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from taurus.cs.albany.edu (taurus.cs.albany.edu [169.226.2.109]) by hub.freebsd.org (Postfix) with ESMTP id D08B2157A6; Sun, 23 Jan 2000 23:43:15 -0800 (PST) (envelope-from maniatty@cs.albany.edu) Received: from richard.cs.albany.edu (richard.cs.albany.edu [169.226.2.48]) by taurus.cs.albany.edu (8.9.3+Sun/8.9.1) with ESMTP id CAA23380; Mon, 24 Jan 2000 02:43:11 -0500 (EST) From: "William A. Maniatty" Received: (from maniatty@localhost) by richard.cs.albany.edu (SMI-8.6/CLI2) id CAA02021; Mon, 24 Jan 2000 02:44:43 -0500 Date: Mon, 24 Jan 2000 02:44:43 -0500 Message-Id: <200001240744.CAA02021@richard.cs.albany.edu> To: chuckr@picnic.mat.net, maniatty@cs.albany.edu Subject: Re: Learning the FreeBSD Kernel Cc: FreeBSD-doc@freebsd.org, asmodai@wxs.nl, freebsd-hackers@freebsd.org, grog@lemis.com, maniattb@cs.rpi.edu, msmith@freebsd.org Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Hi There: Chuck Robey Writes: >I know where Mike's coming from. Wait until the next guy posts on the >list "I don't really know how to program, but please tell what 'C' is, and >how to write a device driver". We had a pretty nasty flamewar over that >maybe (I think) 9 months ago, and it still hurts folks, to be accused of >conceit, when the guy was asking a grossly unanswerable question, and >wouldn't believe it couldn't be boiled down to a 4 paragraph "device >drivers for dummies" thing. Mike wants to avoid dealing with a horde of >folks like that. > >I can't really blame Mike, it's impossible to make people understand that >you can't boil everything down to a 30 second sound bite. BUT I still >wish there was a map to interfaces. Ah! I wasn't aware of this. I would be somewhat thin skinned too, too many requests for a free lunch can be a problem. On the other hand I still think: (i) I'd still like my student to take a crack at it, since he would pick up some understanding of kernel programming by doing it (a good thing!) (ii) the project might help motivated (and good) people pick up FreeBSD kernel programming and (iii) people can be pointed to the manual and told to return if they have a specific question. Regards: Bill Maniatty To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sun Jan 23 23:57:25 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from taurus.cs.albany.edu (taurus.cs.albany.edu [169.226.2.109]) by hub.freebsd.org (Postfix) with ESMTP id 098FA158C5; Sun, 23 Jan 2000 23:57:11 -0800 (PST) (envelope-from maniatty@cs.albany.edu) Received: from richard.cs.albany.edu (richard.cs.albany.edu [169.226.2.48]) by taurus.cs.albany.edu (8.9.3+Sun/8.9.1) with ESMTP id CAA23393; Mon, 24 Jan 2000 02:57:02 -0500 (EST) From: "William A. Maniatty" Received: (from maniatty@localhost) by richard.cs.albany.edu (SMI-8.6/CLI2) id CAA02026; Mon, 24 Jan 2000 02:58:34 -0500 Date: Mon, 24 Jan 2000 02:58:34 -0500 Message-Id: <200001240758.CAA02026@richard.cs.albany.edu> To: maniatty@cs.albany.edu, winter@jurai.net Subject: Re: Learning the FreeBSD Kernel Cc: FreeBSD-doc@freebsd.org, asmodai@wxs.nl, chuckr@picnic.mat.net, freebsd-hackers@freebsd.org, grog@lemis.com, maniattb@cs.rpi.edu, msmith@freebsd.org Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Matthew Dodd wrote: [stuff about stepwise refinement approach deleted] >The Digital Unix device driver writers guides are kinda nifty like that. > Is it possible to get a look at the digital Unix guides, that might be a good starting point. Are they on line (perhaps you have a URL)? > Is it possible to get a look at the digital Unix guides? >Someone else was talking about the BSD/OS 'dog polisher' example driver as >a good reference. :) I'm probably not quite cool enough to be in on the joke here, but what is a dog polisher? Thanks for the friendly words: Bill Maniatty To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Mon Jan 24 0:25:22 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from sasami.jurai.net (sasami.jurai.net [63.67.141.99]) by hub.freebsd.org (Postfix) with ESMTP id D26E31500D; Mon, 24 Jan 2000 00:25:10 -0800 (PST) (envelope-from winter@jurai.net) Received: from localhost (winter@localhost) by sasami.jurai.net (8.9.3/8.8.7) with ESMTP id DAA52801; Mon, 24 Jan 2000 03:25:05 -0500 (EST) Date: Mon, 24 Jan 2000 03:25:05 -0500 (EST) From: "Matthew N. Dodd" To: "William A. Maniatty" Cc: FreeBSD-doc@freebsd.org, asmodai@wxs.nl, chuckr@picnic.mat.net, freebsd-hackers@freebsd.org, grog@lemis.com, maniattb@cs.rpi.edu, msmith@freebsd.org Subject: Re: Learning the FreeBSD Kernel In-Reply-To: <200001240758.CAA02026@richard.cs.albany.edu> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Mon, 24 Jan 2000, William A. Maniatty wrote: > I'm probably not quite cool enough to be in on the joke here, but what > is a dog polisher? You use it to polish your dog. Since all good dog polishers connect to computers running unix, you need a device driver to interface with the dog polisher. You need to be able to tell the dog polisher what size dog is to be loaded, how long the dog is to be polished and you will wish to be notified when the dog is done. :) I'm not making this up. -- | Matthew N. Dodd | '78 Datsun 280Z | '75 Volvo 164E | FreeBSD/NetBSD | | winter@jurai.net | 2 x '84 Volvo 245DL | ix86,sparc,pmax | | http://www.jurai.net/~winter | This Space For Rent | ISO8802.5 4ever | To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Mon Jan 24 0:43:16 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from monkeys.com (i180.value.net [206.14.136.180]) by hub.freebsd.org (Postfix) with ESMTP id 89DA415201 for ; Mon, 24 Jan 2000 00:43:09 -0800 (PST) (envelope-from rfg@monkeys.com) Received: from monkeys.com (localhost [127.0.0.1]) by monkeys.com (8.9.3/8.9.3) with ESMTP id AAA04063 for ; Mon, 24 Jan 2000 00:43:08 -0800 (PST) To: freebsd-hackers@FreeBSD.ORG Subject: Parallel port problems... solved! (maybe) Date: Mon, 24 Jan 2000 00:43:08 -0800 Message-ID: <4061.948703388@monkeys.com> From: "Ronald F. Guilmette" Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG A few weeks ago, I showed up here and was bitching about not being able to send stuff out to my parallel printer. I got a bit of heat for saying that I _could_ send data to the printer from my other system (running Linux). Well, I just wanted to say that all indications now are that the FreeBSD kernel and the FreeBSD parallel port driver have been vindicated. I recently loaded up FreeBSD on that other system and guess what? I can print just fine from that now. Conclusion: It ain't the software. As far as I can tell now, the real problem is/was due to something... I'm not sure exactly what... which is rather non-normal about the on-motherboard parallel port hardware on _this_ specific motherboard, namely, a Tekram model P5V30-B4. But over on my other system that has an ASUS P5A, I got no problems at all printing under either Linux or FreeBSD. I tried to track down the problem with the parallel port hardware on this Tekram P5V30-B4 by throwing a few printfs into the FreeBSD parallel port driver but I didn't get very far... just far enough to see that the parallel port hardware on this (Tekram) board seems to be *really* either broken or else substantially different from what the parallel port driver is expecting. Almost anything the driver did to the on-board parallel port caused that port to come back with the nACK bit set in its status register, and apparently, the driver didn't like that much. :-) I just wanted to set the record straight on this. It was definitely not FreeBSD's fault, as far as I can see now. Has anyone ever used FreeBSD to drive a parallel port on a Tekram p5V30-B4? P.S. Actually, that other (ASUS P5A) system inherited a disk drive that had FreeBSD 3.1 loaded up on it, and that appears to be using the `nlpt' driver, rather than the `lpt' driver that is being used on this (3.3) system on the Tekram. But I don't believe that is relevant. The errors I was seeing seemed to be happening at a lower (ppbus) level. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Mon Jan 24 0:48:45 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from peach.ocn.ne.jp (peach.ocn.ne.jp [210.145.254.87]) by hub.freebsd.org (Postfix) with ESMTP id B72011571A; Mon, 24 Jan 2000 00:48:09 -0800 (PST) (envelope-from dcs@newsguy.com) Received: from newsguy.com (p14-dn03kiryunisiki.gunma.ocn.ne.jp [210.232.224.143]) by peach.ocn.ne.jp (8.9.1a/OCN) with ESMTP id RAA28178; Mon, 24 Jan 2000 17:47:57 +0900 (JST) Message-ID: <388C0FED.706330D0@newsguy.com> Date: Mon, 24 Jan 2000 17:40:13 +0900 From: "Daniel C. Sobral" X-Mailer: Mozilla 4.7 [en] (Win98; I) X-Accept-Language: en,pt-BR,ja MIME-Version: 1.0 To: Bill Maniatty Cc: Jeroen Ruigrok/Asmodai , FreeBSD-doc@FreeBSD.ORG, maniatty@cs.albany.edu, freebsd-hackers@FreeBSD.ORG, Greg Lehey Subject: Re: Learning the FreeBSD Kernel References: <200001231648.LAA53658@cs.rpi.edu> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Bill Maniatty wrote: > > First we want to get the mechanism of driver installation down, then > try our hands at writing our own driver. I fear that if we roll our own > driver software we may find that if we have errors (not that we ever have > errors mind you :-) we may not be able to isolate the cause. This is > why I was leaning towards reinstalling a working driver first. You won't have any trouble at all with basic driver installation. In fact, this is driver skeleton, that can be templated (and used to... but I don't know if we have newbus templates or not). Notice that most developers use kld to develop their drivers. Not having to recompile the kernel and reboot really helps. :-) There exists one tutorial-style guide to writing kld's. It's a "hacking" guide to the use of kld's as a way to introduce back-doors in FreeBSD, and though it's somewhat "unclean" wrt to interface description, it's an effective tutorial. I'm sure it can be found from FreeBSD's web site. As a next step, I suggest writing "virtual" drivers, not bound to any hardware. There are many such drivers in the tree. As a trivial example, and a favorite of many, the screen savers. The above will get you proficient with the basics of writing device drivers, but still leave a lot out. Let's see... > > Definately not an ethernet card. *g* > > Seems no-one can keep up with Bill Paul in that aspect. =) > > We probably could not compete :-), but we are interested in ethernet > card drivers (at some point) and would like to learn. > > > You could try usb devices and contact Nick Hibma for his expertise on > > that area. > > How mature is the USB driver technology? If it is pretty preliminary > we may wish to visit that later. Please recall that we are on a learning > curve here. If we support ethernet cards on USB, I'd say it's pretty mature. :-) Anyway, here is what virtual drivers won't teach: how to get resources, which will vary from bus to bus, how to interact with some of the kernel subsystems... How does one write a tun device? How does one write a network device? How does one write a network protocol? How does one write a CAM device (more than one type exist -- some virtual and some not)? How does one write a bus device? When to write a bus (newpcm uses a bus of it's own, if I'm not mistaken)? These problems are mostly distinct from each other, and their usefulness varies. Certainly, a tutorial covering newbus and the main bus types (usb, isa, pci) would be useful and not too difficult to write. CardBus and PCMCIA would be very useful, but we'll have to finish that first :-). But it gets complicated from there on. Writing a tutorial on even a subsection of CAM would be very time-consuming. I assume the same can be said of network devices in general. It will probably not be viable to cover more than one such subject, and their usefulness would be somewhat restricted. On the other hand, it is precisely this kind of tutorial that is mostly needed, since all of what I mentioned before can be dealt with on the fly, just by copying source from existing devices. Now... let me see if I can recall some of the gotcha's (notice that I have never written a newbus device driver). Writing a device driver to exotic devices, as long as you have the documentation for it, is really simple. It's when you have to interact to kernel subsystems that steepens the learning curve. Getting a MYDEVICE into memory is trivial. Just steal the skeleton from the source of some existing device. Julian had a device skeleton generator way back, I don't know if there is a newbus equivalent or not. As long as a device is just inb/outb (I seem to recall newbus have a replacement for these), things are mostly trivial. Covering what you can and cannot do in an interrupt context, the exact working of our spl*() functions (not just theory, but the practice of when to use them and when not to), transfering data to/from user space, setting up dma transfers, and what exactly happens in a tsleep() (DURING the tsleep(), mind you :) are the FAQs, I think. Also, how to create a kernel thread to lighten the load on the interrupt handler (ie, queue work to be done outside the interrupt context) would be very useful too, and it's not too much black magic. Documenting the available debugging tools and useful debugging techniques would be mostly welcome. Aside from "how do I use the kernel debugger", use of tools such as truss, and loading symbol tables to kld's (see Greg Lehey's documentation on debugging vinum) would be useful tutorials. Once you got the above, and possibly created some useful driver templates in the process, I'd say choose a subsystem, and start some in-depth tutorial. Stay away from FS work, as our interfaces are bound to change. CAM is very stable, and SCSI drivers are always useful, so that's one possible field. Network devices would probably take less time, though (that's a wild guess on my part, though). -- Daniel C. Sobral (8-DCS) dcs@newsguy.com dcs@freebsd.org "2 b or not to b" meaning varies depending on whether one uses the 79 or the 83 standard. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Mon Jan 24 0:54:20 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from mimer.webgiro.com (mimer.webgiro.com [212.209.29.5]) by hub.freebsd.org (Postfix) with ESMTP id EA46814A10 for ; Mon, 24 Jan 2000 00:54:17 -0800 (PST) (envelope-from abial@webgiro.com) Received: by mimer.webgiro.com (Postfix, from userid 66) id 97F882DC09; Mon, 24 Jan 2000 09:54:01 +0100 (CET) Received: by mx.webgiro.com (Postfix, from userid 1001) id 2BC677812; Mon, 24 Jan 2000 09:51:37 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by mx.webgiro.com (Postfix) with ESMTP id 2268010E10; Mon, 24 Jan 2000 09:51:37 +0100 (CET) Date: Mon, 24 Jan 2000 09:51:37 +0100 (CET) From: Andrzej Bialecki To: Kris Kennaway Cc: Peter Jeremy , hackers@FreeBSD.ORG Subject: Re: Better fixit (was: Why was rsh removed from the fixit floppy?) In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Sun, 23 Jan 2000, Kris Kennaway wrote: > On Mon, 24 Jan 2000, Peter Jeremy wrote: > > > On Fri, 21 Jan 2000 18:01:34 +0530, Greg Lehey wrote: > > >If you want a better fixit floppy, you should consider the new custom > > >disk pair with PicoBSD ... There's still space on there; what > > >else could we put there? > > > > ssh or OpenSSH (though this might cause distribution problems - how did > > Jordan's visit to WC's Counsel go?) > > Unfortunately openssh is quite a bit bigger than the standard ssh, because > openssl isn't exactly the slimmest crypto library in the world :-) But, it > would definitely be a cool thing. Feel invited to visit freebsd-small, where we discuss now future directions for small floppy-based setups (which include installation disks as well). Andrzej Bialecki // WebGiro AB, Sweden (http://www.webgiro.com) // ------------------------------------------------------------------- // ------ FreeBSD: The Power to Serve. http://www.freebsd.org -------- // --- Small & Embedded FreeBSD: http://www.freebsd.org/~picobsd/ ---- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Mon Jan 24 1: 1:14 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from gidora.zeta.org.au (gidora.zeta.org.au [203.26.10.25]) by hub.freebsd.org (Postfix) with SMTP id 72DE71590D for ; Mon, 24 Jan 2000 01:01:09 -0800 (PST) (envelope-from bde@zeta.org.au) Received: (qmail 22552 invoked from network); 24 Jan 2000 09:01:05 -0000 Received: from bde.zeta.org.au (203.2.228.102) by gidora.zeta.org.au with SMTP; 24 Jan 2000 09:01:05 -0000 Date: Mon, 24 Jan 2000 20:00:54 +1100 (EST) From: Bruce Evans X-Sender: bde@alphplex.bde.org To: Warner Losh Cc: Mikhail Teterin , Dan Nelson , Jason Evans , David Schwartz , bde@FreeBSD.ORG, hackers@FreeBSD.ORG Subject: Re: kern/13644 In-Reply-To: <200001240600.XAA01269@harmony.village.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Sun, 23 Jan 2000, Warner Losh wrote: > : This is what I asked for, when I asked for "other specification". Could > : you provide the chapter/verse number of where POSIX spec contradicts the > : man pages? It will help me make my case on the TCL forum, since the TCL > : developers remain under the mistaken assumption, that select() may > : return earlier, but never later than specified. > > That's trivially easy to show. In theory, but not in practice :-). > Given process X with a priority N + 1 that is doing N - 1 (higher priority is actually "lower") > while (1) ; > while process Y with a priority of N is doing the select. The kernel > won't prempt X until the time slice is done, which can be a long > time. If the select'd process is swapped out, then it could take a > very very long time to swap back in. Um, if the priorities are actually N vs. N - 1, then the process with priority N won't run at the end of the timeslice. It will only run when its priority becomes "lower", possibly several timeslices later. In practice, the priorities will never be N vs. N - 1. The process doing the select() sleeps at priority PSOCK = 24. The process doing the while loop should always have priority >= PUSER = 50, but due to a bug (?) in nice(2), the priority of a nice --20 process can be as low as PUSER - 20 = 30. Anyway, that is > PSOCK, so the process doing the select() will preempt the user process and wake up as soon as it times out. Then, due to a longstanding scheduling bug (?), the process doing the select() will return to userland without being rescheduled, although its user priority may be much "higher" than that of any other runnable process. Processes that do i/o are thus preferred to cpu hogs much more strongly than their priorities indicate. This bug is a feature in most cases. It reduces context switches. Interactive process may get more benefit from it than from the classical scheduling preference for interactive processes. Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Mon Jan 24 1:15: 9 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from smtp05.wxs.nl (smtp05.wxs.nl [195.121.6.57]) by hub.freebsd.org (Postfix) with ESMTP id 1F981158C7; Mon, 24 Jan 2000 01:14:47 -0800 (PST) (envelope-from asmodai@wxs.nl) Received: from daemon.ninth-circle.org ([195.121.196.196]) by smtp05.wxs.nl (Netscape Messaging Server 4.05) with ESMTP id FOU1OB01.58T; Mon, 24 Jan 2000 10:14:35 +0100 Received: (from asmodai@localhost) by daemon.ninth-circle.org (8.9.3/8.9.3) id KAA02596; Mon, 24 Jan 2000 10:04:11 +0100 (CET) (envelope-from asmodai) Date: Mon, 24 Jan 2000 10:04:10 +0100 From: Jeroen Ruigrok/Asmodai To: Mike Smith Cc: Greg Lehey , Bill Maniatty , FreeBSD-doc@FreeBSD.ORG, maniatty@cs.albany.edu, freebsd-hackers@FreeBSD.ORG Subject: Re: Learning the FreeBSD Kernel Message-ID: <20000124100410.A691@daemon.ninth-circle.org> References: <20000124123920.F2643@mojave.worldwide.lemis.com> <200001240635.WAA10110@mass.cdrom.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0i In-Reply-To: <200001240635.WAA10110@mass.cdrom.com>; from msmith@freebsd.org on Sun, Jan 23, 2000 at 10:35:53PM -0800 Organisation: Ninth-Circle Enterprises Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG -On [20000124 08:01], Mike Smith (msmith@freebsd.org) wrote: >> I can't agree with Mike Smith that reading the code is adequate. It >> certainly doesn't apply to newcomers, but it doesn't even apply to >> seasoned hackers like Mike: the BSD style doesn't provide for adequate >> comments, and so what you see from the code is mainly tactics, not >> strategy. > >You miss my point; you don't want to be writing a driver until you know >what you're doing. Documentation on an OS' driver interface won't teach >you that; it's something that's really only ever gleaned from experience. This I agree on with Mike. Writing device drivers isn't like writing an application. The documentation I am writing will definately not be a tutorial style piece of documentation, but a reference guide with sufficient background material so that people a bit familiar with FreeBSD on source level (note the ``a bit'') will get enough ideas and clues from it to proceed forwards. I do not think making it a tutorial will be beneficial in the long run, since I would have to discuss kernel sources, gdb, ddb and a number of other things on the side. But then again we will see where we will end. I just know, from experience, that writing a driver involves more than just code. -- Jeroen Ruigrok vd W/Asmodai asmodai@[wxs.nl|bart.nl|freebsd.org] Documentation nutter/B-rated Coder BSD: Technical excellence at its best The BSD Programmer's Documentation Project Ain't gonna spend the rest of my Life, quietly fading away... To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Mon Jan 24 1:46: 8 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from smtppzh.pzh.nl (webshield.pzh.nl [194.178.168.50]) by hub.freebsd.org (Postfix) with SMTP id 28BB415258 for ; Mon, 24 Jan 2000 01:46:05 -0800 (PST) (envelope-from MULHUIJZEN@PZH.NL) Received: FROM smtp.pzh.nl BY smtppzh.pzh.nl ; Mon Jan 24 10:44:59 2000 0000 Received: from PZH40-1-Message_Server by smtp.pzh.nl with Novell_GroupWise; Mon, 24 Jan 2000 10:45:05 +0100 Message-Id: X-Mailer: Novell GroupWise 5.5.2 Date: Mon, 24 Jan 2000 10:44:22 +0100 From: "ROGIER MULHUIJZEN" To: , Subject: Re: Better fixit (was: Why was rsh removed from the fixit floppy?) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Disposition: inline Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG >I just want to correct one misunderstanding. 'The Hobbit' is the author of >netcat, not l0pht. Ack! I thought he was part of l0pht.... my apologies for any inaccuracy. I still stand by that either netcat or socket (which I hear does pretty much the same) should be included. /me jumps on -small DocWilco To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Mon Jan 24 5:14:24 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from outmail.utsunomiya-u.ac.jp (outmail.utsunomiya-u.ac.jp [160.12.196.3]) by hub.freebsd.org (Postfix) with ESMTP id 2870F14F10; Mon, 24 Jan 2000 05:14:19 -0800 (PST) (envelope-from yokota@zodiac.mech.utsunomiya-u.ac.jp) Received: from zodiac.mech.utsunomiya-u.ac.jp (IDENT:bNlrl7xLujx/ItJLAGZd7vwzyr6/Rqiv@zodiac.mech.utsunomiya-u.ac.jp [160.12.42.1]) by outmail.utsunomiya-u.ac.jp (8.9.3/3.7Wpl2) with ESMTP id WAA19173; Mon, 24 Jan 2000 22:14:17 +0900 (JST) Received: from zodiac.mech.utsunomiya-u.ac.jp (zodiac.mech.utsunomiya-u.ac.jp [160.12.42.1]) by zodiac.mech.utsunomiya-u.ac.jp (8.7.6+2.6Wbeta7/3.4W/zodiac-May96) with ESMTP id WAA06932; Mon, 24 Jan 2000 22:19:53 +0900 (JST) Message-Id: <200001241319.WAA06932@zodiac.mech.utsunomiya-u.ac.jp> To: current@freebsd.org, hackers@freebsd.org Cc: yokota@zodiac.mech.utsunomiya-u.ac.jp Subject: [PATCH] Please test the PS/2 mouse driver patch Date: Mon, 24 Jan 2000 22:19:52 +0900 From: Kazutaka YOKOTA Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG I wrote a patch for the psm driver to add support for several PS/2 mice. It is in http://www.freebsd.org/~yokota/ps2mice-24Jan2000.tar.gz. I am attaching README included in the patch. Thank you. Kazu ---------------------------------------------------------------------- PS/2 mouse driver patch for 4.0-CURRENT 24 January 2000 Kazutaka YOKOTA, yokota@FreeBSD.org This patch adds support for the following PS/2 mice to the psm driver. - Microsoft IntelliMouse Explorer: 2 buttons on top, 2 side buttons and a wheel which also acts as the middle button. - Genius NetScroll Optical: 2 buttons on top, 2 side buttons and a wheel which also acts as the middle button. - MouseSystems SmartScroll Mouse: 3 buttons on top, 1 side button and a wheel. - IBM ScrollPoint: 2 buttons on top and a stick between the buttons. (The stick can perform "horizontal scroll" in W*ndows environment. The horizontal movement of the stick is detected, but is quietly ignored by the psm driver, as we don't have framework to support it.) There are two diff files: ps2mice.diff moused.diff Apply them to 4.0-CURRENT as follows: cd /sys/isa patch < ps2mice.diff cd /usr/src/usr.sbin/moused patch < moused.diff Rebuild the kernel and moused. (Note that you need to copy /sys//include/mouse.h to /usr/include/machine/mouse.h before you rebuild moused.) The following is the list of files modified by this patch. /sys/alpha/include/mouse.h /sys/dev/kbd/atkbdcreg.h /sys/i386/include/mouse.h /sys/isa/psm.c /usr/src/usr.sbin/moused/moused.c This patch is for 4.0-CURRENT. Although I personally have not tested yet, I expect you can apply it to 3.4-STABLE without much difficulty. (FYI, /sys/isa/psm.c is for alpha only in 3.4-STABLE. psm.c for i386 is in /sys/i386/isa in 3.4-STABLE.) Kazu ---------------------------------------------------------------------- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Mon Jan 24 5:29:14 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from smtp03.wxs.nl (smtp03.wxs.nl [195.121.6.37]) by hub.freebsd.org (Postfix) with ESMTP id C7F7514F4F; Mon, 24 Jan 2000 05:29:08 -0800 (PST) (envelope-from asmodai@wxs.nl) Received: from daemon.ninth-circle.org ([195.121.197.155]) by smtp03.wxs.nl (Netscape Messaging Server 3.61) with ESMTP id AAA421A; Mon, 24 Jan 2000 14:29:05 +0100 Received: (from asmodai@localhost) by daemon.ninth-circle.org (8.9.3/8.9.3) id OAA03390; Mon, 24 Jan 2000 14:27:39 +0100 (CET) (envelope-from asmodai) Date: Mon, 24 Jan 2000 14:27:39 +0100 From: Jeroen Ruigrok/Asmodai To: "Daniel C. Sobral" Cc: Bill Maniatty , FreeBSD-doc@FreeBSD.ORG, maniatty@cs.albany.edu, freebsd-hackers@FreeBSD.ORG, Greg Lehey Subject: Re: Learning the FreeBSD Kernel Message-ID: <20000124142738.B691@daemon.ninth-circle.org> References: <200001231648.LAA53658@cs.rpi.edu> <388C0FED.706330D0@newsguy.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0i In-Reply-To: <388C0FED.706330D0@newsguy.com>; from dcs@newsguy.com on Mon, Jan 24, 2000 at 05:40:13PM +0900 Organisation: Ninth-Circle Enterprises Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG -On [20000124 10:13], Daniel C. Sobral (dcs@newsguy.com) wrote: >Bill Maniatty wrote: >> >> First we want to get the mechanism of driver installation down, then >> try our hands at writing our own driver. I fear that if we roll our own >> driver software we may find that if we have errors (not that we ever have >> errors mind you :-) we may not be able to isolate the cause. This is >> why I was leaning towards reinstalling a working driver first. > >You won't have any trouble at all with basic driver installation. In >fact, this is driver skeleton, that can be templated (and used to... but >I don't know if we have newbus templates or not). man 9 driver. >Notice that most developers use kld to develop their drivers. Not having >to recompile the kernel and reboot really helps. :-) There exists one >tutorial-style guide to writing kld's. It's a "hacking" guide to the use >of kld's as a way to introduce back-doors in FreeBSD, and though it's >somewhat "unclean" wrt to interface description, it's an effective >tutorial. I'm sure it can be found from FreeBSD's web site. Trust me, writing modules is the _least_ of your worries. If I can write a module then every^H^H^H^H^Hcluefull people can. =) /usr/src/sys/modules >As a next step, I suggest writing "virtual" drivers, not bound to any >hardware. There are many such drivers in the tree. As a trivial example, >and a favorite of many, the screen savers. > >The above will get you proficient with the basics of writing device >drivers, but still leave a lot out. Let's see... [Not looking at the source code for those I dare say:] But they are not using any busspace/newbus functionality for all I know. And cannot be compared to the `real' drivers IMHO. >> How mature is the USB driver technology? If it is pretty preliminary >> we may wish to visit that later. Please recall that we are on a learning >> curve here. > >If we support ethernet cards on USB, I'd say it's pretty mature. :-) > >Anyway, here is what virtual drivers won't teach: how to get resources, >which will vary from bus to bus, how to interact with some of the kernel >subsystems... How does one write a tun device? How does one write a >network device? How does one write a network protocol? How does one >write a CAM device (more than one type exist -- some virtual and some >not)? How does one write a bus device? When to write a bus (newpcm uses >a bus of it's own, if I'm not mistaken)? If you refer to pcm attaching to sbc or gusc. But those are pseudo busses if I understood everything correctly, the same goes for miibus and related busses (ppbus, smbus, iicbus). >These problems are mostly distinct from each other, and their usefulness >varies. Certainly, a tutorial covering newbus and the main bus types >(usb, isa, pci) would be useful and not too difficult to write. CardBus >and PCMCIA would be very useful, but we'll have to finish that first >:-). Ehm, a tutorial covering the bus types. You have no idea how much you can write about ISA and PCI alone. >But it gets complicated from there on. Writing a tutorial on even a >subsection of CAM would be very time-consuming. Write a reference so that we can finally convert the last drivers to CAM/newbus. =) >Julian had a device skeleton generator way back, I don't know if there >is a newbus equivalent or not. I think Peter [Wemm] wrote a skeleton one. >Documenting the available debugging tools and useful debugging >techniques would be mostly welcome. Aside from "how do I use the kernel >debugger", use of tools such as truss, and loading symbol tables to >kld's (see Greg Lehey's documentation on debugging vinum) would be >useful tutorials. Yeah yeah, coming up. Stop whining. ;) Hey, wait a sec, you said yesterday that you were bored. Nice task for you DCS ;) -- Jeroen Ruigrok vd W/Asmodai asmodai@[wxs.nl|bart.nl|freebsd.org] Documentation nutter/B-rated Coder BSD: Technical excellence at its best The BSD Programmer's Documentation Project Ain't gonna spend the rest of my Life, quietly fading away... To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Mon Jan 24 6:51:42 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from mercurio.ie-online.it (dns.ie-online.it [194.133.148.8]) by hub.freebsd.org (Postfix) with ESMTP id AE30914F2C for ; Mon, 24 Jan 2000 06:51:38 -0800 (PST) (envelope-from sriva@gufi.org) Received: from attila.ie-interna.it (host1.ie-online.it [194.133.148.10]) by mercurio.ie-online.it (8.9.3/8.9.3) with ESMTP id PAA09463 for ; Mon, 24 Jan 2000 15:51:27 +0100 (CET) (envelope-from sriva@gufi.org) Received: from riva (riva.ie-interna.it [192.168.0.33]) by attila.ie-interna.it (8.9.3/8.9.3) with SMTP id PAA90944 for ; Mon, 24 Jan 2000 15:51:27 +0100 (CET) (envelope-from sriva@gufi.org) Message-Id: <3.0.5.32.20000124155126.00929600@civetta.gufi.org> X-Sender: riva@civetta.gufi.org X-Mailer: QUALCOMM Windows Eudora Pro Version 3.0.5 (32) Date: Mon, 24 Jan 2000 15:51:26 +0100 To: hackers@freebsd.org From: Stefano Riva Subject: Prova hackers Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Ehila'. Chi mi riceve? --- Stefano Riva sriva@gufi.org Gruppo Utenti FreeBSD Italiani http://www.gufi.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Mon Jan 24 7: 1: 3 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from mercurio.ie-online.it (dns.ie-online.it [194.133.148.8]) by hub.freebsd.org (Postfix) with ESMTP id C9C6D14F16; Mon, 24 Jan 2000 06:58:55 -0800 (PST) (envelope-from sriva@alice.it) Received: from attila.ie-interna.it (host1.ie-online.it [194.133.148.10]) by mercurio.ie-online.it (8.9.3/8.9.3) with ESMTP id PAA09676; Mon, 24 Jan 2000 15:58:51 +0100 (CET) (envelope-from sriva@alice.it) Received: from riva (riva.ie-interna.it [192.168.0.33]) by attila.ie-interna.it (8.9.3/8.9.3) with SMTP id PAA91169; Mon, 24 Jan 2000 15:58:51 +0100 (CET) (envelope-from sriva@alice.it) Message-Id: <3.0.5.32.20000124155851.00ba2800@relay.alice.it> X-Sender: riva@relay.alice.it X-Mailer: QUALCOMM Windows Eudora Pro Version 3.0.5 (32) Date: Mon, 24 Jan 2000 15:58:51 +0100 To: hackers@freebsd.org, chat@freebsd.org From: Stefano Riva Subject: Sorry Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Sorry for my previous message. It was simply an error. I need more sleeping. :-) --- Stefano Riva Systems & Network Administrator Informazioni Editoriali I.E. Srl Voice +39-02283151, Fax +39-0228315900 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Mon Jan 24 7: 1:49 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from mass.cdrom.com (castles516.castles.com [208.214.165.80]) by hub.freebsd.org (Postfix) with ESMTP id 3CA6914E23 for ; Mon, 24 Jan 2000 07:01:46 -0800 (PST) (envelope-from msmith@mass.cdrom.com) Received: from mass.cdrom.com (localhost [127.0.0.1]) by mass.cdrom.com (8.9.3/8.9.3) with ESMTP id HAA11646; Mon, 24 Jan 2000 07:09:36 -0800 (PST) (envelope-from msmith@mass.cdrom.com) Message-Id: <200001241509.HAA11646@mass.cdrom.com> X-Mailer: exmh version 2.1.1 10/15/1999 To: Chuck Robey Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: Learning the FreeBSD Kernel In-reply-to: Your message of "Mon, 24 Jan 2000 01:47:43 EST." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Mon, 24 Jan 2000 07:09:35 -0800 From: Mike Smith Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > On Sun, 23 Jan 2000, Mike Smith wrote: > > > > I can't agree with Mike Smith that reading the code is adequate. It > > > certainly doesn't apply to newcomers, but it doesn't even apply to > > > seasoned hackers like Mike: the BSD style doesn't provide for adequate > > > comments, and so what you see from the code is mainly tactics, not > > > strategy. > > > > You miss my point; you don't want to be writing a driver until you know > > what you're doing. Documentation on an OS' driver interface won't teach > > you that; it's something that's really only ever gleaned from experience. > > The problem is, you can't even find what the interfaces are. Reading the > code isn't very useful if you can't even find the right place to start > from. At least the interface points could be listed, so that someone > would know where to begin. Listing the interface points won't help unless you know which ones are relevant to what you're trying to do. I say it again; first you need to know how to write a device driver, then you need to know what the available tools are to get the job done. Having only the latter does not help at all with the former. -- \\ Give a man a fish, and you feed him for a day. \\ Mike Smith \\ Tell him he should learn how to fish himself, \\ msmith@freebsd.org \\ and he'll hate you for a lifetime. \\ msmith@cdrom.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Mon Jan 24 7:10:36 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from hermes.research.kpn.com (hermes.research.kpn.com [139.63.192.8]) by hub.freebsd.org (Postfix) with ESMTP id 7CAFC15011 for ; Mon, 24 Jan 2000 07:10:33 -0800 (PST) (envelope-from K.J.Koster@research.kpn.com) Received: from l04.research.kpn.com (l04.research.kpn.com [139.63.192.204]) by research.kpn.com (PMDF V5.2-31 #35196) with ESMTP id <01JL37H5YHA4000K1W@research.kpn.com> for hackers@freebsd.org; Mon, 24 Jan 2000 16:10:26 +0100 Received: by l04.research.kpn.com with Internet Mail Service (5.5.2650.21) id ; Mon, 24 Jan 2000 16:10:25 +0100 Content-return: allowed Date: Mon, 24 Jan 2000 16:10:23 +0100 From: "Koster, K.J." Subject: RE: [PATCH] Please test the PS/2 mouse driver patch To: hackers@freebsd.org Message-id: <59063B5B4D98D311BC0D0001FA7E45220FD18B@l04.research.kpn.com> MIME-version: 1.0 X-Mailer: Internet Mail Service (5.5.2650.21) Content-type: text/plain; charset="iso-8859-1" Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > > I wrote a patch for the psm driver to add support for several > PS/2 mice. > It is in http://www.freebsd.org/~yokota/ps2mice-24Jan2000.tar.gz. > I am attaching README included in the patch. > I have the Logitech wireless radio mouse, and I get errors about illegal or unknown PS/2 packets. It's cosmetic, because the mouse works like a charm, but the very first mouse click or move makes it jump across the screen. After that Does this fix address that problem too? If not, could I get you to address this problem? :-) Kees Jan ============================================== You are only young once, but you can stay immature all your life To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Mon Jan 24 7:21:35 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from ckmso1.proxy.att.com (ckmso1.att.com [12.20.58.69]) by hub.freebsd.org (Postfix) with ESMTP id 03DFF15032; Mon, 24 Jan 2000 07:21:28 -0800 (PST) (envelope-from myevmenkin@att.com) Received: from njb140r1.ems.att.com ([135.65.202.58]) by ckmso1.proxy.att.com (AT&T IPNS/MSO-2.2) with ESMTP id KAA16579; Mon, 24 Jan 2000 10:21:25 -0500 (EST) Received: from njb140bh1.ems.att.com by njb140r1.ems.att.com (8.8.8+Sun/ATTEMS-1.4.1 sol2) id KAA02562; Mon, 24 Jan 2000 10:20:52 -0500 (EST) Received: by njb140bh1.ems.att.com with Internet Mail Service (5.5.2448.0) id ; Mon, 24 Jan 2000 10:21:24 -0500 Message-ID: From: "Yevmenkin, Maksim N, CSCIO" To: "'freebsd-current@freebsd.org'" Cc: "'freebsd-hackers@freebsd.org'" Subject: BPF bug or not? Date: Mon, 24 Jan 2000 10:21:16 -0500 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2448.0) Content-Type: text/plain; charset="koi8-r" Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG All, I've just found that read from /dev/bpfX never return EAGAIN/EWOULDBLOCK. It means that when you do a non blocking read and there is no data you will always get 0. Does it suppose work this way? A non blocking read from pipe return EAGAIN/EWOULDBLOCK if there is no data and pipe was opened as O_RDWR, and 0 when pipe was opened as O_RDONLY. Thanks, emax To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Mon Jan 24 7:26:54 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from server1.huntsvilleal.com (www.huntsvilleal.com [207.13.224.7]) by hub.freebsd.org (Postfix) with ESMTP id 41CFD14F09 for ; Mon, 24 Jan 2000 07:26:43 -0800 (PST) (envelope-from kris@hiwaay.net) Received: from barricuda.bsd.nws.net (kris.huntsvilleal.com [207.13.224.46]) by server1.huntsvilleal.com (8.9.3/8.9.3) with ESMTP id KAA10637; Mon, 24 Jan 2000 10:16:32 -0500 Received: from localhost (localhost [127.0.0.1]) by barricuda.bsd.nws.net (8.9.3/8.9.3) with ESMTP id JAA06419; Mon, 24 Jan 2000 09:26:05 -0600 (CST) (envelope-from kris@hiwaay.net) Date: Mon, 24 Jan 2000 09:26:04 -0600 (CST) From: Kris Kirby To: Brooks Davis Cc: Ralph Seguin , freebsd-hackers@FreeBSD.ORG, am@amsoft.ru Subject: Re: FreBSD 3.3, power off and power button stuff In-Reply-To: <20000121155757.A23771@orion.ac.hmc.edu> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > I don't know how you would catch the power switch. If you could tell it > apart from other methods of generating teh same APM event you could > probably do it with apmd. Otherwise you'll need ACPI support which IIRC > will start coming in to -current after -current becomes 5.0 (within the > next few months). My Abit BP6 has an option in BIOS (under power management) to "Power Button Override". IIRC, this is an ACPI function. ---- Kris Kirby, KE4AHR | TGIFreeBSD... 'Nuff said. | ------------------------------------------------------- "God gave them the ability to reproduce... ... Science gave us the hope they won't." -KBK To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Mon Jan 24 7:27:47 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from smtp03.wxs.nl (smtp03.wxs.nl [195.121.6.37]) by hub.freebsd.org (Postfix) with ESMTP id EB69614FA7; Mon, 24 Jan 2000 07:27:36 -0800 (PST) (envelope-from asmodai@wxs.nl) Received: from daemon.ninth-circle.org ([195.121.197.155]) by smtp03.wxs.nl (Netscape Messaging Server 3.61) with ESMTP id AAA2D05; Mon, 24 Jan 2000 16:27:23 +0100 Received: (from asmodai@localhost) by daemon.ninth-circle.org (8.9.3/8.9.3) id QAA04329; Mon, 24 Jan 2000 16:16:40 +0100 (CET) (envelope-from asmodai) Date: Mon, 24 Jan 2000 16:16:40 +0100 From: Jeroen Ruigrok/Asmodai To: "Daniel C. Sobral" Cc: Bill Maniatty , FreeBSD-doc@FreeBSD.ORG, maniatty@cs.albany.edu, freebsd-hackers@FreeBSD.ORG, Greg Lehey Subject: Re: Learning the FreeBSD Kernel Message-ID: <20000124161640.F691@daemon.ninth-circle.org> References: <200001231648.LAA53658@cs.rpi.edu> <388C0FED.706330D0@newsguy.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0i In-Reply-To: <388C0FED.706330D0@newsguy.com>; from dcs@newsguy.com on Mon, Jan 24, 2000 at 05:40:13PM +0900 Organisation: Ninth-Circle Enterprises Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG -On [20000124 10:13], Daniel C. Sobral (dcs@newsguy.com) wrote: >As long as a device is just inb/outb (I seem to recall newbus have a >replacement for these) bus_space_read_#() / bus_space_write_#() Where # is 1, 2, 4, or 8. But I don't think we support atomic 8 byte atomic reads and writes. -- Jeroen Ruigrok vd W/Asmodai asmodai@[wxs.nl|bart.nl|freebsd.org] Documentation nutter/B-rated Coder BSD: Technical excellence at its best The BSD Programmer's Documentation Project When we have not what we like, we must like what we have... To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Mon Jan 24 7:28: 0 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from smtp03.wxs.nl (smtp03.wxs.nl [195.121.6.37]) by hub.freebsd.org (Postfix) with ESMTP id E835B15937; Mon, 24 Jan 2000 07:27:37 -0800 (PST) (envelope-from asmodai@wxs.nl) Received: from daemon.ninth-circle.org ([195.121.197.155]) by smtp03.wxs.nl (Netscape Messaging Server 3.61) with ESMTP id AAB2D05; Mon, 24 Jan 2000 16:27:25 +0100 Received: (from asmodai@localhost) by daemon.ninth-circle.org (8.9.3/8.9.3) id QAA04347; Mon, 24 Jan 2000 16:27:17 +0100 (CET) (envelope-from asmodai) Date: Mon, 24 Jan 2000 16:27:17 +0100 From: Jeroen Ruigrok/Asmodai To: "William A. Maniatty" Cc: winter@jurai.net, FreeBSD-doc@freebsd.org, chuckr@picnic.mat.net, freebsd-hackers@freebsd.org, grog@lemis.com, maniattb@cs.rpi.edu, msmith@freebsd.org Subject: Re: Learning the FreeBSD Kernel Message-ID: <20000124162717.G691@daemon.ninth-circle.org> References: <200001240758.CAA02026@richard.cs.albany.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0i In-Reply-To: <200001240758.CAA02026@richard.cs.albany.edu>; from maniatty@cs.albany.edu on Mon, Jan 24, 2000 at 02:58:34AM -0500 Organisation: Ninth-Circle Enterprises Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG -On [20000124 10:13], William A. Maniatty (maniatty@cs.albany.edu) wrote: >Is it possible to get a look at the digital Unix guides, that might be a >good starting point. Are they on line (perhaps you have a URL)? http://www.unix.digital.com/faqs/publications/dev_doc/DOCUMENTATION/HTML/Digital_UNIX_Bookshelf.html -- Jeroen Ruigrok vd W/Asmodai asmodai@[wxs.nl|bart.nl|freebsd.org] Documentation nutter/B-rated Coder BSD: Technical excellence at its best The BSD Programmer's Documentation Project But Time, keeps flowing like a river (on and on)... To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Mon Jan 24 7:45: 3 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from smtppzh.pzh.nl (webshield.pzh.nl [194.178.168.50]) by hub.freebsd.org (Postfix) with SMTP id 10FED14CD4 for ; Mon, 24 Jan 2000 07:44:56 -0800 (PST) (envelope-from MULHUIJZEN@PZH.NL) Received: FROM smtp.pzh.nl BY smtppzh.pzh.nl ; Mon Jan 24 16:44:05 2000 0000 Received: from PZH40-1-Message_Server by smtp.pzh.nl with Novell_GroupWise; Mon, 24 Jan 2000 16:44:11 +0100 Message-Id: X-Mailer: Novell GroupWise 5.5.2 Date: Mon, 24 Jan 2000 16:44:05 +0100 From: "ROGIER MULHUIJZEN" To: Cc: , Subject: Re: FreBSD 3.3, power off and power button stuff Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Disposition: inline Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG A few things here. apmd is not the same as apm. So check your /etc/rc.conf to see if you have both apm_enable and apmd_enable set to "YES". apmd is just a daemon to take care of some apm events, but for shutdown -p it's not needed. Try 'apmconf -e' on the command line. If you still get 'apm: can't open /dev/apm: Device not configured' do 'dmesg | grep apm' If that returns nothing your kernel doesn't have APM in it. Check if you went through all the steps of compiling and installing a custom kernel. Or you might get something along the lines of 'apm0 not found at .....' in that case your BIOS doesn't have APM enabled. (if it supports it at all) Let me know if this helps at all.... DocWilco >>> Ralph Seguin 01/22 12:43 AM >>> Hi. I'm having some difficulty getting APM and power control working in FreeBSD 3.3 I've built a kernel with APM enabled in the config file and enabled it in rc.conf, however apmd says it's starting up, but ps never shows it running. From /etc/rc.conf: apm_enable="YES" bash-2.03# apm -s apm: can't open /dev/apm: Device not configured bash-2.03# ls -al apm* crw-rw---- 1 root operator 39, 0 Jan 21 15:24 apm crw-rw---- 1 root operator 39, 8 Jan 21 15:24 apmctl I did a MAKEDEV in /dev, just in case, but the major/minor numbers came out the same. What I'd like to do is have shutdown -p work properly and I'd also like to intercept the power switch so I can shutdown gracefully. Any suggestions are much appreciated. Thanks. -Ralph rpseguin@yahoo.com __________________________________________________ Do You Yahoo!? Talk to your friends online with Yahoo! Messenger. http://im.yahoo.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Mon Jan 24 8:39:29 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from smtp04.wxs.nl (smtp04.wxs.nl [195.121.6.59]) by hub.freebsd.org (Postfix) with ESMTP id D062C14E8E; Mon, 24 Jan 2000 08:39:23 -0800 (PST) (envelope-from asmodai@wxs.nl) Received: from daemon.ninth-circle.org ([195.121.197.155]) by smtp04.wxs.nl (Netscape Messaging Server 3.61) with ESMTP id AAA5B52; Mon, 24 Jan 2000 17:39:18 +0100 Received: (from asmodai@localhost) by daemon.ninth-circle.org (8.9.3/8.9.3) id RAA04557; Mon, 24 Jan 2000 17:39:11 +0100 (CET) (envelope-from asmodai) Date: Mon, 24 Jan 2000 17:39:11 +0100 From: Jeroen Ruigrok/Asmodai To: Chuck Robey Cc: Mike Smith , Greg Lehey , Bill Maniatty , FreeBSD-doc@FreeBSD.ORG, maniatty@cs.albany.edu, freebsd-hackers@FreeBSD.ORG Subject: Re: Learning the FreeBSD Kernel Message-ID: <20000124173911.I691@daemon.ninth-circle.org> References: <200001240635.WAA10110@mass.cdrom.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0i In-Reply-To: ; from chuckr@picnic.mat.net on Mon, Jan 24, 2000 at 01:47:43AM -0500 Organisation: Ninth-Circle Enterprises Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG -On [20000124 08:01], Chuck Robey (chuckr@picnic.mat.net) wrote: > >The problem is, you can't even find what the interfaces are. Reading the >code isn't very useful if you can't even find the right place to start >from. At least the interface points could be listed, so that someone >would know where to begin. Working on that. And I am finally getting somewhere. I hope to commit some manpages, very rough for now, somewhere this week. -- Jeroen Ruigrok vd W/Asmodai asmodai@[wxs.nl|bart.nl|freebsd.org] Documentation nutter/B-rated Coder BSD: Technical excellence at its best The BSD Programmer's Documentation Project We've laid together in the sun before the mind-rape has begun... To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Mon Jan 24 8:52:44 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from vitoria.ddsecurity.com.br (vitoria.ddsecurity.com.br [200.18.130.93]) by hub.freebsd.org (Postfix) with SMTP id 2926115A23 for ; Mon, 24 Jan 2000 08:51:53 -0800 (PST) (envelope-from grios@ddsecurity.com.br) Received: (qmail 3471 invoked by uid 1001); 24 Jan 2000 16:49:49 -0000 From: "Gustavo Rios" Date: Mon, 24 Jan 2000 14:49:49 -0200 (EDT) To: hackers@freebsd.org Subject: perfmon Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Hi! I have enabled perfmon options in my kernel config file, to be able to monitor my system performance. I am trying to do so through a sun box running perfmeter v3.5.1, but all i get is small pict that ressembles a lock with the following word: RIP. I have enable portmap (cause perfmeter uses it). The problem, is that there nothing being showed in my sun box. Can anyone here give a littler help? Thanks a lot for your time and cooperation. -- The thing i like most about Windows is .... You can download FreeBSD with it! To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Mon Jan 24 8:59:35 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from outmail.utsunomiya-u.ac.jp (outmail.utsunomiya-u.ac.jp [160.12.196.3]) by hub.freebsd.org (Postfix) with ESMTP id 3D50614CA7 for ; Mon, 24 Jan 2000 08:59:30 -0800 (PST) (envelope-from yokota@zodiac.mech.utsunomiya-u.ac.jp) Received: from zodiac.mech.utsunomiya-u.ac.jp (IDENT:PeJXVd+KoAoC30KmYtwe2T3nWpaOi3DW@zodiac.mech.utsunomiya-u.ac.jp [160.12.42.1]) by outmail.utsunomiya-u.ac.jp (8.9.3/3.7Wpl2) with ESMTP id BAA19648; Tue, 25 Jan 2000 01:59:01 +0900 (JST) Received: from zodiac.mech.utsunomiya-u.ac.jp (zodiac.mech.utsunomiya-u.ac.jp [160.12.42.1]) by zodiac.mech.utsunomiya-u.ac.jp (8.7.6+2.6Wbeta7/3.4W/zodiac-May96) with ESMTP id CAA13266; Tue, 25 Jan 2000 02:04:36 +0900 (JST) Message-Id: <200001241704.CAA13266@zodiac.mech.utsunomiya-u.ac.jp> To: "Koster, K.J." Cc: hackers@freebsd.org, yokota@zodiac.mech.utsunomiya-u.ac.jp Subject: Re: [PATCH] Please test the PS/2 mouse driver patch In-reply-to: Your message of "Mon, 24 Jan 2000 16:10:23 +0100." <59063B5B4D98D311BC0D0001FA7E45220FD18B@l04.research.kpn.com> References: <59063B5B4D98D311BC0D0001FA7E45220FD18B@l04.research.kpn.com> Date: Tue, 25 Jan 2000 02:04:35 +0900 From: Kazutaka YOKOTA Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG >I have the Logitech wireless radio mouse, and I get errors about illegal or >unknown PS/2 packets. It's cosmetic, because the mouse works like a charm, >but the very first mouse click or move makes it jump across the screen. >After that Please provide the following information so that I can diagnose your problem. 1. Which version of FreeBSD you are using. 2. EXACT product name and the model # of your Logitech mouse. You see, Logitech has produced quite a lot of mice. You can find the name and the model # printed on the label on the bottom surface of the mouse. 3. EXACT error messages you saw. Check /var/log/messages. The error messages may still be there. 4. If you are using FreeBSD 3.X, send me /var/run/dmesg.out and /etc/rc.conf so that I can see how your mouse is set up. 5. If you are describing error when you are using XFree86, send me your XF86Config file too, and tell me the version number of XFree86. Kazu >Does this fix address that problem too? > >If not, could I get you to address this problem? :-) > > Kees Jan To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Mon Jan 24 9:23:21 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by hub.freebsd.org (Postfix) with ESMTP id EA99714C39 for ; Mon, 24 Jan 2000 09:23:17 -0800 (PST) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.9.3/8.9.3) id LAA09412; Mon, 24 Jan 2000 11:22:47 -0600 (CST) (envelope-from dan) Date: Mon, 24 Jan 2000 11:22:47 -0600 From: Dan Nelson To: Gustavo Rios Cc: hackers@FreeBSD.ORG Subject: Re: perfmon Message-ID: <20000124112247.A9093@dan.emsphone.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0.1i In-Reply-To: ; from "Gustavo Rios" on Mon Jan 24 14:49:49 GMT 2000 X-OS: FreeBSD 4.0-CURRENT Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG In the last episode (Jan 24), Gustavo Rios said: > I have enabled perfmon options in my kernel config file, to be able > to monitor my system performance. The perfmon kernel option lets you read the Pentium/P6 hardware counters. It has nothing to do with Solaris's perfmeter, which probably uses a proprietary protocol anyway. You might want to take a look at xosview, xperfmon3, xsysinfo, or xsysstats in the ports tree. -- Dan Nelson dnelson@emsphone.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Mon Jan 24 9:46: 2 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from bingnet2.cc.binghamton.edu (bingnet2.cc.binghamton.edu [128.226.1.18]) by hub.freebsd.org (Postfix) with ESMTP id 4377A15280 for ; Mon, 24 Jan 2000 09:45:59 -0800 (PST) (envelope-from zzhang@cs.binghamton.edu) Received: from sol.cs.binghamton.edu (cs1-gw.cs.binghamton.edu [128.226.171.72]) by bingnet2.cc.binghamton.edu (8.9.3/8.9.3) with SMTP id MAA06991 for ; Mon, 24 Jan 2000 12:45:47 -0500 (EST) Date: Mon, 24 Jan 2000 11:31:28 -0500 (EST) From: Zhihui Zhang To: freebsd-hackers@freebsd.org Subject: Warning: xxx sector(s) in last cylinder unallocated Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG The message comes when you create a new filesystem with newfs. According to page 263 of the "The complete FreeBSD", this is not a problem because the space will be used anyway (how?). I searched the archive, somebody mentioned an option to newfs to use the unallocated space. My understanding is that if there are no bits in the bitmaps corresponding to those sectors, they will never be used. If there are, why newfs prints the warning message? I hope someone will clarify this for me. Thanks a lot. -Zhihui To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Mon Jan 24 10:12:17 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from bomber.avantgo.com (ws1.avantgo.com [207.214.200.194]) by hub.freebsd.org (Postfix) with ESMTP id C4961155A5 for ; Mon, 24 Jan 2000 10:12:12 -0800 (PST) (envelope-from scott@avantgo.com) Received: from river ([10.0.128.30]) by bomber.avantgo.com (Netscape Messaging Server 3.5) with SMTP id 278 for ; Mon, 24 Jan 2000 10:08:08 -0800 Message-ID: <01b601bf6696$60701930$1e80000a@avantgo.com> From: "Scott Hess" To: Subject: Performance issue with rfork() and single socketpairs versus multiple socketpairs. Date: Mon, 24 Jan 2000 10:11:03 -0800 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_NextPart_000_01B3_01BF6653.523EF680" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.00.2919.6600 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG This is a multi-part message in MIME format. ------=_NextPart_000_01B3_01BF6653.523EF680 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit I've found an odd performance issue that I cannot explain. I'm using socketpairs to communicate with multiple rfork(RFPROC) processes. Initially, I used a seperate socketpair to communicate requests to each process, with locking in the parent to synchronize access to each client. I determined that by using a single socketpair, I could save on all the socketpairs, and also perhaps improve performance by allowing more requests to be dispatched than there were processes to handle them. Whenever a worker process finished one request, it would immediately be able to start the next, without having to wait for the parent to receive the response and reprocess the request structures. Unfortunately, I've found that having a group of processes reading from a group of socketpairs has better performance than having them all read from a single socketpair. I've been unable to determine why. I've reduced the problem down to a simple program, included as an attachment (sorry about that). The results of two runs of the program: ganja% time ./commtest --single ./commtest --single 0.00s user 0.66s system 15% cpu 4.132 total ganja% time ./commtest --multi ./commtest --multi 0.00s user 0.46s system 68% cpu 0.675 total Note that in the --single case, the system time rises a bit - but the wallclock time rises a _lot_. At first I thought this was a variant on the "thundering herd" problem, but the CPU times taken don't seem to bear this out. Any ideas? Running under 3.2-RELEASE on an SMP machine, though I saw the same results on 3.4-RELEASE. Thanks, scott ------=_NextPart_000_01B3_01BF6653.523EF680 Content-Type: application/octet-stream; name="commtest.c" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="commtest.c" // commtest.c=0A= // gcc -Wall -g -o commtest commtest.c=0A= //=0A= // Test performance differences for multiple socketpairs versus a=0A= // single shared socketpair.=0A= #include =0A= #include =0A= #include =0A= #include =0A= #include =0A= #include =0A= #include =0A= #include =0A= =0A= typedef unsigned char request_t;=0A= =0A= #define CLIENT_EXIT ((request_t)(~0))=0A= #define CLIENT_COUNT 32=0A= #define REQUEST_TARGET 10000=0A= =0A= int client_fd_count=3D0;=0A= int client_fds[ CLIENT_COUNT];=0A= int server_fds[ CLIENT_COUNT];=0A= =0A= /* Reflect requests. */=0A= void client( int fd)=0A= {=0A= request_t request;=0A= int rc;=0A= =0A= while( 1) {=0A= if( (rc=3Dread( fd, &request, sizeof( request)))=3D=3D-1) {=0A= perror( "client read");=0A= _exit( 1);=0A= } else if( rcmaxfd) {=0A= maxfd=3Dclient_fds[ ii];=0A= }=0A= }=0A= =0A= /* Spin off children to process requests. */=0A= for( ii=3D0; ii To: Jeroen Ruigrok/Asmodai Subject: Re: Learning the FreeBSD Kernel Cc: "Daniel C. Sobral" , Bill Maniatty , FreeBSD-doc@FreeBSD.ORG, maniatty@cs.albany.edu, freebsd-hackers@FreeBSD.ORG, Greg Lehey In-reply-to: Your message of "Mon, 24 Jan 2000 16:16:40 +0100." <20000124161640.F691@daemon.ninth-circle.org> References: <20000124161640.F691@daemon.ninth-circle.org> <200001231648.LAA53658@cs.rpi.edu> <388C0FED.706330D0@newsguy.com> Date: Mon, 24 Jan 2000 11:26:57 -0700 From: Warner Losh Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG In message <20000124161640.F691@daemon.ninth-circle.org> Jeroen Ruigrok/Asmodai writes: : >As long as a device is just inb/outb (I seem to recall newbus have a : >replacement for these) : : bus_space_read_#() / bus_space_write_#() : : Where # is 1, 2, 4, or 8. But I don't think we support atomic 8 byte : atomic reads and writes. It isn't so much that "we" don't support atomic 8 byte operations, it is that the busses and cpus don't support these operations... Warner To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Mon Jan 24 10:58:48 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from smtp03.wxs.nl (smtp03.wxs.nl [195.121.6.37]) by hub.freebsd.org (Postfix) with ESMTP id E2A4215A40; Mon, 24 Jan 2000 10:58:31 -0800 (PST) (envelope-from asmodai@wxs.nl) Received: from daemon.ninth-circle.org ([195.121.196.28]) by smtp03.wxs.nl (Netscape Messaging Server 3.61) with ESMTP id AAA1C3D; Mon, 24 Jan 2000 19:58:14 +0100 Received: (from asmodai@localhost) by daemon.ninth-circle.org (8.9.3/8.9.3) id TAA05303; Mon, 24 Jan 2000 19:58:04 +0100 (CET) (envelope-from asmodai) Date: Mon, 24 Jan 2000 19:58:03 +0100 From: Jeroen Ruigrok/Asmodai To: Warner Losh Cc: "Daniel C. Sobral" , Bill Maniatty , FreeBSD-doc@FreeBSD.ORG, maniatty@cs.albany.edu, freebsd-hackers@FreeBSD.ORG, Greg Lehey Subject: Re: Learning the FreeBSD Kernel Message-ID: <20000124195803.C4731@daemon.ninth-circle.org> References: <20000124161640.F691@daemon.ninth-circle.org> <200001231648.LAA53658@cs.rpi.edu> <388C0FED.706330D0@newsguy.com> <20000124161640.F691@daemon.ninth-circle.org> <200001241826.LAA04800@harmony.village.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0i In-Reply-To: <200001241826.LAA04800@harmony.village.org>; from imp@village.org on Mon, Jan 24, 2000 at 11:26:57AM -0700 Organisation: Ninth-Circle Enterprises Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG -On [20000124 19:55], Warner Losh (imp@village.org) wrote: >In message <20000124161640.F691@daemon.ninth-circle.org> Jeroen Ruigrok/Asmodai writes: >: >As long as a device is just inb/outb (I seem to recall newbus have a >: >replacement for these) >: >: bus_space_read_#() / bus_space_write_#() >: >: Where # is 1, 2, 4, or 8. But I don't think we support atomic 8 byte >: atomic reads and writes. > >It isn't so much that "we" don't support atomic 8 byte operations, it >is that the busses and cpus don't support these operations... Sorry, mea culpa. It's just that I have been shifting back and forth between NetBSD and FreeBSD and that I see they have bus_space_[read|write]_8 defined and we don't. So my statement was actually more in reflection to NetBSD's support of it. Whether or not they support busses which do 8 byte atomic reads/writes I am not sure of. Thanks for the reality adjustment Warner. =) -- Jeroen Ruigrok vd W/Asmodai asmodai@[wxs.nl|bart.nl|freebsd.org] Documentation nutter/B-rated Coder BSD: Technical excellence at its best The BSD Programmer's Documentation Project Woe to the vanquished! To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Mon Jan 24 11: 7:22 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from rover.village.org (rover.village.org [204.144.255.49]) by hub.freebsd.org (Postfix) with ESMTP id 070C115978; Mon, 24 Jan 2000 11:07:02 -0800 (PST) (envelope-from imp@harmony.village.org) Received: from harmony.village.org (harmony.village.org [10.0.0.6]) by rover.village.org (8.9.3/8.9.3) with ESMTP id MAA02032; Mon, 24 Jan 2000 12:06:43 -0700 (MST) (envelope-from imp@harmony.village.org) Received: from harmony.village.org (localhost.village.org [127.0.0.1]) by harmony.village.org (8.9.3/8.8.3) with ESMTP id MAA05119; Mon, 24 Jan 2000 12:06:30 -0700 (MST) Message-Id: <200001241906.MAA05119@harmony.village.org> To: Jeroen Ruigrok/Asmodai Subject: Re: Learning the FreeBSD Kernel Cc: "Daniel C. Sobral" , Bill Maniatty , FreeBSD-doc@FreeBSD.ORG, maniatty@cs.albany.edu, freebsd-hackers@FreeBSD.ORG, Greg Lehey In-reply-to: Your message of "Mon, 24 Jan 2000 19:58:03 +0100." <20000124195803.C4731@daemon.ninth-circle.org> References: <20000124195803.C4731@daemon.ninth-circle.org> <20000124161640.F691@daemon.ninth-circle.org> <200001231648.LAA53658@cs.rpi.edu> <388C0FED.706330D0@newsguy.com> <20000124161640.F691@daemon.ninth-circle.org> <200001241826.LAA04800@harmony.village.org> Date: Mon, 24 Jan 2000 12:06:30 -0700 From: Warner Losh Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG In message <20000124195803.C4731@daemon.ninth-circle.org> Jeroen Ruigrok/Asmodai writes: : So my statement was actually more in reflection to NetBSD's support of : it. Whether or not they support busses which do 8 byte atomic : reads/writes I am not sure of. : : Thanks for the reality adjustment Warner. =) Yes. Looking at the bus.h in NetBSD/i386 I see: #if 0 /* Cause a link error for bus_space_read_8 */ #define bus_space_read_8(t, h, o) !!! bus_space_read_8 unimplemented !!! #endif The Netbsd/alpha version appears to have it defined. Makes sense when you think about it. Warner To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Mon Jan 24 11: 9:12 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from web2103.mail.yahoo.com (web2103.mail.yahoo.com [128.11.68.247]) by hub.freebsd.org (Postfix) with SMTP id C563C15BF9 for ; Mon, 24 Jan 2000 11:08:38 -0800 (PST) (envelope-from rpseguin@yahoo.com) Received: (qmail 15694 invoked by uid 60001); 24 Jan 2000 19:08:34 -0000 Message-ID: <20000124190834.15693.qmail@web2103.mail.yahoo.com> Received: from [63.80.94.77] by web2103.mail.yahoo.com; Mon, 24 Jan 2000 11:08:34 PST Date: Mon, 24 Jan 2000 11:08:34 -0800 (PST) From: Ralph Seguin Subject: Re: FreBSD 3.3, power off and power button stuff To: ROGIER MULHUIJZEN Cc: freebsd-hackers@freebsd.org, brooks@one-eyed-alien.net MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > 'dmesg | grep apm' > If that returns nothing your kernel doesn't have APM > in it. Check if > you went through all the steps of compiling and > installing a custom kernel. Pretty sure I did all of this correctly. Mr Brooks gave me a useful pointer: remove disable from the apm config line. I guess I should actually READ what I'm doing... :-) Here's what I've got: cd /usr/src/sys/i386/conf /usr/sbin/config -g TESTKERNEL cd ../../compile/TESTKERNEL make depend make all Then, I FTP'ed the kernel over to the test machine and did the install line, by hand: Pilfered from the kernel Makefile: bash-2.03# cat kinst #!/bin/sh chflags noschg /kernel mv /kernel /kernel.old PATH=${PATH}:/sbin:/usr/sbin if [ `sysctl -n kern.bootfile` = ${DESTDIR}/kernel ] ; then sysctl -w kern.bootfile=${DESTDIR}/kernel.old ; if [ -f /var/db/kvm_kernel.db ] ; then mv -f /var/db/kvm_kernel.db /var/db/kvm_kernel.old.db fi fi install -c -m 555 -o root -g wheel -fschg kernel / > Or you might get something along the lines of 'apm0 > not found at .....' > in that case your BIOS doesn't have APM enabled. (if > it supports it at all) It's an Intel i810E motherboard which has APM support. Apparently other people have had trouble with shutdown -p not working in 3.x kernels. Unfortunately, I don't have the option of going to -current, so I need to get it going in 3.3-RELEASE. What files are involved in APM and power control? Would it be easy to produce a patch to merge in to 3.3-RELEASE? Does anyone have shutdown -p / halt -p working in 3.3-RELEASE? Reading the LINT kernel config file, it mentions VM86 being related to apm? Should I be turning this option on (I'm going to try that as an experiment soon)? Thanks. -Ralph rpseguin@yahoo.com __________________________________________________ Do You Yahoo!? Talk to your friends online with Yahoo! Messenger. http://im.yahoo.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Mon Jan 24 11:17:12 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from shell.webmaster.com (mail.webmaster.com [209.133.28.73]) by hub.freebsd.org (Postfix) with ESMTP id 7E033159F2 for ; Mon, 24 Jan 2000 11:17:01 -0800 (PST) (envelope-from davids@webmaster.com) Received: from whenever ([209.133.29.2]) by shell.webmaster.com (Post.Office MTA v3.5.3 release 223 ID# 0-12345L500S10000V35) with SMTP id com; Mon, 24 Jan 2000 11:16:57 -0800 From: "David Schwartz" To: "Mikhail Teterin" , "Warner Losh" Cc: Subject: RE: kern/13644 Date: Mon, 24 Jan 2000 11:16:57 -0800 Message-ID: <000001bf669f$94c4ec70$021d85d1@youwant.to> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook 8.5, Build 4.71.2377.0 Importance: Normal In-Reply-To: <200001240547.AAA46261@rtfm.newton> X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > =The man pages say exactly: > = If timeout is a non-nil pointer, it specifies a maximum interval > = to wait for the selection to complete. > =Which doesn't say that it will sleep no more than this. It says that it > =will wait no longer than this for the selection to complete. It doesn't > =guarantee anything, imho. It doesn't guarnatee that you will be > =scheduled at any given time. > Yep. But that little, that I was told of implementation, says that > the rounding up is there to guarantee the sleep of no less then > specified. This is consistent with my experiments, which show steady > 9-10 milliseconds extra sleeping time. The man page is correct and the implementation is correct. The purpose of the timeout field in select is to specify the longest you want to wait. The implementation guarantees that it will wait at least that long if it needs to. It's like if I asked my wife to wait for a UPS package to arrive starting now. And she says, "what's the maximum I need to wait", and I say "4 hours". She's complying with my request if she waits for at least 4 hours, right? The term "maximum" refers to the fact that she can stop waiting earlier if the package arrives. It doesn't mean she can't wait more than 4 hours. DS To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Mon Jan 24 11:19:32 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from rover.village.org (rover.village.org [204.144.255.49]) by hub.freebsd.org (Postfix) with ESMTP id 88233152B1 for ; Mon, 24 Jan 2000 11:19:23 -0800 (PST) (envelope-from imp@harmony.village.org) Received: from harmony.village.org (harmony.village.org [10.0.0.6]) by rover.village.org (8.9.3/8.9.3) with ESMTP id MAA02070; Mon, 24 Jan 2000 12:19:13 -0700 (MST) (envelope-from imp@harmony.village.org) Received: from harmony.village.org (localhost.village.org [127.0.0.1]) by harmony.village.org (8.9.3/8.8.3) with ESMTP id MAA05195; Mon, 24 Jan 2000 12:19:00 -0700 (MST) Message-Id: <200001241919.MAA05195@harmony.village.org> To: "David Schwartz" Subject: Re: kern/13644 Cc: "Mikhail Teterin" , hackers@FreeBSD.ORG In-reply-to: Your message of "Mon, 24 Jan 2000 11:16:57 PST." <000001bf669f$94c4ec70$021d85d1@youwant.to> References: <000001bf669f$94c4ec70$021d85d1@youwant.to> Date: Mon, 24 Jan 2000 12:19:00 -0700 From: Warner Losh Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG In message <000001bf669f$94c4ec70$021d85d1@youwant.to> "David Schwartz" writes: : The term "maximum" refers to the fact that she can stop waiting earlier if : the package arrives. It doesn't mean she can't wait more than 4 hours. Exactly. She's not letting you down by waiting 5 hours before giving up, or going somewhere else for an hour after the 4 hours are up and then phoning you to say that there was no package. Warner To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Mon Jan 24 11:31:24 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from daffy.rentech.net (daffy.rentech.net [208.138.125.10]) by hub.freebsd.org (Postfix) with SMTP id 730E615802 for ; Mon, 24 Jan 2000 11:30:59 -0800 (PST) (envelope-from thscalf@rentech.net) Received: (qmail 25106 invoked by uid 502); 24 Jan 2000 20:32:54 -0000 Message-ID: <20000124203254.25105.qmail@daffy.rentech.net> From: thscalf@rentech.net To: hackers@freebsd.org Subject: routed config file Date: Mon, 24 Jan 2000 20:32:54 GMT Mime-version: 1.0 Content-type: text/plain; charset="us-ascii" Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG The following is a sample of our existing network.What we need to happen is all the traffic that is coming from eth2 ( being masq'ed) be sent out router A, and all the rest out router B. Will routed do it, and how? currently the default route is route B and therefore all the outbound traffic goes there. Thanks in advance, Thad Scalf RAF ------------------------------Network Picture------------------------- | | |---------------| |-----------------| | Router A | | Router B | | 215.178.0.34 | | 40.15.125.250 | |---------------| |-----------------| | | | | |---------------------------------------------------------| | eth3 eth0 | | 215.178.0.33 40.15.125.193 | | 255.255.255.224 255.255.255.192 | | | | Linux router | | | | eth2 eth1 | | eth2 - 215.178.0.3 eth1 - 40.15.125.1 | | 215.178.0.0/27 40.15.125.0/26 | | eth2:1 - 192.168.0.2 eth1:0 - 40.15.125.65 | | 192.168.0.0/24 40.15.125.64/26 | |---------------------------------------------------------| | | | Sub-networks routed and masq'ed from here. | | 215.178.0.64/26 gw 215.178.0.1 ( frame pipe to external networks) | | 10.0.0.0/16 gw 215.178.0.1 | | 192.168.10.0/24 gw 215.178.0.1 | | 192.168.20.0/24 gw 215.178.0.1 | | 192.168.30.0/24 gw 215.178.0.1 | | more networks will be added here... To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Mon Jan 24 11:41: 0 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from apollo.backplane.com (apollo.backplane.com [216.240.41.2]) by hub.freebsd.org (Postfix) with ESMTP id 1190715C4E for ; Mon, 24 Jan 2000 11:40:01 -0800 (PST) (envelope-from dillon@apollo.backplane.com) Received: (from dillon@localhost) by apollo.backplane.com (8.9.3/8.9.1) id LAA91219; Mon, 24 Jan 2000 11:39:29 -0800 (PST) (envelope-from dillon) Date: Mon, 24 Jan 2000 11:39:29 -0800 (PST) From: Matthew Dillon Message-Id: <200001241939.LAA91219@apollo.backplane.com> To: "Scott Hess" Cc: Subject: Re: Performance issue with rfork() and single socketpairs versus multiple socketpairs. References: <01b601bf6696$60701930$1e80000a@avantgo.com> Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG :I've found an odd performance issue that I cannot explain. I'm using :socketpairs to communicate with multiple rfork(RFPROC) processes. :Initially, I used a seperate socketpair to communicate requests to each :... : :Unfortunately, I've found that having a group of processes reading from a :group of socketpairs has better performance than having them all read from :a single socketpair. I've been unable to determine why. I've reduced the :problem down to a simple program, included as an attachment (sorry about :that). The results of two runs of the program: The problem is that when you have N processes waiting on a single socket and you write to the socket, all N processes will wake up even though only one will get the data you wrote. This is very similar to the select() problem -- N processes select()ing on the same descriptor (typically a socket listen descriptor), new connection comes in, all N processes are woken up even though only one's accept() will succeed. As an alternative to socket pairs, I would consider using SysV shared memory and SysV semaphores. Under -current you can use shared file mmap()'s with MAP_NOSYNC as an alternative to using SysV shared memory, but the SysV shared memory calls will be more portable. ( When messing with SysV shared memory the system utility 'ipcs -a' comes in useful ). man -k shm man ipcs -Matt To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Mon Jan 24 11:41:43 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from lor.watermarkgroup.com (lor.watermarkgroup.com [207.202.73.33]) by hub.freebsd.org (Postfix) with ESMTP id 0EC311520D; Mon, 24 Jan 2000 11:41:35 -0800 (PST) (envelope-from luoqi@watermarkgroup.com) Received: (from luoqi@localhost) by lor.watermarkgroup.com (8.8.8/8.8.8) id OAA08645; Mon, 24 Jan 2000 14:16:23 -0500 (EST) (envelope-from luoqi) Date: Mon, 24 Jan 2000 14:16:23 -0500 (EST) From: Luoqi Chen Message-Id: <200001241916.OAA08645@lor.watermarkgroup.com> To: FreeBSD-current@FreeBSD.ORG, FreeBSD-hackers@FreeBSD.ORG, kato@ganko.eps.nagoya-u.ac.jp Subject: Re: indirection in bus space Cc: FreeBSD98-hackers@jp.freebsd.org, nyan@jp.freebsd.org Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > Do you have any comment anout the patch? If there isn't any big > problem, I hope to commit it to current. > > Thank you. > > > I wrote: > > Do you remember this topic? I have revised the indirection support > > patch. What I have changed are: > > - to make diff files more readable > > - introduce the bus_simple_create_bsh() that creates > > a bus_space_handle_tag from a base address. > > > We shouldn't need bus_simple_create_bsh(). All drivers ought to use rman_get_bushandle()/rman_get_bustag() to retrieve the bus handle and tag, and use them in bus_space_read/write calls to perform device io. Drivers that don't do that should be fixed. Why have two files bus_at386.h and bus_pc98.h? I386_BUS_PIO_IND should be able to live with I386_BUS_PIO and I386_BUS_MEMIO happily together. -lq To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Mon Jan 24 12: 7: 8 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from misha.cisco.com (misha.cisco.com [171.69.206.50]) by hub.freebsd.org (Postfix) with ESMTP id 7E3D9159B9; Mon, 24 Jan 2000 12:06:48 -0800 (PST) (envelope-from mi@misha.cisco.com) Received: (from mi@localhost) by misha.cisco.com (8.9.3/8.9.1) id PAA35725; Mon, 24 Jan 2000 15:06:26 -0500 (EST) (envelope-from mi) Message-Id: <200001242006.PAA35725@misha.cisco.com> Subject: Re: kern/13644 In-Reply-To: <000001bf669f$94c4ec70$021d85d1@youwant.to> from David Schwartz at "Jan 24, 2000 11:16:57 am" To: David Schwartz Date: Mon, 24 Jan 2000 15:06:26 -0500 (EST) Cc: imp@village.org, hackers@FreeBSD.ORG, bde@FreeBSD.ORG, eischen@vigrid.com Reply-To: mi@aldan.algebra.com From: Mikhail Teterin X-Mailer: ELM [version 2.4ME+ PL60 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG David Schwartz once wrote: > The man page is correct and the implementation is correct. Several people, said the man pages are broken: Bruce Evans on Dec 28: > If timeout is a non-nil pointer, it specifies > a maximum interval to wait for the selection > to complete. This is a bug in the man page. It is so poorly worded that it is broken. "maximum" here means "minimum" in the case where no selected event occurs. Daniel Eischen on Jan 23: You have to guarantee that the actual time is greater than or equal to the amount of time specified. Warner Losh on Jan 23: : Could you provide the chapter/verse number of : where POSIX spec contradicts the man pages? It : will help me make my case on the TCL forum, : since the TCL developers remain under the : mistaken assumption, that select() may return : earlier, but never later than specified. Somewhere in the archives have a pointer to the unified unix spec for select. Might want to look for it. A useful regular expression might be http://www.*/select.*. This is becoming ridiculous. Somehow, I get a feeling a bunch of people manage to agree with each other on a subject they express exactly opposite opinions. -mi To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Mon Jan 24 12:28:11 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from fw.wintelcom.net (ns1.wintelcom.net [209.1.153.20]) by hub.freebsd.org (Postfix) with ESMTP id 5229315201; Mon, 24 Jan 2000 12:28:08 -0800 (PST) (envelope-from bright@fw.wintelcom.net) Received: (from bright@localhost) by fw.wintelcom.net (8.9.3/8.9.3) id MAA07167; Mon, 24 Jan 2000 12:51:50 -0800 (PST) Date: Mon, 24 Jan 2000 12:51:50 -0800 From: Alfred Perlstein To: Mikhail Teterin Cc: David Schwartz , imp@village.org, hackers@FreeBSD.ORG, bde@FreeBSD.ORG, eischen@vigrid.com Subject: Re: kern/13644 Message-ID: <20000124125150.C26520@fw.wintelcom.net> References: <000001bf669f$94c4ec70$021d85d1@youwant.to> <200001242006.PAA35725@misha.cisco.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0.1i In-Reply-To: <200001242006.PAA35725@misha.cisco.com>; from mi@aldan.algebra.com on Mon, Jan 24, 2000 at 03:06:26PM -0500 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG * Mikhail Teterin [000124 12:35] wrote: > David Schwartz once wrote: > > > The man page is correct and the implementation is correct. > > Several people, said the man pages are broken: > > Bruce Evans on Dec 28: > > If timeout is a non-nil pointer, it specifies > > a maximum interval to wait for the selection > > to complete. > > This is a bug in the man page. It is so poorly > worded that it is broken. "maximum" here means > "minimum" in the case where no selected event > occurs. > > Daniel Eischen on Jan 23: > You have to guarantee that the actual time is > greater than or equal to the amount of time > specified. > > Warner Losh on Jan 23: > : Could you provide the chapter/verse number of > : where POSIX spec contradicts the man pages? It > : will help me make my case on the TCL forum, > : since the TCL developers remain under the > : mistaken assumption, that select() may return > : earlier, but never later than specified. > > Somewhere in the archives have a pointer to the > unified unix spec for select. Might want to look > for it. A useful regular expression might be > http://www.*/select.*. > > This is becoming ridiculous. Somehow, I get a feeling a bunch of people > manage to agree with each other on a subject they express exactly > opposite opinions. The manpage has been updated in -current: If timeout is a non-nil pointer, it specifies the maximum interval to wait for the selection to complete. System activity can lengthen the in- terval by an indeterminate amount. If timeout is a nil pointer, the select blocks indefinitely. To effect a poll, the timeout argument should be non-nil, pointing to a zero-valued timeval structure. If no one objects I'll be committing it to -stable and praying to the gods that this thread dies. -Alfred To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Mon Jan 24 12:35:45 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from apollo.backplane.com (apollo.backplane.com [216.240.41.2]) by hub.freebsd.org (Postfix) with ESMTP id 54D081565D; Mon, 24 Jan 2000 12:35:43 -0800 (PST) (envelope-from dillon@apollo.backplane.com) Received: (from dillon@localhost) by apollo.backplane.com (8.9.3/8.9.1) id MAA91877; Mon, 24 Jan 2000 12:35:06 -0800 (PST) (envelope-from dillon) Date: Mon, 24 Jan 2000 12:35:06 -0800 (PST) From: Matthew Dillon Message-Id: <200001242035.MAA91877@apollo.backplane.com> To: Alfred Perlstein Cc: Mikhail Teterin , David Schwartz , imp@village.org, hackers@FreeBSD.ORG, bde@FreeBSD.ORG, eischen@vigrid.com Subject: Re: kern/13644 References: <000001bf669f$94c4ec70$021d85d1@youwant.to> <200001242006.PAA35725@misha.cisco.com> <20000124125150.C26520@fw.wintelcom.net> Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG :The manpage has been updated in -current: : : If timeout is a non-nil pointer, it specifies the maximum interval to : wait for the selection to complete. System activity can lengthen the in- : terval by an indeterminate amount. : : If timeout is a nil pointer, the select blocks indefinitely. : : To effect a poll, the timeout argument should be non-nil, pointing to a : zero-valued timeval structure. : :If no one objects I'll be committing it to -stable and praying to the :gods that this thread dies. : :-Alfred 'nil' ? 'nil' is the designation for an ascii 0, not a pointer. Please use 'null' or 'NULL' -- for example, look at the gettimeofday man page. 'nil' has nothing to do with pointers. -Matt Matthew Dillon To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Mon Jan 24 12:38:26 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from fw.wintelcom.net (ns1.wintelcom.net [209.1.153.20]) by hub.freebsd.org (Postfix) with ESMTP id 08626152E1; Mon, 24 Jan 2000 12:38:25 -0800 (PST) (envelope-from bright@fw.wintelcom.net) Received: (from bright@localhost) by fw.wintelcom.net (8.9.3/8.9.3) id NAA07469; Mon, 24 Jan 2000 13:02:28 -0800 (PST) Date: Mon, 24 Jan 2000 13:02:28 -0800 From: Alfred Perlstein To: Matthew Dillon Cc: Mikhail Teterin , David Schwartz , imp@village.org, hackers@FreeBSD.ORG, bde@FreeBSD.ORG, eischen@vigrid.com Subject: Re: kern/13644 Message-ID: <20000124130228.F26520@fw.wintelcom.net> References: <000001bf669f$94c4ec70$021d85d1@youwant.to> <200001242006.PAA35725@misha.cisco.com> <20000124125150.C26520@fw.wintelcom.net> <200001242035.MAA91877@apollo.backplane.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0.1i In-Reply-To: <200001242035.MAA91877@apollo.backplane.com>; from dillon@apollo.backplane.com on Mon, Jan 24, 2000 at 12:35:06PM -0800 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG * Matthew Dillon [000124 12:59] wrote: > > :The manpage has been updated in -current: > : > : If timeout is a non-nil pointer, it specifies the maximum interval to > : wait for the selection to complete. System activity can lengthen the in- > : terval by an indeterminate amount. > : > : If timeout is a nil pointer, the select blocks indefinitely. > : > : To effect a poll, the timeout argument should be non-nil, pointing to a > : zero-valued timeval structure. > : > :If no one objects I'll be committing it to -stable and praying to the > :gods that this thread dies. > : > :-Alfred > > 'nil' ? 'nil' is the designation for an ascii 0, not a pointer. > Please use 'null' or 'NULL' -- for example, look at the gettimeofday > man page. 'nil' has nothing to do with pointers. I'll wait for more feedback and include this request in the final update, even if it's the only change. 'nil' doesn't cut it for me either. -- -Alfred Perlstein - [bright@wintelcom.net|alfred@freebsd.org] To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Mon Jan 24 12:55:44 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from ind.alcatel.com (postal.xylan.com [208.8.0.248]) by hub.freebsd.org (Postfix) with ESMTP id BEC42152C2 for ; Mon, 24 Jan 2000 12:55:36 -0800 (PST) (envelope-from wes@softweyr.com) Received: from mailhub.xylan.com (mailhub [198.206.181.70]) by ind.alcatel.com (8.9.3+Sun/8.9.1 (ind.alcatel.com 3.0 [OUT])) with SMTP id MAA13359; Mon, 24 Jan 2000 12:53:30 -0800 (PST) X-Origination-Site: Received: from omni.xylan.com by mailhub.xylan.com (SMI-8.6/SMI-SVR4 (mailhub 2.1 [HUB])) id MAA18754; Mon, 24 Jan 2000 12:53:29 -0800 Received: from softweyr.com (dyn0.utah.xylan.com [198.206.184.236]) by omni.xylan.com (8.9.3+Sun/8.9.1 (Xylan engr [SPOOL])) with ESMTP id MAA29798; Mon, 24 Jan 2000 12:52:06 -0800 (PST) Message-ID: <388CBCDE.8858ED74@softweyr.com> Date: Mon, 24 Jan 2000 13:58:06 -0700 From: Wes Peters Organization: Softweyr LLC X-Mailer: Mozilla 4.7 [en] (X11; U; FreeBSD 3.3-RELEASE i386) X-Accept-Language: en MIME-Version: 1.0 To: mi@aldan.algebra.com Cc: hackers@freebsd.org Subject: Re: kern/13644 References: <200001242006.PAA35725@misha.cisco.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Mikhail Teterin wrote: > > David Schwartz once wrote: > > > The man page is correct and the implementation is correct. > > Several people, said the man pages are broken: > > [...] > > This is becoming ridiculous. Somehow, I get a feeling a bunch of people > manage to agree with each other on a subject they express exactly > opposite opinions. So shut up and do something about it. So far, we've seen everything *but* patches for the man page from you. Propose a better wording instead of just throwing bricks. -- "Where am I, and what am I doing in this handbasket?" Wes Peters Softweyr LLC wes@softweyr.com http://softweyr.com/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Mon Jan 24 13: 3:32 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from ind.alcatel.com (postal.xylan.com [208.8.0.248]) by hub.freebsd.org (Postfix) with ESMTP id BE62D152FB for ; Mon, 24 Jan 2000 13:03:25 -0800 (PST) (envelope-from wes@softweyr.com) Received: from mailhub.xylan.com (mailhub [198.206.181.70]) by ind.alcatel.com (8.9.3+Sun/8.9.1 (ind.alcatel.com 3.0 [OUT])) with SMTP id NAA13661; Mon, 24 Jan 2000 13:01:36 -0800 (PST) X-Origination-Site: Received: from omni.xylan.com by mailhub.xylan.com (SMI-8.6/SMI-SVR4 (mailhub 2.1 [HUB])) id NAA19469; Mon, 24 Jan 2000 13:01:36 -0800 Received: from softweyr.com (dyn0.utah.xylan.com [198.206.184.236]) by omni.xylan.com (8.9.3+Sun/8.9.1 (Xylan engr [SPOOL])) with ESMTP id NAA00363; Mon, 24 Jan 2000 13:00:15 -0800 (PST) Message-ID: <388CBEC7.BC807C68@softweyr.com> Date: Mon, 24 Jan 2000 14:06:15 -0700 From: Wes Peters Organization: Softweyr LLC X-Mailer: Mozilla 4.7 [en] (X11; U; FreeBSD 3.3-RELEASE i386) X-Accept-Language: en MIME-Version: 1.0 To: Matthew Dillon Cc: hackers@freebsd.org Subject: Re: kern/13644 References: <000001bf669f$94c4ec70$021d85d1@youwant.to> <200001242006.PAA35725@misha.cisco.com> <20000124125150.C26520@fw.wintelcom.net> <200001242035.MAA91877@apollo.backplane.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Matthew Dillon wrote: > > :The manpage has been updated in -current: > : > : If timeout is a non-nil pointer, it specifies the maximum interval to > : wait for the selection to complete. System activity can lengthen the in- > : terval by an indeterminate amount. > : > : If timeout is a nil pointer, the select blocks indefinitely. > : > : To effect a poll, the timeout argument should be non-nil, pointing to a > : zero-valued timeval structure. > : > :If no one objects I'll be committing it to -stable and praying to the > :gods that this thread dies. > : > :-Alfred > > 'nil' ? 'nil' is the designation for an ascii 0, not a pointer. > Please use 'null' or 'NULL' -- for example, look at the gettimeofday > man page. 'nil' has nothing to do with pointers. More correctly, 'nul' or 'NUL' are ASCII character 0. 'nil' is a pascal phrase that should *not* find its way into the general UNIX lexicon. -- "Where am I, and what am I doing in this handbasket?" Wes Peters Softweyr LLC wes@softweyr.com http://softweyr.com/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Mon Jan 24 13: 6:53 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from apollo.backplane.com (apollo.backplane.com [216.240.41.2]) by hub.freebsd.org (Postfix) with ESMTP id E17F814D22 for ; Mon, 24 Jan 2000 13:06:51 -0800 (PST) (envelope-from dillon@apollo.backplane.com) Received: (from dillon@localhost) by apollo.backplane.com (8.9.3/8.9.1) id NAA92130; Mon, 24 Jan 2000 13:06:42 -0800 (PST) (envelope-from dillon) Date: Mon, 24 Jan 2000 13:06:42 -0800 (PST) From: Matthew Dillon Message-Id: <200001242106.NAA92130@apollo.backplane.com> To: Wes Peters Cc: Matthew Dillon , hackers@FreeBSD.ORG Subject: Re: kern/13644 References: <000001bf669f$94c4ec70$021d85d1@youwant.to> <200001242006.PAA35725@misha.cisco.com> <20000124125150.C26520@fw.wintelcom.net> <200001242035.MAA91877@apollo.backplane.com> <388CBEC7.BC807C68@softweyr.com> Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG :> : :> :-Alfred :> :> 'nil' ? 'nil' is the designation for an ascii 0, not a pointer. :> Please use 'null' or 'NULL' -- for example, look at the gettimeofday :> man page. 'nil' has nothing to do with pointers. : :More correctly, 'nul' or 'NUL' are ASCII character 0. 'nil' is a pascal phrase :that should *not* find its way into the general UNIX lexicon. : :-- : "Where am I, and what am I doing in this handbasket?" : :Wes Peters Softweyr LLC :wes@softweyr.com http://softweyr.com/ Ah, indeed! nul/NUL == ascii. 'nil' should removed from our vocabulary. -Matt Matthew Dillon To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Mon Jan 24 13:13:58 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from pcnet1.pcnet.com (pcnet1.pcnet.com [204.213.232.3]) by hub.freebsd.org (Postfix) with ESMTP id 56648153A1; Mon, 24 Jan 2000 13:13:40 -0800 (PST) (envelope-from eischen@vigrid.com) Received: (from eischen@localhost) by pcnet1.pcnet.com (8.8.7/PCNet) id QAA13445; Mon, 24 Jan 2000 16:11:30 -0500 (EST) Date: Mon, 24 Jan 2000 16:11:30 -0500 (EST) From: Daniel Eischen To: Alfred Perlstein Cc: Matthew Dillon , Mikhail Teterin , David Schwartz , imp@village.org, hackers@FreeBSD.ORG, bde@FreeBSD.ORG Subject: Re: kern/13644 In-Reply-To: <20000124130228.F26520@fw.wintelcom.net> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Mon, 24 Jan 2000, Alfred Perlstein wrote: > * Matthew Dillon [000124 12:59] wrote: > > > > :The manpage has been updated in -current: > > : > > : If timeout is a non-nil pointer, it specifies the maximum interval to > > : wait for the selection to complete. System activity can lengthen the in- > > : terval by an indeterminate amount. > > : > > : If timeout is a nil pointer, the select blocks indefinitely. > > : > > : To effect a poll, the timeout argument should be non-nil, pointing to a > > : zero-valued timeval structure. > > : > > :If no one objects I'll be committing it to -stable and praying to the > > :gods that this thread dies. > > : > > :-Alfred > > > > 'nil' ? 'nil' is the designation for an ascii 0, not a pointer. > > Please use 'null' or 'NULL' -- for example, look at the gettimeofday > > man page. 'nil' has nothing to do with pointers. > > I'll wait for more feedback and include this request in the final > update, even if it's the only change. 'nil' doesn't cut it for me either. I don't like the first stanza and prefer wording more like what Solaris has for poll(): If none of the defined events have occurred on any selected file descriptor, poll() waits at least 'timeout' milliseconds for an event to occur on any of the selected file descrip- tors. On a computer where millisecond timing accuracy is not available, 'timeout' is rounded up to the nearest legal value available on that system. The "maximum interval to wait for the selection to complete" isn't really the maximum, but more like the lower bounds of the time to wait for the selection. Dan Eischen eischen@vigrid.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Mon Jan 24 13:25:37 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from apollo.backplane.com (apollo.backplane.com [216.240.41.2]) by hub.freebsd.org (Postfix) with ESMTP id D7E8C14A16; Mon, 24 Jan 2000 13:25:34 -0800 (PST) (envelope-from dillon@apollo.backplane.com) Received: (from dillon@localhost) by apollo.backplane.com (8.9.3/8.9.1) id NAA92301; Mon, 24 Jan 2000 13:21:22 -0800 (PST) (envelope-from dillon) Date: Mon, 24 Jan 2000 13:21:22 -0800 (PST) From: Matthew Dillon Message-Id: <200001242121.NAA92301@apollo.backplane.com> To: Daniel Eischen Cc: Alfred Perlstein , Mikhail Teterin , David Schwartz , imp@village.org, hackers@FreeBSD.ORG, bde@FreeBSD.ORG Subject: Re: kern/13644 References: Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG : :The "maximum interval to wait for the selection to complete" isn't :really the maximum, but more like the lower bounds of the time to :wait for the selection. : :Dan Eischen :eischen@vigrid.com It's definitely a maximum, because select() can return much sooner if one of the I/O events being waited on occurs. If you call it a minimum you imply that select() will not return until at least the specified amount of time elapses, which is incorrect. Just because it may go slightly over the specified time when no I/O events are pending does not change anything -- FreeBSD is not a hard-realtime system and programmers understand that. If anyone were to actually get confused by this, they have to go back to school. -Matt Matthew Dillon To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Mon Jan 24 14:51:41 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from overcee.netplex.com.au (overcee.netplex.com.au [202.12.86.7]) by hub.freebsd.org (Postfix) with ESMTP id B94DA158CA for ; Mon, 24 Jan 2000 14:51:36 -0800 (PST) (envelope-from peter@netplex.com.au) Received: from netplex.com.au (localhost [127.0.0.1]) by overcee.netplex.com.au (Postfix) with ESMTP id 77F651CD4; Tue, 25 Jan 2000 06:10:27 +0800 (WST) (envelope-from peter@netplex.com.au) X-Mailer: exmh version 2.1.1 10/15/1999 To: "Scott Hess" Cc: freebsd-hackers@freebsd.org Subject: Re: Performance issue with rfork() and single socketpairs versus multiple socketpairs. In-Reply-To: Message from "Scott Hess" of "Mon, 24 Jan 2000 10:11:03 PST." <01b601bf6696$60701930$1e80000a@avantgo.com> Date: Tue, 25 Jan 2000 06:10:27 +0800 From: Peter Wemm Message-Id: <20000124221027.77F651CD4@overcee.netplex.com.au> Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG "Scott Hess" wrote: > I've found an odd performance issue that I cannot explain. I'm using > socketpairs to communicate with multiple rfork(RFPROC) processes. Use 'pipe(2)' rahter than 'socketpair(2)' as both are bidirectional and pipe is a LOT faster. Cheers, -Peter To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Mon Jan 24 15:48:45 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from pcnet1.pcnet.com (pcnet1.pcnet.com [204.213.232.3]) by hub.freebsd.org (Postfix) with ESMTP id C0CDD14D62; Mon, 24 Jan 2000 15:48:31 -0800 (PST) (envelope-from eischen@vigrid.com) Received: (from eischen@localhost) by pcnet1.pcnet.com (8.8.7/PCNet) id RAA24151; Mon, 24 Jan 2000 17:21:05 -0500 (EST) Date: Mon, 24 Jan 2000 17:21:02 -0500 (EST) From: Daniel Eischen To: Matthew Dillon Cc: Alfred Perlstein , Mikhail Teterin , David Schwartz , imp@village.org, hackers@FreeBSD.ORG, bde@FreeBSD.ORG Subject: Re: kern/13644 In-Reply-To: <200001242121.NAA92301@apollo.backplane.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Mon, 24 Jan 2000, Matthew Dillon wrote: > : > :The "maximum interval to wait for the selection to complete" isn't > :really the maximum, but more like the lower bounds of the time to > :wait for the selection. > : > :Dan Eischen > :eischen@vigrid.com > > It's definitely a maximum, because select() can return much sooner if > one of the I/O events being waited on occurs. It's not a maximum if you round up to the nearest clock tick. > If you call it a minimum > you imply that select() will not return until at least the specified > amount of time elapses, which is incorrect. Just because it may go > slightly over the specified time when no I/O events are pending does not > change anything -- FreeBSD is not a hard-realtime system and programmers > understand that. If anyone were to actually get confused by this, they > have to go back to school. I know all this, but I still prefer Solaris' wording over what we have. If someone is going to change the man page for this, then I suggest we do it in a way that is more clear. "system activity" doesn't seem to me to cover rounding up to the nearest clock tick. I'm happy with leaving the man page as it is also. Dan Eischen eischen@vigrid.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Mon Jan 24 16:20: 7 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from genesis.digital-galaxy.net (supernova.digital-galaxy.net [207.227.248.9]) by hub.freebsd.org (Postfix) with ESMTP id DD5221566C for ; Mon, 24 Jan 2000 16:19:48 -0800 (PST) (envelope-from xirho@genesis.digital-galaxy.net) Received: (from xirho@localhost) by genesis.digital-galaxy.net (8.9.3/8.9.3) id QAA64650 for freebsd-hackers@freebsd.org; Mon, 24 Jan 2000 16:21:52 -0800 (PST) Date: Mon, 24 Jan 2000 16:21:52 -0800 (PST) From: Nathan Cohen Message-Id: <200001250021.QAA64650@genesis.digital-galaxy.net> To: freebsd-hackers@freebsd.org Subject: Device Drivers Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG I;d like to start contributing to the project, and I've heard unanimously a good place to start is device drivers. However, I'd like to try something other than sound cards (the only major recommendation I've heard so far) Are there any NICs, or other driver areas where FreeBSD could use some help? Thanks To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Mon Jan 24 16:34:14 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from eclogite.eps.nagoya-u.ac.jp (eclogite.eps.nagoya-u.ac.jp [133.6.124.145]) by hub.freebsd.org (Postfix) with ESMTP id 6FE7B152BC; Mon, 24 Jan 2000 16:34:04 -0800 (PST) (envelope-from kato@ganko.eps.nagoya-u.ac.jp) Received: from localhost (gneiss.eps.nagoya-u.ac.jp [133.6.124.148]) by eclogite.eps.nagoya-u.ac.jp (8.9.3/3.7W) with ESMTP id JAA72536; Tue, 25 Jan 2000 09:33:24 +0900 (JST) To: luoqi@watermarkgroup.com Cc: FreeBSD-current@FreeBSD.ORG, FreeBSD-hackers@FreeBSD.ORG, kato@ganko.eps.nagoya-u.ac.jp, FreeBSD98-hackers@jp.freebsd.org, nyan@jp.freebsd.org Subject: Re: indirection in bus space From: KATO Takenori In-Reply-To: Your message of "Mon, 24 Jan 2000 14:16:23 -0500 (EST)" <200001241916.OAA08645@lor.watermarkgroup.com> References: <200001241916.OAA08645@lor.watermarkgroup.com> X-Mailer: Mew version 1.93 on Emacs 19.34 / Mule 2.3 (SUETSUMUHANA) X-PGP-Fingerprint: 03 72 85 36 62 46 23 03 52 B1 10 22 44 10 0D 9E Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-Id: <20000125093254J.kato@gneiss.eps.nagoya-u.ac.jp> Date: Tue, 25 Jan 2000 09:32:54 +0900 X-Dispatcher: imput version 980905(IM100) Lines: 42 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Luoqi Chen wrote: > We shouldn't need bus_simple_create_bsh(). All drivers ought to use > rman_get_bushandle()/rman_get_bustag() to retrieve the bus handle and tag, > and use them in bus_space_read/write calls to perform device io. Drivers > that don't do that should be fixed. Yes. I think it is correct way. It means porting isp, amd and adv drivers to newbus, but I'm not familiar with these drivers. So I added bus_simple_creat_bsh function to reduce modification. > Why have two files bus_at386.h and bus_pc98.h? I386_BUS_PIO_IND should be > able to live with I386_BUS_PIO and I386_BUS_MEMIO happily together. Because they are different in the type of bus_space_tag_t from each other. It is the u_long in PC/AT and the structure in PC-98. For example, bus_space_read_1()s of them are: PC/AT: bus_space_read_1(...) { ... return (inb(handle + offset)); ... } PC-98: bus_space_read_1(...) { ... return (inb(bsh.bsh_iat[offset])); ... } -----------------------------------------------+--------------------------+ KATO Takenori | FreeBSD | Dept. Earth Planet. Sci, Nagoya Univ. | The power to serve! | Nagoya, 464-8602, Japan | http://www.FreeBSD.org/ | |http://www.jp.FreeBSD.org/| ++++ FreeBSD(98) 3.3R-Rev. 01 available! +==========================+ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Mon Jan 24 17:25:19 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from awfulhak.org (dynamic-116.max4-du-ws.dialnetwork.pavilion.co.uk [212.74.9.244]) by hub.freebsd.org (Postfix) with ESMTP id C4C7215279 for ; Mon, 24 Jan 2000 17:25:03 -0800 (PST) (envelope-from brian@Awfulhak.org) Received: from hak.lan.Awfulhak.org (root@hak.lan.Awfulhak.org [172.16.0.12]) by awfulhak.org (8.9.3/8.9.3) with ESMTP id BAA62626; Tue, 25 Jan 2000 01:24:10 GMT (envelope-from brian@lan.awfulhak.org) Received: from hak.lan.Awfulhak.org (brian@localhost.lan.Awfulhak.org [127.0.0.1]) by hak.lan.Awfulhak.org (8.9.3/8.9.3) with ESMTP id BAA36765; Tue, 25 Jan 2000 01:24:09 GMT (envelope-from brian@hak.lan.Awfulhak.org) Message-Id: <200001250124.BAA36765@hak.lan.Awfulhak.org> X-Mailer: exmh version 2.1.0 09/18/1999 To: Peter Wemm Cc: "Scott Hess" , freebsd-hackers@FreeBSD.ORG, brian@hak.lan.Awfulhak.org Subject: Re: Performance issue with rfork() and single socketpairs versus multiple socketpairs. In-Reply-To: Message from Peter Wemm of "Tue, 25 Jan 2000 06:10:27 +0800." <20000124221027.77F651CD4@overcee.netplex.com.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Tue, 25 Jan 2000 01:24:09 +0000 From: Brian Somers Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > "Scott Hess" wrote: > > > I've found an odd performance issue that I cannot explain. I'm using > > socketpairs to communicate with multiple rfork(RFPROC) processes. > > Use 'pipe(2)' rahter than 'socketpair(2)' as both are bidirectional and > pipe is a LOT faster. Although pipe(2)'s bi-directional capabilities are not standard (I've been stung by this in the past :-() > Cheers, > -Peter -- Brian Don't _EVER_ lose your sense of humour ! To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Mon Jan 24 17:40:38 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from bubba.whistle.com (bubba.whistle.com [207.76.205.7]) by hub.freebsd.org (Postfix) with ESMTP id 2FAD71535F; Mon, 24 Jan 2000 17:40:36 -0800 (PST) (envelope-from archie@whistle.com) Received: (from archie@localhost) by bubba.whistle.com (8.9.2/8.9.2) id RAA11446; Mon, 24 Jan 2000 17:21:39 -0800 (PST) From: Archie Cobbs Message-Id: <200001250121.RAA11446@bubba.whistle.com> Subject: How to get a dynamically assigned major number? To: phk@freebsd.org, peter@freebsd.org Date: Mon, 24 Jan 2000 17:21:39 -0800 (PST) Cc: freebsd-hackers@freebsd.org X-Mailer: ELM [version 2.4ME+ PL54 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Dear kernel device gurus, I'm trying to get the security/skip port working for 4.0. Right now it's marked BROKEN due to all the device changes earlier in the year, and was wondering if someone could help advise me how do update it.. Below is the current code that works with -stable. How do I get a major number for the cdevsw I need to add? It looks like cdevsw_add() no longer treats zero as 'assign me one dynamically'. I'd really like to get this fixed soon (ie, before 4.0).. I'm sure it's something simple I'm missing. Thanks! -Archie ___________________________________________________________________________ Archie Cobbs * Whistle Communications, Inc. * http://www.whistle.com ---------- excerpt from current code ------------ struct cdevsw skipdevsw = { skip_ifopen, skip_ifclose, skip_ifread, skip_ifwrite, skip_ifioctl, #if 0 nullstop, noreset, nodevtotty, #endif skip_ifpoll, nommap, nostrategy, "skip", NULL }; static struct cdevsw *old_dev; static u_long skip_major; /* * Handle loading and unloading of the SKIP module. */ static int skip_mod_event(module_t mod, int event, void *data) { int error = 0; dev_t dev; switch (event) { case MOD_LOAD: /* Add character device, getting assigned a major number */ dev = (dev_t) -1; if ((error = cdevsw_add(&dev, &skipdevsw, &old_dev)) != 0) { log(LOG_ERR, "skip: can't add device\n"); break; } skip_major = major(dev); /* Initialize SKIP itself */ if ((error = skip_init()) != 0) { /* XXX should remove char device */ log(LOG_ERR, "skip: init failed\n"); break; } log(LOG_INFO, "skip: device major=%lu, driver loaded\n", skip_major); break; case MOD_UNLOAD: /* Uninitialize SKIP */ if ((error = skip_uninit()) != 0) { log(LOG_INFO, "skip: uninit failed\n"); break; } /* Replace original device driver (if any) */ dev = makedev(skip_major, 0); (void) cdevsw_add(&dev, old_dev, NULL); break; default: error = EOPNOTSUPP; break; } return(error); } static moduledata_t skip_mod = { "skip", skip_mod_event, NULL }; DECLARE_MODULE(skip, skip_mod, SI_SUB_PROTO_END, SI_ORDER_MIDDLE); To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Mon Jan 24 17:48:36 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from rsv.ricoh.com (gateway.crc.ricoh.com [205.226.66.126]) by hub.freebsd.org (Postfix) with ESMTP id 65C72155A9 for ; Mon, 24 Jan 2000 17:48:33 -0800 (PST) (envelope-from rseguin@rsv.ricoh.com) Received: from gateway (int-gw.crc.ricoh.com [192.80.10.231]) by rsv.ricoh.com (8.9.3/8.9.1) with ESMTP id RAA10422; Mon, 24 Jan 2000 17:46:47 -0800 (PST) Received: from adc1.adc.rsv.ricoh.com ([63.80.94.20]) by gateway (8.9.3/8.9.1) with ESMTP id SAA20841; Mon, 24 Jan 2000 18:01:46 GMT Received: from honey.adc.rsv.ricoh.com by adc1.adc.rsv.ricoh.com (8.8.8/3.6Wpre2-98122121) id RAA10044; Mon, 24 Jan 2000 17:50:22 -0800 (PST) From: Ralph Seguin To: freebsd-hackers@FreeBSD.org Subject: Poweroff / power button in FreeBSD 3.3?? Date: Fri, 21 Jan 2000 15:36:45 -0800 X-Mailer: KMail [version 1.0.28] Content-Type: text/plain Cc: am@amsoft.ru, rpseguin@yahoo.com MIME-Version: 1.0 Message-Id: <00012115433600.30789@honey.adc.rsv.ricoh.com> Content-Transfer-Encoding: 8bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Hi. I'm having some difficulty getting APM and power control working in FreeBSD 3.3 I've built a kernel with APM enabled in the config file and enabled it in rc.conf, however apmd says it's starting up, but ps never shows it running. From /etc/rc.conf: apm_enable="YES" bash-2.03# apm -s apm: can't open /dev/apm: Device not configured bash-2.03# ls -al apm* crw-rw---- 1 root operator 39, 0 Jan 21 15:24 apm crw-rw---- 1 root operator 39, 8 Jan 21 15:24 apmctl What I'd like to do is have shutdown -p work properly and I'd also like to intercept the power switch so I can shutdown gracefully. Any suggestions are much appreciated. Thanks. -Ralph rpseguin@yahoo.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Mon Jan 24 17:57:28 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from smtp02.teb1.iconnet.net (smtp02.teb1.iconnet.net [209.3.218.43]) by hub.freebsd.org (Postfix) with ESMTP id C885C152AF; Mon, 24 Jan 2000 17:57:24 -0800 (PST) (envelope-from babkin@bellatlantic.net) Received: from bellatlantic.net (client-151-198-135-129.bellatlantic.net [151.198.135.129]) by smtp02.teb1.iconnet.net (8.9.1/8.9.1) with ESMTP id UAA17969; Mon, 24 Jan 2000 20:57:18 -0500 (EST) Message-ID: <388D04B2.4CDD7B9A@bellatlantic.net> Date: Mon, 24 Jan 2000 21:04:34 -0500 From: Sergey Babkin X-Mailer: Mozilla 4.7 [en] (X11; U; FreeBSD 4.0-19990626-CURRENT i386) X-Accept-Language: ru, en MIME-Version: 1.0 To: Mike Smith Cc: Bill Maniatty , Jeroen Ruigrok/Asmodai , FreeBSD-doc@FreeBSD.ORG, maniatty@cs.albany.edu, freebsd-hackers@FreeBSD.ORG, Greg Lehey Subject: Re: Learning the FreeBSD Kernel References: <200001240049.QAA09005@mass.cdrom.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Mike Smith wrote: > > Writing documentation is a resource-sucking nuisance; supporting outdated > documentation even more so. The BSD driver model is sufficiently simple I think that there might be a compromise solution: when someone learns the interface from analysing the code he might as well document his findings in some way for others to read. This would require minor additional effort. I'm going to try this with CAM in a few weeks and see whether this idea is viable. -SB To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Mon Jan 24 18: 4:39 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from lor.watermarkgroup.com (lor.watermarkgroup.com [207.202.73.33]) by hub.freebsd.org (Postfix) with ESMTP id 3BEF11566E; Mon, 24 Jan 2000 18:04:35 -0800 (PST) (envelope-from luoqi@watermarkgroup.com) Received: (from luoqi@localhost) by lor.watermarkgroup.com (8.8.8/8.8.8) id VAA14309; Mon, 24 Jan 2000 21:04:33 -0500 (EST) (envelope-from luoqi) Date: Mon, 24 Jan 2000 21:04:33 -0500 (EST) From: Luoqi Chen Message-Id: <200001250204.VAA14309@lor.watermarkgroup.com> To: kato@ganko.eps.nagoya-u.ac.jp Subject: Re: indirection in bus space Cc: FreeBSD-current@FreeBSD.ORG, FreeBSD-hackers@FreeBSD.ORG, FreeBSD98-hackers@jp.freebsd.org, nyan@jp.freebsd.org Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > > Why have two files bus_at386.h and bus_pc98.h? I386_BUS_PIO_IND should be > > able to live with I386_BUS_PIO and I386_BUS_MEMIO happily together. > > Because they are different in the type of bus_space_tag_t from each > other. It is the u_long in PC/AT and the structure in PC-98. For > example, bus_space_read_1()s of them are: > > PC/AT: > bus_space_read_1(...) > { > ... > return (inb(handle + offset)); > ... > } > > PC-98: > bus_space_read_1(...) > { > ... > return (inb(bsh.bsh_iat[offset])); > ... > } > You could set the handle to point to the structure instead: bus_space_read_1(...) { if (tag == I386_BUS_PIO) { return (inb(handle + offset)); } else if (tag == I386_BUS_PIO_IND) { struct bus_space_handle_pc98 *bsh = handle; return (inb(bsh->bsh_iat[offset])); } else if (tag == I386_BUS_MEMIO) { ... } } -lq To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Mon Jan 24 18: 5: 8 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from yana.lemis.com (yana.lemis.com [192.109.197.140]) by hub.freebsd.org (Postfix) with ESMTP id 4D4E8156D2; Mon, 24 Jan 2000 18:04:23 -0800 (PST) (envelope-from grog@mojave.worldwide.lemis.com) Received: from mojave.worldwide.lemis.com (j24.klt32.jaring.my [161.142.169.158]) by yana.lemis.com (8.8.8/8.8.8) with ESMTP id MAA13946; Tue, 25 Jan 2000 12:33:29 +1030 (CST) (envelope-from grog@mojave.worldwide.lemis.com) Received: (from grog@localhost) by mojave.worldwide.lemis.com (8.9.3/8.9.3) id RAA03427; Mon, 24 Jan 2000 17:17:42 +0800 (MYT) (envelope-from grog) Date: Mon, 24 Jan 2000 17:17:42 +0800 From: Greg Lehey To: Mike Smith Cc: Bill Maniatty , Jeroen Ruigrok/Asmodai , FreeBSD-doc@FreeBSD.ORG, maniatty@cs.albany.edu, freebsd-hackers@FreeBSD.ORG Subject: Re: Learning the FreeBSD Kernel Message-ID: <20000124171742.M2643@mojave.worldwide.lemis.com> Reply-To: Greg Lehey References: <20000124123920.F2643@mojave.worldwide.lemis.com> <200001240635.WAA10110@mass.cdrom.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0i In-Reply-To: <200001240635.WAA10110@mass.cdrom.com>; from msmith@FreeBSD.ORG on Sun, Jan 23, 2000 at 10:35:53PM -0800 WWW-Home-Page: http://www.lemis.com/~grog X-PGP-Fingerprint: 6B 7B C3 8C 61 CD 54 AF 13 24 52 F8 6D A4 95 EF Organization: LEMIS, PO Box 460, Echunga SA 5153, Australia Phone: +61-8-8388-8286 Fax: +61-8-8388-8725 Mobile: +61-41-739-7062 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Sunday, 23 January 2000 at 22:35:53 -0800, Mike Smith wrote: >> I can't agree with Mike Smith that reading the code is adequate. It >> certainly doesn't apply to newcomers, but it doesn't even apply to >> seasoned hackers like Mike: the BSD style doesn't provide for adequate >> comments, and so what you see from the code is mainly tactics, not >> strategy. > > You miss my point; you don't want to be writing a driver until you know > what you're doing. Documentation on an OS' driver interface won't teach > you that; it's something that's really only ever gleaned from experience. Hmm. I don't really see what your reply has to do with what you quote. I also strongly suspect that *nobody* really knows what he's doing when he writes his first driver, and that it's an interative process to learn how to get there. Most of us were ``thrown in the deep end'', and somehow we learnt to swim. But in detail, what we all did was to look at all documentation we could find, including of course the source code. I didn't say that reading the source code is bad; it's definitely part of it, just not enough. To be fair, this is an experience I've made with multiple operating systems now. FreeBSD is no worse than the others; writing drivers is inadequately described in every system I know. Greg -- Finger grog@lemis.com for PGP public key See complete headers for address and phone numbers To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Mon Jan 24 18: 6: 1 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from yana.lemis.com (yana.lemis.com [192.109.197.140]) by hub.freebsd.org (Postfix) with ESMTP id D8B5115937; Mon, 24 Jan 2000 18:05:33 -0800 (PST) (envelope-from grog@mojave.worldwide.lemis.com) Received: from mojave.worldwide.lemis.com (j24.klt32.jaring.my [161.142.169.158]) by yana.lemis.com (8.8.8/8.8.8) with ESMTP id MAA13949; Tue, 25 Jan 2000 12:34:14 +1030 (CST) (envelope-from grog@mojave.worldwide.lemis.com) Received: (from grog@localhost) by mojave.worldwide.lemis.com (8.9.3/8.9.3) id RAA03504; Mon, 24 Jan 2000 17:35:09 +0800 (MYT) (envelope-from grog) Date: Mon, 24 Jan 2000 17:35:09 +0800 From: Greg Lehey To: "William A. Maniatty" Cc: chuckr@picnic.mat.net, FreeBSD-doc@FreeBSD.ORG, asmodai@wxs.nl, freebsd-hackers@FreeBSD.ORG, maniattb@cs.rpi.edu, msmith@FreeBSD.ORG Subject: Re: Learning the FreeBSD Kernel Message-ID: <20000124173509.O2643@mojave.worldwide.lemis.com> Reply-To: Greg Lehey References: <200001240744.CAA02021@richard.cs.albany.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0i In-Reply-To: <200001240744.CAA02021@richard.cs.albany.edu>; from maniatty@cs.albany.edu on Mon, Jan 24, 2000 at 02:44:43AM -0500 WWW-Home-Page: http://www.lemis.com/~grog X-PGP-Fingerprint: 6B 7B C3 8C 61 CD 54 AF 13 24 52 F8 6D A4 95 EF Organization: LEMIS, PO Box 460, Echunga SA 5153, Australia Phone: +61-8-8388-8286 Fax: +61-8-8388-8725 Mobile: +61-41-739-7062 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Monday, 24 January 2000 at 2:44:43 -0500, William A. Maniatty wrote: > Hi There: > > Chuck Robey Writes: >> I know where Mike's coming from. Wait until the next guy posts on the >> list "I don't really know how to program, but please tell what 'C' is, and >> how to write a device driver". We had a pretty nasty flamewar over that >> maybe (I think) 9 months ago, and it still hurts folks, to be accused of >> conceit, when the guy was asking a grossly unanswerable question, and >> wouldn't believe it couldn't be boiled down to a 4 paragraph "device >> drivers for dummies" thing. Mike wants to avoid dealing with a horde of >> folks like that. >> >> I can't really blame Mike, it's impossible to make people understand that >> you can't boil everything down to a 30 second sound bite. BUT I still >> wish there was a map to interfaces. > > Ah! I wasn't aware of this. I would be somewhat thin skinned too, > too many requests for a free lunch can be a problem. On the other hand > I still think: (i) I'd still like my student to take a crack at it, > since he would pick up some understanding of kernel programming by doing it > (a good thing!) (ii) the project might help motivated (and good) people > pick up FreeBSD kernel programming and (iii) people can be pointed to > the manual and told to return if they have a specific question. These were pretty much exactly the reasons I thought of. I was thinking (iii) might be getting your guy to do the documentation :-) Greg -- Finger grog@lemis.com for PGP public key See complete headers for address and phone numbers To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Mon Jan 24 18: 7: 7 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from yana.lemis.com (yana.lemis.com [192.109.197.140]) by hub.freebsd.org (Postfix) with ESMTP id 8FDC414D01; Mon, 24 Jan 2000 18:06:56 -0800 (PST) (envelope-from grog@mojave.worldwide.lemis.com) Received: from mojave.worldwide.lemis.com (j24.klt32.jaring.my [161.142.169.158]) by yana.lemis.com (8.8.8/8.8.8) with ESMTP id MAA13961; Tue, 25 Jan 2000 12:35:36 +1030 (CST) (envelope-from grog@mojave.worldwide.lemis.com) Received: (from grog@localhost) by mojave.worldwide.lemis.com (8.9.3/8.9.3) id RAA03488; Mon, 24 Jan 2000 17:33:56 +0800 (MYT) (envelope-from grog) Date: Mon, 24 Jan 2000 17:33:56 +0800 From: Greg Lehey To: Chuck Robey Cc: "William A. Maniatty" , msmith@FreeBSD.ORG, FreeBSD-doc@FreeBSD.ORG, asmodai@wxs.nl, freebsd-hackers@FreeBSD.ORG, maniattb@cs.rpi.edu Subject: Re: Learning the FreeBSD Kernel Message-ID: <20000124173356.N2643@mojave.worldwide.lemis.com> Reply-To: Greg Lehey References: <200001240716.CAA02016@richard.cs.albany.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0i In-Reply-To: ; from chuckr@picnic.mat.net on Mon, Jan 24, 2000 at 02:28:23AM -0500 WWW-Home-Page: http://www.lemis.com/~grog X-PGP-Fingerprint: 6B 7B C3 8C 61 CD 54 AF 13 24 52 F8 6D A4 95 EF Organization: LEMIS, PO Box 460, Echunga SA 5153, Australia Phone: +61-8-8388-8286 Fax: +61-8-8388-8725 Mobile: +61-41-739-7062 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Monday, 24 January 2000 at 2:28:23 -0500, Chuck Robey wrote: > On Mon, 24 Jan 2000, William A. Maniatty wrote: > >> Both Chuck Robey and Mike Smith have some points, but that won't >> stop me from giving my opinion :-). Mike is correct that experience is >> key to being a solid systems software developer, who writes device drivers. >> Now the next question is how can someone get experience? By developing >> systems software (which by the way they should only do if they have >> experience at it :-)). >> >> Traditionally there are two approaches: >> 1) Have a friend available and bug them for help when you get stuck :-) >> 2) Read the documentation. >> 3) Read the code and lose a whole lot of productivity without certainty >> of figuring it out on your own. >> 4) Dismiss the whole problem as unmanageable and throw your >> weight behind a more productive project. > > I know where Mike's coming from. Wait until the next guy posts on the > list "I don't really know how to program, but please tell what 'C' is, and > how to write a device driver". We had a pretty nasty flamewar over that > maybe (I think) 9 months ago, and it still hurts folks, to be accused of > conceit, when the guy was asking a grossly unanswerable question, and > wouldn't believe it couldn't be boiled down to a 4 paragraph "device > drivers for dummies" thing. Mike wants to avoid dealing with a horde of > folks like that. I don't think anybody's picking on Mike, but there are some obvious points here: 1. This isn't an idiot asking inappropriate questions, it's a college professor asking very appropriate questions. 2. Nobody's asking Mike to do anything. I think that one of the problems Mike is showing (and it's not just Mike, but somehow it seems to be his turn to be picked on right now :-) is that it's painful enough to go through the learning experience the first time, and you don't really want to go back and try again and again. Unfortunately, this doesn't make it any less necessary. I was hoping that Bill's student might help create better documentation as well; if he succeeds in that, generations of FreeBSD driver programmers will burn incense at his shrine. Greg -- Finger grog@lemis.com for PGP public key See complete headers for address and phone numbers To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Mon Jan 24 19:30: 8 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from yana.lemis.com (yana.lemis.com [192.109.197.140]) by hub.freebsd.org (Postfix) with ESMTP id 4A3FF15890; Mon, 24 Jan 2000 19:29:48 -0800 (PST) (envelope-from grog@mojave.worldwide.lemis.com) Received: from mojave.worldwide.lemis.com (j13.ktb6.jaring.my [161.142.234.27]) by yana.lemis.com (8.8.8/8.8.8) with ESMTP id NAA14031; Tue, 25 Jan 2000 13:59:40 +1030 (CST) (envelope-from grog@mojave.worldwide.lemis.com) Received: (from grog@localhost) by mojave.worldwide.lemis.com (8.9.3/8.9.3) id LAA04854; Tue, 25 Jan 2000 11:04:16 +0800 (MYT) (envelope-from grog) Date: Tue, 25 Jan 2000 11:04:16 +0800 From: Greg Lehey To: Mike Smith Cc: Chuck Robey , freebsd-hackers@FreeBSD.ORG Subject: Re: Learning the FreeBSD Kernel Message-ID: <20000125110416.C4775@mojave.worldwide.lemis.com> Reply-To: Greg Lehey References: <200001241509.HAA11646@mass.cdrom.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0i In-Reply-To: <200001241509.HAA11646@mass.cdrom.com>; from msmith@FreeBSD.ORG on Mon, Jan 24, 2000 at 07:09:35AM -0800 WWW-Home-Page: http://www.lemis.com/~grog X-PGP-Fingerprint: 6B 7B C3 8C 61 CD 54 AF 13 24 52 F8 6D A4 95 EF Organization: LEMIS, PO Box 460, Echunga SA 5153, Australia Phone: +61-8-8388-8286 Fax: +61-8-8388-8725 Mobile: +61-41-739-7062 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Monday, 24 January 2000 at 7:09:35 -0800, Mike Smith wrote: >> On Sun, 23 Jan 2000, Mike Smith wrote: >> >>>> I can't agree with Mike Smith that reading the code is adequate. It >>>> certainly doesn't apply to newcomers, but it doesn't even apply to >>>> seasoned hackers like Mike: the BSD style doesn't provide for adequate >>>> comments, and so what you see from the code is mainly tactics, not >>>> strategy. >>> >>> You miss my point; you don't want to be writing a driver until you know >>> what you're doing. Documentation on an OS' driver interface won't teach >>> you that; it's something that's really only ever gleaned from experience. >> >> The problem is, you can't even find what the interfaces are. Reading the >> code isn't very useful if you can't even find the right place to start >> from. At least the interface points could be listed, so that someone >> would know where to begin. > > Listing the interface points won't help unless you know which ones are > relevant to what you're trying to do. I say it again; first you need to > know how to write a device driver, then you need to know what the > available tools are to get the job done. Having only the latter does > not help at all with the former. I'd like you to see you build a timber roofing structure: "Listing the kinds of beam won't help unless you know which ones are relevant to what you're trying to do. I say it again; first you need to know how to build a roof, then you need to know what the available tools are to get the job done. Having only the latter does not help at all with the former." I repeat: before you can do a job which requires tools, you need to be familiar with those tools. How do you get familiar with those tools? You work with them. The first step of familiarity with the tools doesn't make you an expert, but it helps you know what they look like, and when you find yourself up in the roof and trying to join two beams together, you'll at least have an idea which tools might be of use. Greg -- Finger grog@lemis.com for PGP public key See complete headers for address and phone numbers To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Mon Jan 24 19:31: 3 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from yana.lemis.com (yana.lemis.com [192.109.197.140]) by hub.freebsd.org (Postfix) with ESMTP id B6AF315632; Mon, 24 Jan 2000 19:30:51 -0800 (PST) (envelope-from grog@mojave.worldwide.lemis.com) Received: from mojave.worldwide.lemis.com (j13.ktb6.jaring.my [161.142.234.27]) by yana.lemis.com (8.8.8/8.8.8) with ESMTP id OAA14055; Tue, 25 Jan 2000 14:00:36 +1030 (CST) (envelope-from grog@mojave.worldwide.lemis.com) Received: (from grog@localhost) by mojave.worldwide.lemis.com (8.9.3/8.9.3) id KAA04806; Tue, 25 Jan 2000 10:54:43 +0800 (MYT) (envelope-from grog) Date: Tue, 25 Jan 2000 10:54:43 +0800 From: Greg Lehey To: "Daniel C. Sobral" Cc: Bill Maniatty , Jeroen Ruigrok/Asmodai , FreeBSD-doc@FreeBSD.ORG, maniatty@cs.albany.edu, freebsd-hackers@FreeBSD.ORG Subject: Re: Learning the FreeBSD Kernel Message-ID: <20000125105443.A4775@mojave.worldwide.lemis.com> Reply-To: Greg Lehey References: <200001231648.LAA53658@cs.rpi.edu> <388C0FED.706330D0@newsguy.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0i In-Reply-To: <388C0FED.706330D0@newsguy.com>; from dcs@newsguy.com on Mon, Jan 24, 2000 at 05:40:13PM +0900 WWW-Home-Page: http://www.lemis.com/~grog X-PGP-Fingerprint: 6B 7B C3 8C 61 CD 54 AF 13 24 52 F8 6D A4 95 EF Organization: LEMIS, PO Box 460, Echunga SA 5153, Australia Phone: +61-8-8388-8286 Fax: +61-8-8388-8725 Mobile: +61-41-739-7062 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Monday, 24 January 2000 at 17:40:13 +0900, Daniel C. Sobral wrote: > Documenting the available debugging tools and useful debugging > techniques would be mostly welcome. Aside from "how do I use the kernel > debugger", use of tools such as truss, and loading symbol tables to > kld's (see Greg Lehey's documentation on debugging vinum) would be > useful tutorials. Kick me on this in a month or so's time and I'll try to make a generalized document out of this one. Cross my palm with silver and I'll even write a "how to develop a driver" document. Greg -- Finger grog@lemis.com for PGP public key See complete headers for address and phone numbers To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Mon Jan 24 19:31:13 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from yana.lemis.com (yana.lemis.com [192.109.197.140]) by hub.freebsd.org (Postfix) with ESMTP id 67D2015984; Mon, 24 Jan 2000 19:30:55 -0800 (PST) (envelope-from grog@mojave.worldwide.lemis.com) Received: from mojave.worldwide.lemis.com (j13.ktb6.jaring.my [161.142.234.27]) by yana.lemis.com (8.8.8/8.8.8) with ESMTP id OAA14058; Tue, 25 Jan 2000 14:00:45 +1030 (CST) (envelope-from grog@mojave.worldwide.lemis.com) Received: (from grog@localhost) by mojave.worldwide.lemis.com (8.9.3/8.9.3) id KAA04822; Tue, 25 Jan 2000 10:58:26 +0800 (MYT) (envelope-from grog) Date: Tue, 25 Jan 2000 10:58:26 +0800 From: Greg Lehey To: Jeroen Ruigrok/Asmodai Cc: Mike Smith , Bill Maniatty , FreeBSD-doc@FreeBSD.ORG, maniatty@cs.albany.edu, freebsd-hackers@FreeBSD.ORG Subject: Re: Learning the FreeBSD Kernel Message-ID: <20000125105825.B4775@mojave.worldwide.lemis.com> Reply-To: Greg Lehey References: <20000124123920.F2643@mojave.worldwide.lemis.com> <200001240635.WAA10110@mass.cdrom.com> <20000124100410.A691@daemon.ninth-circle.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0i In-Reply-To: <20000124100410.A691@daemon.ninth-circle.org>; from asmodai@wxs.nl on Mon, Jan 24, 2000 at 10:04:10AM +0100 WWW-Home-Page: http://www.lemis.com/~grog X-PGP-Fingerprint: 6B 7B C3 8C 61 CD 54 AF 13 24 52 F8 6D A4 95 EF Organization: LEMIS, PO Box 460, Echunga SA 5153, Australia Phone: +61-8-8388-8286 Fax: +61-8-8388-8725 Mobile: +61-41-739-7062 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Monday, 24 January 2000 at 10:04:10 +0100, Jeroen Ruigrok/Asmodai wrote: > -On [20000124 08:01], Mike Smith (msmith@freebsd.org) wrote: >>> I can't agree with Mike Smith that reading the code is adequate. It >>> certainly doesn't apply to newcomers, but it doesn't even apply to >>> seasoned hackers like Mike: the BSD style doesn't provide for adequate >>> comments, and so what you see from the code is mainly tactics, not >>> strategy. >> >> You miss my point; you don't want to be writing a driver until you know >> what you're doing. Documentation on an OS' driver interface won't teach >> you that; it's something that's really only ever gleaned from experience. > > This I agree on with Mike. Writing device drivers isn't like > writing an application. In this respect, it is: I understand Mike to be saying "you can't learn by reading, you learn by doing". > The documentation I am writing will definately not be a tutorial > style piece of documentation, but a reference guide with sufficient > background material so that people a bit familiar with FreeBSD on > source level (note the ``a bit'') will get enough ideas and clues > from it to proceed forwards. I think it would benefit from tutorial style. That wouldn't be enough, but defining the workspace would make people a lot more comfortable. > I do not think making it a tutorial will be beneficial in the long run, > since I would have to discuss kernel sources, gdb, ddb and a number of > other things on the side. And that's a bad idea? I'd disagree. > I just know, from experience, that writing a driver involves more > than just code. Definitely. And that's one thing you've got to tell the newcomers. Greg -- Finger grog@lemis.com for PGP public key See complete headers for address and phone numbers To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Mon Jan 24 20:26:12 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from eclogite.eps.nagoya-u.ac.jp (eclogite.eps.nagoya-u.ac.jp [133.6.124.145]) by hub.freebsd.org (Postfix) with ESMTP id 28D6F14CF4; Mon, 24 Jan 2000 20:26:04 -0800 (PST) (envelope-from kato@ganko.eps.nagoya-u.ac.jp) Received: from localhost (gneiss.eps.nagoya-u.ac.jp [133.6.124.148]) by eclogite.eps.nagoya-u.ac.jp (8.9.3/3.7W) with ESMTP id NAA73085; Tue, 25 Jan 2000 13:25:08 +0900 (JST) To: luoqi@watermarkgroup.com Cc: kato@ganko.eps.nagoya-u.ac.jp, FreeBSD-current@FreeBSD.ORG, FreeBSD-hackers@FreeBSD.ORG, FreeBSD98-hackers@jp.freebsd.org, nyan@jp.freebsd.org Subject: Re: indirection in bus space From: KATO Takenori In-Reply-To: Your message of "Mon, 24 Jan 2000 21:04:33 -0500 (EST)" <200001250204.VAA14309@lor.watermarkgroup.com> References: <200001250204.VAA14309@lor.watermarkgroup.com> X-Mailer: Mew version 1.93 on Emacs 19.34 / Mule 2.3 (SUETSUMUHANA) X-PGP-Fingerprint: 03 72 85 36 62 46 23 03 52 B1 10 22 44 10 0D 9E Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-Id: <20000125132456C.kato@gneiss.eps.nagoya-u.ac.jp> Date: Tue, 25 Jan 2000 13:24:56 +0900 X-Dispatcher: imput version 980905(IM100) Lines: 20 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Luoqi Chen wrote: > You could set the handle to point to the structure instead: I think it is difficult to implement such conversion because: - Not only bus space stuff also resource manager stuff need to perform such conversion. - The type of the bus_space_handle_t can by determined only by the bus tag. The isa_alloc_resourcev (new function) cannot modify bus tag because what it does is only to allocate resources and it cannot register the address to the bus_space_handle_pc98. But allocated resources must be stored into bus_space_handle_pc98. -----------------------------------------------+--------------------------+ KATO Takenori | FreeBSD | Dept. Earth Planet. Sci, Nagoya Univ. | The power to serve! | Nagoya, 464-8602, Japan | http://www.FreeBSD.org/ | |http://www.jp.FreeBSD.org/| ++++ FreeBSD(98) 3.3R-Rev. 01 available! +==========================+ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Mon Jan 24 22: 1:56 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from lor.watermarkgroup.com (lor.watermarkgroup.com [207.202.73.33]) by hub.freebsd.org (Postfix) with ESMTP id DA8091536B; Mon, 24 Jan 2000 22:01:53 -0800 (PST) (envelope-from luoqi@watermarkgroup.com) Received: (from luoqi@localhost) by lor.watermarkgroup.com (8.8.8/8.8.8) id BAA17157; Tue, 25 Jan 2000 01:01:50 -0500 (EST) (envelope-from luoqi) Date: Tue, 25 Jan 2000 01:01:50 -0500 (EST) From: Luoqi Chen Message-Id: <200001250601.BAA17157@lor.watermarkgroup.com> To: kato@ganko.eps.nagoya-u.ac.jp Subject: Re: indirection in bus space Cc: FreeBSD-current@FreeBSD.ORG, FreeBSD-hackers@FreeBSD.ORG, FreeBSD98-hackers@jp.freebsd.org, nyan@jp.freebsd.org Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > I think it is difficult to implement such conversion because: > > - Not only bus space stuff also resource manager stuff need to > perform such conversion. Why? Both bus_space_handle_t and bus_space_tag_t are supposed to be opaque types. Resource manager needs not know the implementation details. > - The type of the bus_space_handle_t can by determined only by the > bus tag. The isa_alloc_resourcev (new function) cannot modify bus > tag because what it does is only to allocate resources and it > cannot register the address to the bus_space_handle_pc98. But > allocated resources must be stored into bus_space_handle_pc98. > We could create a new resource type SYS_RES_IOPORT_ARRAY, and intercept it in all isa_*_resoruce() methods. In isa_alloc_resource(), we malloc and return a fake resource record, in which we store I386_BUS_PIO_IND as bus tag and address of bus_space_handle_pc98 as bus handle. And in isa_release_resource(), we first release the underlying resources stored in the bus_space_handle_pc98 record and then free the fake resource record itself. It should be safe as long as we don't manipulate this resource by direct resource manager calls, which we shouldn't do anyway. (or we should implement it at the root bus level, if pci devices in pc98 systems also use discrete port addresses). -lq To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Mon Jan 24 23: 6: 6 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from kronos.alcnet.com (kronos.alcnet.com [63.69.28.22]) by hub.freebsd.org (Postfix) with ESMTP id A470114CF1 for ; Mon, 24 Jan 2000 23:06:03 -0800 (PST) (envelope-from kbyanc@posi.net) X-Provider: ALC Communications, Inc. http://www.alcnet.com/ Received: from gateway.posi.net (root@alc-150.alcnet.com [63.69.28.150]) by kronos.alcnet.com (8.9.3/8.9.3/antispam) with ESMTP id CAA73826; Tue, 25 Jan 2000 02:05:57 -0500 (EST) Received: from localhost (kbyanc@localhost) by gateway.posi.net (8.9.3/8.9.3) with ESMTP id CAA02547; Tue, 25 Jan 2000 02:15:24 -0500 (EST) (envelope-from kbyanc@posi.net) Date: Tue, 25 Jan 2000 02:15:22 -0500 (EST) From: Kelly Yancey To: Nathan Cohen Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: Device Drivers In-Reply-To: <200001250021.QAA64650@genesis.digital-galaxy.net> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Mon, 24 Jan 2000, Nathan Cohen wrote: > I;d like to start contributing to the project, and I've heard unanimously a good place to start is device drivers. However, I'd like to try something other than sound cards (the only major recommendation I've heard so far) > > Are there any NICs, or other driver areas where FreeBSD could use some help? > > Thanks > Check http://www.posi.net/freebsd/drivers/hardware-list.phtml for some hardware people would like to see supported (surely, there is more, but that is a start). Kelly -- Kelly Yancey - kbyanc@posi.net - Richmond, VA Analyst / E-business Development, Bell Industries http://www.bellind.com/ Maintainer, BSD Driver Database http://www.posi.net/freebsd/drivers/ Coordinator, Team FreeBSD http://www.posi.net/freebsd/Team-FreeBSD/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Mon Jan 24 23: 9:54 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from overcee.netplex.com.au (overcee.netplex.com.au [202.12.86.7]) by hub.freebsd.org (Postfix) with ESMTP id 9F72415234 for ; Mon, 24 Jan 2000 23:09:51 -0800 (PST) (envelope-from peter@netplex.com.au) Received: from netplex.com.au (localhost [127.0.0.1]) by overcee.netplex.com.au (Postfix) with ESMTP id 752381C03; Tue, 25 Jan 2000 15:09:49 +0800 (WST) (envelope-from peter@netplex.com.au) X-Mailer: exmh version 2.1.1 10/15/1999 To: Brian Somers Cc: "Scott Hess" , freebsd-hackers@FreeBSD.ORG, brian@hak.lan.Awfulhak.org Subject: Re: Performance issue with rfork() and single socketpairs versus multiple socketpairs. In-Reply-To: Message from Brian Somers of "Tue, 25 Jan 2000 01:24:09 GMT." <200001250124.BAA36765@hak.lan.Awfulhak.org> Date: Tue, 25 Jan 2000 15:09:49 +0800 From: Peter Wemm Message-Id: <20000125070949.752381C03@overcee.netplex.com.au> Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Brian Somers wrote: > > "Scott Hess" wrote: > > > > > I've found an odd performance issue that I cannot explain. I'm using > > > socketpairs to communicate with multiple rfork(RFPROC) processes. > > > > Use 'pipe(2)' rahter than 'socketpair(2)' as both are bidirectional and > > pipe is a LOT faster. > > Although pipe(2)'s bi-directional capabilities are not standard (I've > been stung by this in the past :-() Neither is rfork()... Cheers, -Peter To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Tue Jan 25 1:21:16 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from bomber.avantgo.com (ws1.avantgo.com [207.214.200.194]) by hub.freebsd.org (Postfix) with ESMTP id EAA7B14F23 for ; Tue, 25 Jan 2000 01:21:13 -0800 (PST) (envelope-from scott@avantgo.com) Received: from river ([10.0.128.30]) by bomber.avantgo.com (Netscape Messaging Server 3.5) with SMTP id 132; Tue, 25 Jan 2000 01:17:16 -0800 Message-ID: <0be801bf6715$601423d0$1e80000a@avantgo.com> From: "Scott Hess" To: "Matthew Dillon" Cc: References: <01b601bf6696$60701930$1e80000a@avantgo.com> <200001241939.LAA91219@apollo.backplane.com> Subject: Re: Performance issue with rfork() and single socketpairs versus multiple socketpairs. Date: Tue, 25 Jan 2000 01:20:08 -0800 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 5.00.2919.6600 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG "Matthew Dillon" wrote: > :Unfortunately, I've found that having a group of processes reading from a > :group of socketpairs has better performance than having them all read from > :a single socketpair. I've been unable to determine why. > > The problem is that when you have N processes waiting on a single > socket and you write to the socket, all N processes will wake up even > though only one will get the data you wrote. > As an alternative to socket pairs, I would consider using SysV shared > memory and SysV semaphores. OK, so let's say I did spend some time implementing it in terms of semget() and semop(). Would you be totally apalled if the performance turned out to be about the same as using a single socketpair? Do you have a very strong feeling that it should be significantly better. [Again, under 3.4-release.] I don't think I've done anything egregious, but things don't seem much better. Unfortunately, I'll have to wait until tomorrow morning to rip things out and make a suitable example program for posting. Actually, the performance profile does seem different (for lower loads, the semaphore solution seems more efficient), but the performance limits seem much the same between the single socketpair and semaphore versions when I starts using 16-20 worker processes. It's possible that I'm doing something which makes the system intrinsically top out at a given point - tomorrow I'm going to attempt to make the minimal changes necessary to adapt multiple socketpairs to the existing system, in the hope that either the multiple socketpair version is faster in context, or it's slower living in this set of code than in the original prototype. Thanks, scott To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Tue Jan 25 1:43:56 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from wyvern.cc.kogakuin.ac.jp (wyvern.cc.kogakuin.ac.jp [133.80.184.10]) by hub.freebsd.org (Postfix) with ESMTP id 9EF5614EEA; Tue, 25 Jan 2000 01:43:52 -0800 (PST) (envelope-from nyan@wyvern.cc.kogakuin.ac.jp) Received: from localhost (localhost [127.0.0.1]) by wyvern.cc.kogakuin.ac.jp (8.9.3+3.2W/3.7W) with ESMTP id SAA54301; Tue, 25 Jan 2000 18:43:51 +0900 (JST) To: luoqi@watermarkgroup.com Cc: kato@ganko.eps.nagoya-u.ac.jp, FreeBSD-current@FreeBSD.ORG, FreeBSD-hackers@FreeBSD.ORG, FreeBSD98-hackers@jp.freebsd.org, nyan@jp.freebsd.org Subject: Re: indirection in bus space In-Reply-To: <200001250601.BAA17157@lor.watermarkgroup.com> References: <200001250601.BAA17157@lor.watermarkgroup.com> From: Takahashi Yoshihiro X-Mailer: Mew version 1.94.1 on Emacs 19.34 / Mule 2.3 (SUETSUMUHANA) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-Id: <20000125184350C.nyan@wyvern.cc.kogakuin.ac.jp> Date: Tue, 25 Jan 2000 18:43:50 +0900 (JST) X-Dispatcher: imput version 990905(IM130) Lines: 48 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG In article <200001250601.BAA17157@lor.watermarkgroup.com> Luoqi Chen writes: > > I think it is difficult to implement such conversion because: > > > > - Not only bus space stuff also resource manager stuff need to > > perform such conversion. > > Why? Both bus_space_handle_t and bus_space_tag_t are supposed to be > opaque types. Resource manager needs not know the implementation details. In isa_alloc_resourcev() and isa_load_resourcev() (both new functions), it needs to store allocated resources and I/O table in bus_space_handle_pc98. > We could create a new resource type SYS_RES_IOPORT_ARRAY, and intercept > it in all isa_*_resoruce() methods. In isa_alloc_resource(), we malloc and > return a fake resource record, in which we store I386_BUS_PIO_IND as > bus tag and address of bus_space_handle_pc98 as bus handle. And in > isa_release_resource(), we first release the underlying resources stored > in the bus_space_handle_pc98 record and then free the fake resource record > itself. It should be safe as long as we don't manipulate this resource by > direct resource manager calls, which we shouldn't do anyway. > (or we should implement it at the root bus level, if pci devices in > pc98 systems also use discrete port addresses). We can't call bus_alloc_resource() directly from device drivers. Because bus_alloc_resource() is defined as the following, it can't deliver I/O table. struct resource * bus_alloc_resource(device_t dev, int type, int *rid, u_long start, u_long end, u_long count, u_int flags); If it conversion from 'bus_addr_t *' to 'u_long' and deliver to the fourth argument, we can use bus_alloc_resource(). But, it needs to perform conversions in each drivers using indirect resources. Then, only isa_alloc_resourcev() is not enough to support NS8390 based network cards and PnP devices which require to use I386_BUS_PIO_IND. So, I separate into isa_alloc_resourcev() to allocate resources and isa_load_resourcev() to store I/O table. IMHO, as IBM PC/AT and NEC PC-98 is different architecture, the bus space stuff should be implemented to different files. --- Takahashi Yoshihiro / nyan@FreeBSD.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Tue Jan 25 4:53:32 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from gidora.zeta.org.au (gidora.zeta.org.au [203.26.10.25]) by hub.freebsd.org (Postfix) with SMTP id 4EF1114DF8 for ; Tue, 25 Jan 2000 04:53:28 -0800 (PST) (envelope-from bde@zeta.org.au) Received: (qmail 1460 invoked from network); 25 Jan 2000 12:53:25 -0000 Received: from bde.zeta.org.au (203.2.228.102) by gidora.zeta.org.au with SMTP; 25 Jan 2000 12:53:25 -0000 Date: Tue, 25 Jan 2000 23:53:23 +1100 (EST) From: Bruce Evans X-Sender: bde@alphplex.bde.org To: "Yevmenkin, Maksim N, CSCIO" Cc: "'freebsd-current@freebsd.org'" , "'freebsd-hackers@freebsd.org'" Subject: Re: BPF bug or not? In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Mon, 24 Jan 2000, Yevmenkin, Maksim N, CSCIO wrote: > All, > > I've just found that read from /dev/bpfX never return EAGAIN/EWOULDBLOCK. > It means that when you do a non blocking read and there is no data you will > always get 0. > > Does it suppose work this way? I think it is a bug. Perhaps applications depend on it. Untested fix: diff -c2 bpf.c~ bpf.c *** bpf.c~ Sun Jan 16 15:50:59 2000 --- bpf.c Tue Jan 25 23:44:32 2000 *************** *** 502,506 **** if (d->bd_slen == 0) { splx(s); ! return (0); } ROTATE_BUFFERS(d); --- 504,508 ---- if (d->bd_slen == 0) { splx(s); ! return (EWOULDBLOCK); } ROTATE_BUFFERS(d); Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Tue Jan 25 5:30:13 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from pr.infosec.ru (pr.infosec.ru [194.135.141.98]) by hub.freebsd.org (Postfix) with ESMTP id 483521518C for ; Tue, 25 Jan 2000 05:30:07 -0800 (PST) (envelope-from blaze@infosec.ru) Received: by NT_SERVER with Internet Mail Service (5.5.2650.21) id ; Tue, 25 Jan 2000 16:30:55 +0300 Message-ID: <31301C81A549D311B46C006008610325125602@NT_SERVER> From: "Andrew G. Sverdlichenko" To: "'freebsd-hackers@freebsd.org'" Subject: drivers Date: Tue, 25 Jan 2000 16:30:14 +0300 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2650.21) Content-Type: text/plain; charset="koi8-r" Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Hello. If we have a character device driver with and more than one open handles for it, can read() and ioctl() choose which one is used? To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Tue Jan 25 8:14:50 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from moffetimages.com (alar.scruz.predictive.com [207.251.1.130]) by hub.freebsd.org (Postfix) with ESMTP id 0C3ED150A4 for ; Tue, 25 Jan 2000 08:14:33 -0800 (PST) (envelope-from brianm@moffetimages.com) Received: (from brianm@localhost) by moffetimages.com (8.9.3/8.9.3) id IAA41422 for freebsd-hackers@FreeBSD.ORG; Tue, 25 Jan 2000 08:16:48 -0800 (PST) (envelope-from brianm) Date: Tue, 25 Jan 2000 08:16:48 -0800 (PST) From: "Brian D. Moffet" Message-Id: <200001251616.IAA41422@moffetimages.com> To: freebsd-hackers@FreeBSD.ORG Subject: Re: Learning the FreeBSD Kernel In-Reply-To: <20000124123920.F2643@mojave.worldwide.lemis.com> Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG I have to agree here, one of the major issues in writing device drivers, which I used to do for a living, is getting proper documentation for the devices themselves. For something like video cards, it's even worse because the cards change so rapidly. I can imagine that there will be some issues with hardware vendors (especially large ones) not wanting to give out their doc to someone who is claiming to write a driver for FreeBSD. It's probably almost as bad for Linux. I know it was pretty difficult at times for a company like SCO (where I wrote drivers for a living, in case anyone couldn't figure that out :-) As I get into writing drivers and other bits of code for FreeBSD, my past will keep me from releasing the code undocumented in some same fashion, and hopefully some reasonable user documentation, and yes that takes time. Thankfully for me, I have seen both the SvR? driver model as well as the BSD model, so I think I'll be able to pull it off... Lord knows it took me long enough to figure out what the kernel.conf parsing was like :-) Maybe I'll take it on myself to look into documenting various stuff, who knows.. Yeah, when I no longer work for a living... Brian Moffet > There are two almost completely separate issues in writing drivers: > > 1. Writing the code to deal with the device. Having good vendor > documentation helps here. > > 2. Fitting this code into the BSD framework. Having good OS > documentation helps here. > > I can't agree with Mike Smith that reading the code is adequate. It > certainly doesn't apply to newcomers, but it doesn't even apply to > seasoned hackers like Mike.... To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Tue Jan 25 8:26:27 2000 Delivered-To: freebsd-hackers@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 608) id DAA4914E81; Tue, 25 Jan 2000 08:26:25 -0800 (PST) From: "Jonathan M. Bresler" To: dillon@apollo.backplane.com Cc: wes@softweyr.com, dillon@apollo.backplane.com, hackers@FreeBSD.ORG In-reply-to: <200001242106.NAA92130@apollo.backplane.com> (message from Matthew Dillon on Mon, 24 Jan 2000 13:06:42 -0800 (PST)) Subject: Re: kern/13644 Message-Id: <20000125162625.DAA4914E81@hub.freebsd.org> Date: Tue, 25 Jan 2000 08:26:25 -0800 (PST) Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > > Ah, indeed! nul/NUL == ascii. 'nil' should removed from our vocabulary. > NIL or nil, is the nil pointer from lisp. lisp is often the first time many people start to understans that data can drive programs. this is a good thing. jmb To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Tue Jan 25 8:48:21 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from bomber.avantgo.com (ws1.avantgo.com [207.214.200.194]) by hub.freebsd.org (Postfix) with ESMTP id EF77B14EB8 for ; Tue, 25 Jan 2000 08:48:12 -0800 (PST) (envelope-from scott@avantgo.com) Received: from river ([10.0.128.30]) by bomber.avantgo.com (Netscape Messaging Server 3.5) with SMTP id 214; Tue, 25 Jan 2000 08:44:12 -0800 Message-ID: <0c2101bf6753$cf37f280$1e80000a@avantgo.com> From: "Scott Hess" To: "Scott Hess" , "Matthew Dillon" Cc: References: <01b601bf6696$60701930$1e80000a@avantgo.com> <200001241939.LAA91219@apollo.backplane.com> <0be801bf6715$601423d0$1e80000a@avantgo.com> Subject: Re: Performance issue with rfork() and single socketpairs versus multiple socketpairs. Date: Tue, 25 Jan 2000 08:47:03 -0800 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_NextPart_000_0C1E_01BF6710.C075B360" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.00.2919.6600 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG This is a multi-part message in MIME format. ------=_NextPart_000_0C1E_01BF6710.C075B360 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit "Scott Hess" wrote: > "Matthew Dillon" wrote: > > :Unfortunately, I've found that having a group of processes reading > > :from a group of socketpairs has better performance than having > > :them all read from a single socketpair. I've been unable to > > :determine why. > > > > The problem is that when you have N processes waiting on a single > > socket and you write to the socket, all N processes will wake up even > > though only one will get the data you wrote. > > > As an alternative to socket pairs, I would consider using SysV shared > > memory and SysV semaphores. > > OK, so let's say I did spend some time implementing it in terms of semget() > and semop(). Would you be totally apalled if the performance turned out to > be about the same as using a single socketpair? >Unfortunately, I'll have to wait until tomorrow morning >to rip things out and make a suitable example program for posting. Find attached a new version of commtest.c which uses semaphores. I've also placed a copy at http://www.doubleu.com/~scott/commtest.c. The performance is identical enough that I'm guessing that semaphores must suffer from the exact same problems as the single socketpair version. Thanks, scott ------=_NextPart_000_0C1E_01BF6710.C075B360 Content-Type: application/octet-stream; name="commtest.c" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="commtest.c" // commtest.c=0A= // gcc -Wall -g -o commtest commtest.c=0A= //=0A= // Test performance differences for multiple socketpairs versus a=0A= // single shared socketpair versus SYSV semaphores.=0A= #include =0A= #include =0A= #include =0A= #include =0A= #include =0A= #include =0A= #include =0A= #include =0A= #include =0A= #include =0A= =0A= typedef unsigned char request_t;=0A= =0A= #define CLIENT_EXIT ((request_t)(~0))=0A= #define CLIENT_COUNT 32=0A= #define REQUEST_TARGET 10000=0A= =0A= int client_fd_count=3D0;=0A= int client_fds[ CLIENT_COUNT];=0A= int server_fds[ CLIENT_COUNT];=0A= =0A= /* Reflect requests. */=0A= void socket_client( int fd)=0A= {=0A= request_t request;=0A= int rc;=0A= =0A= while( 1) {=0A= if( (rc=3Dread( fd, &request, sizeof( request)))=3D=3D-1) {=0A= perror( "client read");=0A= _exit( 1);=0A= } else if( rc-1) {=0A= sem=3Dsemget( IPC_PRIVATE, sem_count, SEM_R|SEM_A);=0A= if( sem=3D=3D-1) {=0A= perror( "semget");=0A= exit( 1);=0A= }=0A= }=0A= =0A= maxfd=3D0;=0A= FD_ZERO( &default_fdset);=0A= for( ii=3D0; iimaxfd) {=0A= maxfd=3Dclient_fds[ ii];=0A= }=0A= }=0A= =0A= /* Spin off children to process requests. */=0A= for( ii=3D0; ii; Tue, 25 Jan 2000 09:10:14 -0800 (PST) (envelope-from brianm@moffetimages.com) Received: (from brianm@localhost) by moffetimages.com (8.9.3/8.9.3) id JAA41726 for freebsd-hackers@freebsd.org; Tue, 25 Jan 2000 09:12:31 -0800 (PST) (envelope-from brianm) Date: Tue, 25 Jan 2000 09:12:31 -0800 (PST) From: "Brian D. Moffet" Message-Id: <200001251712.JAA41726@moffetimages.com> To: freebsd-hackers@freebsd.org Subject: Re: Performance issue with rfork() and single socketpairs versus multiple socketpairs. In-Reply-To: <200001250124.BAA36765@hak.lan.Awfulhak.org> Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Okay, stupid question. socketpair returns 2 sockets which according to the man page are "indistinguishable". Does this mean that you can read and write to either socket pair? pipe(2) returns 2 file descriptors, one of which is a read and one of which is a write fd. The other end flips these around, and data is not mixed up that way. One program cannot read and write to the same file descriptor, with the expectation that the two ends of the pipe will be able to properly communicate. Will socketpair allow one program to read and write to the same file descriptor (what I would call real "bi-directional")... Like you can do with a normal old socket? Thanks Brian > > Use 'pipe(2)' rahter than 'socketpair(2)' as both are bidirectional and > > pipe is a LOT faster. > > Although pipe(2)'s bi-directional capabilities are not standard (I've > been stung by this in the past :-() To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Tue Jan 25 9:26:22 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from apollo.backplane.com (apollo.backplane.com [216.240.41.2]) by hub.freebsd.org (Postfix) with ESMTP id 559A514D33; Tue, 25 Jan 2000 09:26:20 -0800 (PST) (envelope-from dillon@apollo.backplane.com) Received: (from dillon@localhost) by apollo.backplane.com (8.9.3/8.9.1) id JAA04722; Tue, 25 Jan 2000 09:26:19 -0800 (PST) (envelope-from dillon) Date: Tue, 25 Jan 2000 09:26:19 -0800 (PST) From: Matthew Dillon Message-Id: <200001251726.JAA04722@apollo.backplane.com> To: "Jonathan M. Bresler" Cc: wes@softweyr.com, hackers@FreeBSD.ORG Subject: Re: kern/13644 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG :> Ah, indeed! nul/NUL == ascii. 'nil' should removed from our vocabulary. :> : : NIL or nil, is the nil pointer from lisp. lisp is often the :first time many people start to understans that data can drive :programs. this is a good thing. : :jmb I don't know anybody under the age of 30 who knows lisp. And, frankly, since both the system and virtually all of its support programs are written in C, C terminology is going to be considerably more effective then lisp or pascal terminology. -Matt Matthew Dillon To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Tue Jan 25 9:52:55 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from apollo.backplane.com (apollo.backplane.com [216.240.41.2]) by hub.freebsd.org (Postfix) with ESMTP id BC4111526E for ; Tue, 25 Jan 2000 09:52:32 -0800 (PST) (envelope-from dillon@apollo.backplane.com) Received: (from dillon@localhost) by apollo.backplane.com (8.9.3/8.9.1) id JAA04953; Tue, 25 Jan 2000 09:52:31 -0800 (PST) (envelope-from dillon) Date: Tue, 25 Jan 2000 09:52:31 -0800 (PST) From: Matthew Dillon Message-Id: <200001251752.JAA04953@apollo.backplane.com> To: "Scott Hess" Cc: Subject: Re: Performance issue with rfork() and single socketpairs versus multiple socketpairs. References: <01b601bf6696$60701930$1e80000a@avantgo.com> <200001241939.LAA91219@apollo.backplane.com> <0be801bf6715$601423d0$1e80000a@avantgo.com> Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG :OK, so let's say I did spend some time implementing it in terms of semget() :and semop(). Would you be totally apalled if the performance turned out to :be about the same as using a single socketpair? Do you have a very strong :feeling that it should be significantly better. [Again, under :3.4-release.] I don't think I've done anything egregious, but things don't :seem much better. Unfortunately, I'll have to wait until tomorrow morning :to rip things out and make a suitable example program for posting. : :Actually, the performance profile does seem different (for lower loads, the :semaphore solution seems more efficient), but the performance limits seem :much the same between the single socketpair and semaphore versions when I :starts using 16-20 worker processes. It's possible that I'm doing :.. : :Thanks, :scott Well, when all else fails --- go back to individual pipes. What else could be tried... you could try surrounding the read() with an flock() pair. I don't know if flock() uses the more optimal wakeup code or not. -Matt Matthew Dillon To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Tue Jan 25 9:54:45 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from smtp01.wxs.nl (smtp01.wxs.nl [195.121.6.61]) by hub.freebsd.org (Postfix) with ESMTP id B8161152E0 for ; Tue, 25 Jan 2000 09:54:28 -0800 (PST) (envelope-from asmodai@wxs.nl) Received: from daemon.ninth-circle.org ([195.121.196.192]) by smtp01.wxs.nl (Netscape Messaging Server 3.61) with ESMTP id AAA17CF; Tue, 25 Jan 2000 18:54:25 +0100 Received: (from asmodai@localhost) by daemon.ninth-circle.org (8.9.3/8.9.3) id SAA06478; Tue, 25 Jan 2000 18:54:15 +0100 (CET) (envelope-from asmodai) Date: Tue, 25 Jan 2000 18:54:15 +0100 From: Jeroen Ruigrok/Asmodai To: =?iso-8859-1?Q?Joachim_J=E4ckel?= Cc: nox@jelal.kn-bremen.de, "freebsd-hackers@freebsd.org" Subject: Re: How to write a device-driver? Message-ID: <20000125185415.C290@daemon.ninth-circle.org> References: <388B8724.D3B9707C@d.kamp.net> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Mailer: Mutt 1.0i In-Reply-To: <388B8724.D3B9707C@d.kamp.net>; from Joachim.Jaeckel@d.kamp.net on Sun, Jan 23, 2000 at 11:56:36PM +0100 Organisation: Ninth-Circle Enterprises Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG -On [20000124 00:00], Joachim Jäckel (Joachim.Jaeckel@d.kamp.net) wrote: > >Here´s some information to the card I'd like to support: > >It's a Miro DC10+ Video Grabber Card for Non-Linear Video-Editing. >It uses a Siemens SAA7110, a Zoran 36060+36067 and a ADV???? chip to en- >and decode the video-information. I got the specifications for the chips >from Siemens and Zoran's Web-Sites and a first driver-skeleton was >generated through the /usr/share/examples/drivers/make_pci... script for >me. Did you contact Miro? And /usr/share/examples/drivers/make_pci is pre 4.0. >Currently I get a boot-message from my kernel, that he has found the >card.(I read the pci_id and send a text-message :-) That's a good start. >Additionally I found a linux-driver for this card (an early one...) but >it is not fully compatible with the documentation, I got. It can make certain things clear. >Maybe you would allow me one question? (To get a little faster to the >information than browsing through the source.) Asking questions is free. =) >But how get's the zoran36067_regs structure the information from the >chip? If you were using newbus (on FreeBSD 4.0) I'd say bus_space_read_#() to get the info in the registers our of your chip. >If I change the content of the structure, which function would change >the registers on the chip accordingly? (Or is it done through the call >of pci_map_mem? And is everything I change to the structure >automatically changed on the card?) I have to show my lack of 2.2.x and 3.x driver programming. I am spoiled due to 4.x. I think someone else needs to answer this. Juergen appears to know 3.x driver programming. >Sorry, if these questions are real dumb ones! Not at all. -- Jeroen Ruigrok vd W/Asmodai asmodai@[wxs.nl|bart.nl|freebsd.org] Documentation nutter/B-rated Coder BSD: Technical excellence at its best The BSD Programmer's Documentation Project How the gods kill... To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Tue Jan 25 10:28:42 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from ns1x.pvt.net (ns.pvt.net [194.149.105.18]) by hub.freebsd.org (Postfix) with ESMTP id BEC4F15382 for ; Tue, 25 Jan 2000 10:26:00 -0800 (PST) (envelope-from milon.papezik@ceskymobil.cz) Received: from ceskymobil.cz (nat.ceskymobil.cz [194.149.122.193]) by ns1x.pvt.net (8.9.3/8.9.3) with ESMTP id TAA05299 for ; Tue, 25 Jan 2000 19:25:49 +0100 Message-ID: <388DEA5A.6A400788@ceskymobil.cz> Date: Tue, 25 Jan 2000 19:24:26 +0100 From: Milon Papezik X-Mailer: Mozilla 4.7 [en] (X11; I; FreeBSD 3.4-RELEASE i386) X-Accept-Language: cs, en MIME-Version: 1.0 To: freebsd-hackers@freebsd.org Subject: 3.4R - missing ARP response? Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Hi all, I have a problem with 3.4-RELEASE on Compaq Deskpro machines with new Fast Ethernet cards with i82559 chip. I installed them from 3.4-R ISO image without problems noticed (ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/ISO-IMAGES/3.4-install.iso). I can use networking with Cisco routers and Sun (Solaris) macines, BUT I CAN'T GET from one FBSD to 2nd FBSD. I found that the machine initiating connection does not get ARP response (according to tcpdump and according to listing ARP table). Were there recently some changes to ARP/VLAN/fxp code which may affect this? What kind of details should I provide? Does someone have the same problem? Thanks in advance. Milon -- milon.papezik@ceskymobil.cz To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Tue Jan 25 10:53: 0 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from overcee.netplex.com.au (overcee.netplex.com.au [202.12.86.7]) by hub.freebsd.org (Postfix) with ESMTP id C08971529D for ; Tue, 25 Jan 2000 10:52:50 -0800 (PST) (envelope-from peter@netplex.com.au) Received: from netplex.com.au (localhost [127.0.0.1]) by overcee.netplex.com.au (Postfix) with ESMTP id 422721C03; Wed, 26 Jan 2000 02:52:48 +0800 (WST) (envelope-from peter@netplex.com.au) X-Mailer: exmh version 2.1.1 10/15/1999 To: "Brian D. Moffet" Cc: freebsd-hackers@freebsd.org Subject: Re: Performance issue with rfork() and single socketpairs versus multiple socketpairs. In-Reply-To: Message from "Brian D. Moffet" of "Tue, 25 Jan 2000 09:12:31 PST." <200001251712.JAA41726@moffetimages.com> Date: Wed, 26 Jan 2000 02:52:48 +0800 From: Peter Wemm Message-Id: <20000125185248.422721C03@overcee.netplex.com.au> Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG "Brian D. Moffet" wrote: > Okay, stupid question. socketpair returns 2 sockets which according to > the man page are "indistinguishable". Does this mean that you can read and > write to either socket pair? Yep, you can write to either end and it will come out the other end. > pipe(2) returns 2 file descriptors, one of which is a read and one of > which is a write fd. The other end flips these around, and data is not > mixed up that way. One program cannot read and write to the same > file descriptor, with the expectation that the two ends of the pipe will > be able to properly communicate. pipe(2) works the same way as socketpair on FreeBSD. As it does on SVR4 boxes (since 1989, including SCO Unixware and I believe Solaris). > Will socketpair allow one program to read and write to the same file > descriptor (what I would call real "bi-directional")... Like you can do > with a normal old socket? Yes. socketpair(2) and pipe(2) are fully bidirectional. pipe(2) happens to be a lot faster than the sockets based ones. > Thanks > Brian > > > > Use 'pipe(2)' rahter than 'socketpair(2)' as both are bidirectional and > > > pipe is a LOT faster. > > > > Although pipe(2)'s bi-directional capabilities are not standard (I've > > been stung by this in the past :-() > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-hackers" in the body of the message > > Cheers, -Peter -- Peter Wemm - peter@FreeBSD.org; peter@yahoo-inc.com; peter@netplex.com.au "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-hackers" in the body of the message From owner-freebsd-hackers Tue Jan 25 11:40:49 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from fw.wintelcom.net (ns1.wintelcom.net [209.1.153.20]) by hub.freebsd.org (Postfix) with ESMTP id 8C1A31534E for ; Tue, 25 Jan 2000 11:40:47 -0800 (PST) (envelope-from bright@fw.wintelcom.net) Received: (from bright@localhost) by fw.wintelcom.net (8.9.3/8.9.3) id MAA11812; Tue, 25 Jan 2000 12:05:07 -0800 (PST) Date: Tue, 25 Jan 2000 12:05:07 -0800 From: Alfred Perlstein To: Matthew Dillon Cc: Scott Hess , freebsd-hackers@FreeBSD.ORG Subject: Re: Performance issue with rfork() and single socketpairs versus multiple socketpairs. Message-ID: <20000125120506.W26520@fw.wintelcom.net> References: <01b601bf6696$60701930$1e80000a@avantgo.com> <200001241939.LAA91219@apollo.backplane.com> <0be801bf6715$601423d0$1e80000a@avantgo.com> <200001251752.JAA04953@apollo.backplane.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0.1i In-Reply-To: <200001251752.JAA04953@apollo.backplane.com>; from dillon@apollo.backplane.com on Tue, Jan 25, 2000 at 09:52:31AM -0800 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG * Matthew Dillon [000125 11:51] wrote: > > :OK, so let's say I did spend some time implementing it in terms of semget() > :and semop(). Would you be totally apalled if the performance turned out to > :be about the same as using a single socketpair? Do you have a very strong > :feeling that it should be significantly better. [Again, under > :3.4-release.] I don't think I've done anything egregious, but things don't > :seem much better. Unfortunately, I'll have to wait until tomorrow morning > :to rip things out and make a suitable example program for posting. > : > :Actually, the performance profile does seem different (for lower loads, the > :semaphore solution seems more efficient), but the performance limits seem > :much the same between the single socketpair and semaphore versions when I > :starts using 16-20 worker processes. It's possible that I'm doing > :.. > : > :Thanks, > :scott > > Well, when all else fails --- go back to individual pipes. > > What else could be tried... you could try surrounding the read() > with an flock() pair. I don't know if flock() uses the more optimal > wakeup code or not. It doesn't, it wakes all processes blocking on the lock, the flock case could be optimized but doesn't seem to be. I think you probably want to experiment with pools attached to the pipe, and you ought to be using pipe rather than socketpair. Meaning have a group of children share a pipe, but not more than N, where N is where you start to see performance problems. -Alfred To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Tue Jan 25 13:48:32 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from bomber.avantgo.com (ws1.avantgo.com [207.214.200.194]) by hub.freebsd.org (Postfix) with ESMTP id C0BFD1539E for ; Tue, 25 Jan 2000 13:48:02 -0800 (PST) (envelope-from scott@avantgo.com) Received: from river ([10.0.128.30]) by bomber.avantgo.com (Netscape Messaging Server 3.5) with SMTP id 213; Tue, 25 Jan 2000 13:44:05 -0800 Message-ID: <0f0f01bf677d$b307a9a0$1e80000a@avantgo.com> From: "Scott Hess" To: "Alfred Perlstein" Cc: References: <01b601bf6696$60701930$1e80000a@avantgo.com> <200001241939.LAA91219@apollo.backplane.com> <0be801bf6715$601423d0$1e80000a@avantgo.com> <200001251752.JAA04953@apollo.backplane.com> <20000125120506.W26520@fw.wintelcom.net> Subject: Re: Performance issue with rfork() and single socketpairs versus multiple socketpairs. Date: Tue, 25 Jan 2000 13:46:56 -0800 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 5.00.2919.6600 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG "Alfred Perlstein" wrote: > I think you probably want to experiment with pools attached to the > pipe, and you ought to be using pipe rather than socketpair. My tests indicate that pipe performance in this case is identical to socketpair performance. Perhaps because I'm sending so little data over the wire (in the real thing, most of the data is in shared memory, the pipes just provide the queuing). > Meaning > have a group of children share a pipe, but not more than N, where N > is where you start to see performance problems. Actually, the hit comes rather quickly, 8 procs per pipe causes half the hit, even 4 is substantial. In any case, once I've gone away from having one pipe, I've already lost the advantage and might as well have a pipe per worker. I'd much rather manage one pipe than 32 pipes, but managing 4 pipes versus 32 pipes is less compelling. Thanks, scott To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Tue Jan 25 14:49:19 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from cr31617-a.lndn1.on.wave.home.com (cr31617-a.lndn1.on.wave.home.com [24.112.227.163]) by hub.freebsd.org (Postfix) with ESMTP id E0CFE15548 for ; Tue, 25 Jan 2000 14:48:02 -0800 (PST) (envelope-from jbailie@cr31617-a.lndn1.on.wave.home.com) Received: (from jbailie@localhost) by cr31617-a.lndn1.on.wave.home.com (8.9.3/8.9.3) id RAA03784; Tue, 25 Jan 2000 17:47:28 -0500 (EST) (envelope-from jbailie) Date: Tue, 25 Jan 2000 17:47:28 -0500 From: James Bailie To: "Brian D. Moffet" Cc: freebsd-hackers@freeBSD.org Subject: Re: Performance issue with rfork() and single socketpairs versus multiple socketpairs. Message-ID: <20000125174727.A3649@cr31617-a.lndn1.on.wave.home.co> References: <200001250124.BAA36765@hak.lan.Awfulhak.org> <200001251712.JAA41726@moffetimages.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0.1i In-Reply-To: <200001251712.JAA41726@moffetimages.com>; from brianm@moffetimages.com on Tue, Jan 25, 2000 at 09:12:31AM -0800 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Tue, Jan 25, 2000 at 09:12:31AM -0800, Brian D. Moffet wrote: > Okay, stupid question. socketpair returns 2 sockets which according to > the man page are "indistinguishable". Does this mean that you can read and > write to either socket pair? Yes sir. > pipe(2) returns 2 file descriptors, one of which is a read and one of > which is a write fd. The other end flips these around, and data is not > mixed up that way. No, with a so-called bi-directional pipe, both ends are readable and writable, but bidirectional pipes are only found on certain systems. A traditional UNIX pipe is half duplex -- one way only. It's better to use socketpair() if you want full-duplex behaviour. Systems that have socketpair() can implement pipes using socketpair internally, so bidirectional pipes are usually just crippled UNIX-domain sockets in disguise. > Will socketpair allow one program to read and write to the same file > descriptor (what I would call real "bi-directional")... Like you can do > with a normal old socket? Yes. -- James Bailie http://members.home.net/jazzturk/main.html To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Tue Jan 25 16: 4: 6 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from arutam.inch.com (ns.inch.com [207.240.140.101]) by hub.freebsd.org (Postfix) with ESMTP id 2A5851538F for ; Tue, 25 Jan 2000 16:03:56 -0800 (PST) (envelope-from omar@inch.com) Received: from shell.inch.com (inch.com [207.240.140.100]) by arutam.inch.com (8.9.3/8.9.3/UTIL-INCH-2.1.0) with ESMTP id TAA12473; Tue, 25 Jan 2000 19:03:54 -0500 (EST) Received: by shell.inch.com (8.8.8) id TAA08156; Tue, 25 Jan 2000 19:03:54 -0500 (EST) Date: Tue, 25 Jan 2000 19:03:54 -0500 From: Omar Thameen To: Dan Nelson Cc: Charles Sprickman , freebsd-hackers@FreeBSD.ORG, noc@inch.com Subject: Re: high load, nothing happening? (LONG) Message-ID: <20000125190354.E7246@shell.inch.com> References: <20000118171034.A4871@dan.emsphone.com> <20000119094843.A65970@dan.emsphone.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.95.1i In-Reply-To: <20000119094843.A65970@dan.emsphone.com>; from Dan Nelson on Wed, Jan 19, 2000 at 09:48:43AM -0600 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Wed, Jan 19, 2000 at 09:48:43AM -0600, Dan Nelson wrote: > In the last episode (Jan 19), Charles Sprickman said: > > > More importantly, this machine is just sitting here waiting to be put > > in production, so I'm more than willing to play around with it like > > this while I still can... Thanks for the ongoing help, I've never > > touched a debugger before, and this has been educational so far. I'm > > coming off a week or two of playing with NT machines, and it's nice > > to at least be able to gather some info about what the machine is > > doing with OS-supplied tools, which is something I found very > > difficult to do in NT GUI-land. > > Have you tried moving the apache binary from your running server over > to this one and see if the load goes down? I mentioned before that it > looked like you were running two different versions of apache. We did, and there was no difference. To follow-up, the server is in production and is behaving well. The load ranges from 0.08 to 3, and does not have any responsiveness issues. One theory that was suggested to us was that 'top' itself was the culprit. That is, there were events happening precisely at the same time that top doing its sampling for data, giving a higher load calculation. Since the CPU utilization was very low and no other benchmarks were problematic, it seems like a good assessment. -- Omar Thameen Systems Administration The Internet Channel omar@inch.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Tue Jan 25 16:55:31 2000 Delivered-To: freebsd-hackers@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 608) id 7DC0314BCF; Tue, 25 Jan 2000 16:55:28 -0800 (PST) From: "Jonathan M. Bresler" To: dillon@apollo.backplane.com Cc: wes@softweyr.com, hackers@FreeBSD.ORG In-reply-to: <200001251726.JAA04722@apollo.backplane.com> (message from Matthew Dillon on Tue, 25 Jan 2000 09:26:19 -0800 (PST)) Subject: Re: kern/13644 Message-Id: <20000126005528.7DC0314BCF@hub.freebsd.org> Date: Tue, 25 Jan 2000 16:55:28 -0800 (PST) Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > Matt Dillon wrote: > > :> Ah, indeed! nul/NUL == ascii. 'nil' should removed from our vocabulary. > :> Jonathan Bresler wrote: > : > : NIL or nil, is the nil pointer from lisp. lisp is often the > :first time many people start to understans that data can drive > :programs. this is a good thing. > : > :jmb > > I don't know anybody under the age of 30 who knows lisp. And, frankly, > since both the system and virtually all of its support programs are written > in C, C terminology is going to be considerably more effective then lisp > or pascal terminology. There are a number of people, under 30, that write code using emacs and create their own macros in lisp. The terminology is very simple. Anyone that can cope with either vi or emacs can learn: NUL: an ascii character (0x00) NIL: a pointer at the end of the line NULL pointer: used in C to refer to NIL. not to be confused with NUL. jmb To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Wed Jan 26 1:15:55 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from pogo.caustic.org (pogo.caustic.org [208.44.193.69]) by hub.freebsd.org (Postfix) with ESMTP id 2535715224 for ; Wed, 26 Jan 2000 01:15:47 -0800 (PST) (envelope-from jan@caustic.org) Received: from localhost (jan@localhost) by pogo.caustic.org (8.9.3/ignatz) with ESMTP id BAA04527 for ; Wed, 26 Jan 2000 01:16:52 -0800 (PST) Date: Wed, 26 Jan 2000 01:16:52 -0800 (PST) From: "f.johan.beisser" To: freebsd-hackers@freebsd.org Subject: compiler errors (fwd) Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG i just got this from a friend of mine.. can anyone help him? -- jan +-----// f. johan beisser //------------------------------+ email: jan[at]caustic.org web: http://www.caustic.org/~jan "knowledge is power. power corrupts. study hard, be evil." ---------- Forwarded message ---------- Date: Wed, 26 Jan 2000 01:13:41 -0800 From: Chris Doherty To: jan@caustic.org Subject: compiler errors ok, here's the scenario. I didn't install any ports until I went to do the `make buildworld`, when I installed cvsup to get the source updates. full binary+sources install from the 14 Jan 2000 snapshot AMD K6-2 450MHz (corroborated by dmesg output) c. 8 gig Seagate IDE HD 64 megs RAM cheap motherboard with everything built in, and one PCI slot here is the final lines of output from trying to compile the GENERIC kernel (doing a `/usr/sbin/config GENERIC`): --------------- yydebug: state 113, reading 257 (IDENTIFIER) cc -c -O -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -fformat-extensions -ansi -nostdinc -I- -I. -I../.. -I../../../include -D_KERNEL -include opt_global.h -elf -mpreferred-stack-boundary=2 ../../netinet/igmp.c yydebug: state 56, reading 257 (IDENTIFIER) cc -c -O -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -fformat-extensions -ansi -nostdinc -I- -I. -I../.. -I../../../include -D_KERNEL -include opt_global.h -elf -mpreferred-stack-boundary=2 ../../netinet/in.c cc: Internal compiler error: program cc1 got fatal signal 11 *** Error code 1 --------------- and, after cvsupping the latest source changes (26 Jan 2000), here's how `make buildworld` ended: --------------- cc -O -pipe -D_GNU_SOURCE -I- -I. -I/usr/src/gnu/usr.bin/binutils/libiberty -I/usr/src/gnu/usr.bin/binutils/libiberty/../libbfd/i386 -I/usr/src/gnu/usr.bin/binutils/libiberty/../../../../contrib/binutils/include - I/usr/obj/usr/src/i386/usr/include -c /usr/src/gnu/usr.bin/binutils/libiberty/../../../../contrib/binutils/libiberty/c plus-dem.c -o cplus-dem.o cc: Internal compiler error: program cc1 got fatal signal 11 *** Error code 1 Stop in /usr/src/gnu/usr.bin/binutils/libiberty. *** Error code 1 Stop in /usr/src/gnu/usr.bin/binutils. *** Error code 1 Stop in /usr/src. *** Error code 1 Stop in /usr/src. *** Error code 1 Stop in /usr/src. frodo# {standard input}: Assembler messages: {standard input}:4: Error: no such 386 instruction: `state' {standard input}:2315: Warning: end of file not at end of a line; newline inserted --------------- ------------------------------- Chris Doherty cdoherty@skidmore.edu If you cannot find the truth right where you are, where else do you expect to find it? -- Dogen It is from moments of confusion that we develop moments of clarity. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Wed Jan 26 1:25:25 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from freebsd.dk (freebsd.dk [212.242.42.178]) by hub.freebsd.org (Postfix) with ESMTP id 2C44814EFE for ; Wed, 26 Jan 2000 01:25:23 -0800 (PST) (envelope-from sos@freebsd.dk) Received: (from sos@localhost) by freebsd.dk (8.9.3/8.9.1) id KAA17568; Wed, 26 Jan 2000 10:25:18 +0100 (CET) (envelope-from sos) From: Soren Schmidt Message-Id: <200001260925.KAA17568@freebsd.dk> Subject: Re: compiler errors (fwd) In-Reply-To: from "f.johan.beisser" at "Jan 26, 2000 01:16:52 am" To: jan@caustic.org (f.johan.beisser) Date: Wed, 26 Jan 2000 10:25:18 +0100 (CET) Cc: freebsd-hackers@FreeBSD.ORG X-Mailer: ELM [version 2.4ME+ PL54 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG It seems f.johan.beisser wrote: > > i just got this from a friend of mine.. can anyone help him? It looks like HW problems to me, is that K6-2 overclocked ?? Is the memory good enough for the task ?? > plus-dem.c -o cplus-dem.o > cc: Internal compiler error: program cc1 got fatal signal 11 -Søren To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Wed Jan 26 1:46:11 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from mass.cdrom.com (castles559.castles.com [208.214.165.123]) by hub.freebsd.org (Postfix) with ESMTP id E27B014F1A for ; Wed, 26 Jan 2000 01:46:05 -0800 (PST) (envelope-from msmith@mass.cdrom.com) Received: from mass.cdrom.com (localhost [127.0.0.1]) by mass.cdrom.com (8.9.3/8.9.3) with ESMTP id BAA00698; Wed, 26 Jan 2000 01:52:32 -0800 (PST) (envelope-from msmith@mass.cdrom.com) Message-Id: <200001260952.BAA00698@mass.cdrom.com> X-Mailer: exmh version 2.1.1 10/15/1999 To: "Andrew G. Sverdlichenko" Cc: "'freebsd-hackers@freebsd.org'" Subject: Re: drivers In-reply-to: Your message of "Tue, 25 Jan 2000 16:30:14 +0300." <31301C81A549D311B46C006008610325125602@NT_SERVER> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Wed, 26 Jan 2000 01:52:32 -0800 From: Mike Smith Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > Hello. > > If we have a character device driver with and more than one > open handles for it, can read() and ioctl() choose which one > is used? No. This is not how the BSD driver model works; you should create multiple instances of the driver if you need multiple discrete opens. -- \\ Give a man a fish, and you feed him for a day. \\ Mike Smith \\ Tell him he should learn how to fish himself, \\ msmith@freebsd.org \\ and he'll hate you for a lifetime. \\ msmith@cdrom.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Wed Jan 26 2: 1:57 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from hermes.research.kpn.com (hermes.research.kpn.com [139.63.192.8]) by hub.freebsd.org (Postfix) with ESMTP id ABBBE15163 for ; Wed, 26 Jan 2000 02:01:54 -0800 (PST) (envelope-from K.J.Koster@research.kpn.com) Received: from l04.research.kpn.com (l04.research.kpn.com [139.63.192.204]) by research.kpn.com (PMDF V5.2-31 #35196) with ESMTP id <01JL5PA9LLCA000KLI@research.kpn.com> for freebsd-hackers@freebsd.org; Wed, 26 Jan 2000 11:01:51 +0100 Received: by l04.research.kpn.com with Internet Mail Service (5.5.2650.21) id ; Wed, 26 Jan 2000 11:01:50 +0100 Content-return: allowed Date: Wed, 26 Jan 2000 11:01:47 +0100 From: "Koster, K.J." Subject: RE: perfmon To: 'FreeBSD Hackers mailing list' Message-id: <59063B5B4D98D311BC0D0001FA7E45220FD197@l04.research.kpn.com> MIME-version: 1.0 X-Mailer: Internet Mail Service (5.5.2650.21) Content-type: text/plain; charset="iso-8859-1" Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > > > In the last episode (Jan 24), Gustavo Rios said: > > I have enabled perfmon options in my kernel config file, to be able > > to monitor my system performance. > > The perfmon kernel option lets you read the Pentium/P6 > hardware > counters. It has nothing to do with Solaris's perfmeter, > which probably uses a proprietary protocol anyway. > > You might want to take a look at xosview, xperfmon3, > xsysinfo, or xsysstats in the ports tree. > Doesn't perfmon use rstatd? Try enabling it in /etc/inetd.conf (remember to kick the inetd). Kees Jan ============================================== You are only young once, but you can stay immature all your life To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Wed Jan 26 5:14:39 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from www.asbaikaltv.ru (www.asbaikaltv.ru [195.239.202.100]) by hub.freebsd.org (Postfix) with ESMTP id EB84214CD0 for ; Wed, 26 Jan 2000 05:14:33 -0800 (PST) (envelope-from dmitry@www.asbaikaltv.ru) Received: (from dmitry@localhost) by www.asbaikaltv.ru (8.9.1/8.9.1) id VAA00802 for hackers@freebsd.org; Wed, 26 Jan 2000 21:13:48 +0800 Date: Wed, 26 Jan 2000 21:13:48 +0800 From: dmitry@www.asbaikaltv.ru Message-Id: <200001261313.VAA00802@www.asbaikaltv.ru> To: hackers@freebsd.org Subject: pci_map_mem return 0 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG hi all there! i am working on a specific dev driver for pci genlock based on Cirrus Logic GD5446 chip. when i try to map the cards memory, pci_map_mem return 0 my verbose boot message is: found-> vendor=0x1013, dev=0x00b8, revid=0x45 class=03-00-00, hdrtype=0x00, mfdev=0 subordinatebus=0 secondarybus=0 intpin=a, irq=12 map[0]: type 3, range 32, base e4000000, size 25 map[1]: type 1, range 32, base e6000000, size 12 strm0: rev 0x45 int a irq 12 on pci0.11.0 but map[0] is for Display Memory Base Address, but type = 3 it's not a PCI_MAPMEM type and map[1] for card registers, but type = 1. it's PCI_MAPMEM type HELP plz! what should i do? i am working on 3.1 thanks. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Wed Jan 26 7:18:21 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from ckmso1.proxy.att.com (ckmso1.att.com [12.20.58.69]) by hub.freebsd.org (Postfix) with ESMTP id 9822314ECA; Wed, 26 Jan 2000 07:18:15 -0800 (PST) (envelope-from myevmenkin@att.com) Received: from njb140r1.ems.att.com ([135.65.202.58]) by ckmso1.proxy.att.com (AT&T IPNS/MSO-2.2) with ESMTP id KAA13574; Wed, 26 Jan 2000 10:18:02 -0500 (EST) Received: from njb140bh1.ems.att.com by njb140r1.ems.att.com (8.8.8+Sun/ATTEMS-1.4.1 sol2) id KAA13673; Wed, 26 Jan 2000 10:17:28 -0500 (EST) Received: by njb140bh1.ems.att.com with Internet Mail Service (5.5.2448.0) id ; Wed, 26 Jan 2000 10:18:01 -0500 Message-ID: From: "Yevmenkin, Maksim N, CSCIO" To: "'Bruce Evans'" Cc: "'freebsd-current@freebsd.org'" , "'freebsd-hackers@freebsd.org'" Subject: RE: BPF bug or not? Date: Wed, 26 Jan 2000 10:17:53 -0500 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2448.0) Content-Type: text/plain; charset="iso-8859-1" Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Bruce, [...] > > I've just found that read from /dev/bpfX never return > EAGAIN/EWOULDBLOCK. > > It means that when you do a non blocking read and there is > no data you will > > always get 0. > > > > Does it suppose work this way? > > I think it is a bug. Perhaps applications depend on it. > > Untested fix: [ untested fix removed :) ] Yes, it works. But it returns EAGAIN for both O_RDONLY|O_NONBLOCK and O_RDWR|O_NONBLOCK open modes. In the same time pipe returns 0 for O_RDONLY|O_NONBLOCK mode and EAGAIN for O_RDWR|O_NONBLOCK. It there any specs for "read" system call? I have small problem with blocking read in pthreads under 3.X. Since blocking read implemented as non-blocking inside pthread (libc_r to be honest), returning 0 instead of EAGAIN from read confuses libc_r. It expects EAGAIN. BTW such "blocking" read inside thread gives almost 100% CPU utilization :( thanks, emax To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Wed Jan 26 8: 8:24 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from server1.huntsvilleal.com (www.huntsvilleal.com [207.13.224.7]) by hub.freebsd.org (Postfix) with ESMTP id 30F5314C43 for ; Wed, 26 Jan 2000 08:08:22 -0800 (PST) (envelope-from kris@hiwaay.net) Received: from barricuda.bsd.nws.net (kris.huntsvilleal.com [207.13.224.46]) by server1.huntsvilleal.com (8.9.3/8.9.3) with ESMTP id KAA16545 for ; Wed, 26 Jan 2000 10:52:10 -0500 Received: from localhost (localhost [127.0.0.1]) by barricuda.bsd.nws.net (8.9.3/8.9.3) with ESMTP id KAA39984 for ; Wed, 26 Jan 2000 10:08:16 -0600 (CST) (envelope-from kris@hiwaay.net) Date: Wed, 26 Jan 2000 10:08:16 -0600 (CST) From: Kris Kirby To: hackers@freebsd.org Subject: Acceptable MBUF levels? Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG I was just pondering recently as to what the acceptable levels of size and amount of mbufs in use are. I vaguely seem to recall that if you run out of mbufs, the machine will either panic or reboot. My reason for asking is simple: root:ninbox: {13} netstat -m 767/1152 mbufs in use: 509 mbufs allocated to data 258 mbufs allocated to packet headers 503/846/1024 mbuf clusters in use (current/peak/max) 1836 Kbytes allocated to network (60% in use) 0 requests for memory denied 0 requests for memory delayed 0 calls to protocol drain routines Yet I do not ever see this machine as a risk for running out of mbufs. Most of my machines have much lower mbuf usage (at the moment). I guess I am more interested in finding out what the acceptable load levels are and how to increase them, up to a non-ridiculous level. --- Kris Kirby .signature maimed To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Wed Jan 26 8:44: 7 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from mail4.aracnet.com (mail4.aracnet.com [216.99.193.36]) by hub.freebsd.org (Postfix) with ESMTP id 4BD4E153E1 for ; Wed, 26 Jan 2000 08:44:00 -0800 (PST) (envelope-from beattie@aracnet.com) Received: from shell1.aracnet.com (IDENT:root@shell1.aracnet.com [216.99.193.21]) by mail4.aracnet.com (8.9.3/8.9.3) with ESMTP id IAA25554 for ; Wed, 26 Jan 2000 08:44:07 -0800 Received: from localhost by shell1.aracnet.com (8.9.3) id IAA10706; Wed, 26 Jan 2000 08:46:07 -0800 X-Authentication-Warning: shell1.aracnet.com: beattie owned process doing -bs Date: Wed, 26 Jan 2000 08:46:07 -0800 (PST) From: Brian Beattie To: hackers@freebsd.org Subject: Chosing a value for VT_XXXX (enum vtagtype) Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG I'm playing around with writing a filesystem module and am trying to figure out what value to use for the vtagtype. Do I ask to have one assigned, should I use an existing one, should I make up a new one? Brian Beattie | The only problem with beattie@aracnet.com | winning the rat race ... www.aracnet.com/~beattie | in the end you're still a rat To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Wed Jan 26 9:16:39 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from ind.alcatel.com (postal.xylan.com [208.8.0.248]) by hub.freebsd.org (Postfix) with ESMTP id 8901D14ED5 for ; Wed, 26 Jan 2000 09:16:36 -0800 (PST) (envelope-from wes@softweyr.com) Received: from mailhub.xylan.com (mailhub [198.206.181.70]) by ind.alcatel.com (8.9.3+Sun/8.9.1 (ind.alcatel.com 3.0 [OUT])) with SMTP id JAA16480; Wed, 26 Jan 2000 09:15:49 -0800 (PST) X-Origination-Site: Received: from omni.xylan.com by mailhub.xylan.com (SMI-8.6/SMI-SVR4 (mailhub 2.1 [HUB])) id JAA14176; Wed, 26 Jan 2000 09:15:49 -0800 Received: from softweyr.com (dyn0.utah.xylan.com [198.206.184.236]) by omni.xylan.com (8.9.3+Sun/8.9.1 (Xylan engr [SPOOL])) with ESMTP id JAA01748; Wed, 26 Jan 2000 09:15:44 -0800 (PST) Message-ID: <388F2CE3.FCCF4ADC@softweyr.com> Date: Wed, 26 Jan 2000 10:20:35 -0700 From: Wes Peters Organization: Softweyr LLC X-Mailer: Mozilla 4.7 [en] (X11; U; FreeBSD 3.3-RELEASE i386) X-Accept-Language: en MIME-Version: 1.0 To: Soren Schmidt Cc: "f.johan.beisser" , freebsd-hackers@freebsd.org Subject: Re: compiler errors (fwd) References: <200001260925.KAA17568@freebsd.dk> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Soren Schmidt wrote: > > It seems f.johan.beisser wrote: > > > > i just got this from a friend of mine.. can anyone help him? > > It looks like HW problems to me, is that K6-2 overclocked ?? > Is the memory good enough for the task ?? The K6-2 and K6-3 are notoriously hard on bad memory, and on bad motherboards. Make sure the motherboard is correctly configured, and that if you've selected "PC100" memory that it really is "PC100" memory, and fast. -- "Where am I, and what am I doing in this handbasket?" Wes Peters Softweyr LLC wes@softweyr.com http://softweyr.com/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Wed Jan 26 9:17: 9 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from ind.alcatel.com (postal.xylan.com [208.8.0.248]) by hub.freebsd.org (Postfix) with ESMTP id B3DB1153D9; Wed, 26 Jan 2000 09:17:03 -0800 (PST) (envelope-from wes@softweyr.com) Received: from mailhub.xylan.com (mailhub [198.206.181.70]) by ind.alcatel.com (8.9.3+Sun/8.9.1 (ind.alcatel.com 3.0 [OUT])) with SMTP id JAA16516; Wed, 26 Jan 2000 09:17:02 -0800 (PST) X-Origination-Site: Received: from omni.xylan.com by mailhub.xylan.com (SMI-8.6/SMI-SVR4 (mailhub 2.1 [HUB])) id JAA14243; Wed, 26 Jan 2000 09:17:01 -0800 Received: from softweyr.com (dyn0.utah.xylan.com [198.206.184.236]) by omni.xylan.com (8.9.3+Sun/8.9.1 (Xylan engr [SPOOL])) with ESMTP id JAA01802; Wed, 26 Jan 2000 09:16:55 -0800 (PST) Message-ID: <388F2D2A.14764115@softweyr.com> Date: Wed, 26 Jan 2000 10:21:46 -0700 From: Wes Peters Organization: Softweyr LLC X-Mailer: Mozilla 4.7 [en] (X11; U; FreeBSD 3.3-RELEASE i386) X-Accept-Language: en MIME-Version: 1.0 To: Mike Smith Cc: "Andrew G. Sverdlichenko" , "'freebsd-hackers@freebsd.org'" Subject: Re: drivers References: <200001260952.BAA00698@mass.cdrom.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Mike Smith wrote: > > > Hello. > > > > If we have a character device driver with and more than one > > open handles for it, can read() and ioctl() choose which one > > is used? > > No. This is not how the BSD driver model works; you should create > multiple instances of the driver if you need multiple discrete opens. ENOCLONE? ;^) -- "Where am I, and what am I doing in this handbasket?" Wes Peters Softweyr LLC wes@softweyr.com http://softweyr.com/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Wed Jan 26 9:41:25 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from bomber.avantgo.com (ws1.avantgo.com [207.214.200.194]) by hub.freebsd.org (Postfix) with ESMTP id 2B87E14D7A for ; Wed, 26 Jan 2000 09:41:18 -0800 (PST) (envelope-from scott@avantgo.com) Received: from river ([10.0.128.30]) by bomber.avantgo.com (Netscape Messaging Server 3.5) with SMTP id 381 for ; Wed, 26 Jan 2000 09:36:39 -0800 Message-ID: <01b301bf6824$46e928a0$1e80000a@avantgo.com> From: "Scott Hess" To: Subject: aio_read crashing certain kernels. Date: Wed, 26 Jan 2000 09:39:20 -0800 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 5.00.2919.6600 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Since nobody here seems to be able to figure it out... I wrote a program to play around with aio_read(), and it ran stellarly well on my FreeBSD3.4-release system using EIDE hard drives. But, when I tried to run it on a system using our production kernel with Adaptec SCSI controllers, it locked the kernel up HARD. No console messages, no Ctrl-Alt-Del, had to push the hard reset switch. The kernel in question is a FreeBSD3.4-release kernel compiled with a different set of options (lots of mbufs, etc, etc). I can't find anything in it that seems at all related to async I/O. The appropriate sysctl values all seem the same between the systems. And the fact that it locks the system up instead of saying ENOTSUPP or "async I/O not compiled in" concerns me greatly. Any ideas on why this might be happening? Thanks much, scott To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Wed Jan 26 10:25:21 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from picnic.mat.net (picnic.mat.net [206.246.122.133]) by hub.freebsd.org (Postfix) with ESMTP id 0F41314E8D for ; Wed, 26 Jan 2000 10:25:18 -0800 (PST) (envelope-from chuckr@picnic.mat.net) Received: from localhost (chuckr@localhost [127.0.0.1]) by picnic.mat.net (8.9.3/8.9.3) with ESMTP id MAA11612; Wed, 26 Jan 2000 12:28:21 -0500 (EST) (envelope-from chuckr@picnic.mat.net) Date: Wed, 26 Jan 2000 12:26:55 -0500 (EST) From: Chuck Robey To: "f.johan.beisser" Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: compiler errors (fwd) In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Wed, 26 Jan 2000, f.johan.beisser wrote: > ok, here's the scenario. I didn't install any ports until I went to do the > `make buildworld`, when I installed cvsup to get the source updates. > > full binary+sources install from the 14 Jan 2000 snapshot > AMD K6-2 450MHz (corroborated by dmesg output) > c. 8 gig Seagate IDE HD > 64 megs RAM > cheap motherboard with everything built in, and one PCI slot > > here is the final lines of output from trying to compile the GENERIC kernel > (doing a `/usr/sbin/config GENERIC`): > --------------- > -D_KERNEL -include opt_global.h -elf -mpreferred-stack-boundary=2 > ../../netinet/in.c > cc: Internal compiler error: program cc1 got fatal signal 11 > *** Error code 1 > cc: Internal compiler error: program cc1 got fatal signal 11 Signal 11 is usually an artifact of bad hardware, like bad RAM. You don't state what version of FreeBSD he's running, either. Did you know that, if he's running a system older than about 3 months ago, he CAN'T buildworld unless he installs a new kernel first? ---------------------------------------------------------------------------- Chuck Robey | Interests include C & Java programming, FreeBSD, chuckr@picnic.mat.net | electronics, communications, and signal processing. New Year's Resolution: I will not sphroxify gullible people into looking up fictitious words in the dictionary. ---------------------------------------------------------------------------- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Wed Jan 26 13:43:22 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from fw.wintelcom.net (ns1.wintelcom.net [209.1.153.20]) by hub.freebsd.org (Postfix) with ESMTP id 8881D14C56 for ; Wed, 26 Jan 2000 13:43:20 -0800 (PST) (envelope-from bright@fw.wintelcom.net) Received: (from bright@localhost) by fw.wintelcom.net (8.9.3/8.9.3) id OAA20447; Wed, 26 Jan 2000 14:07:51 -0800 (PST) Date: Wed, 26 Jan 2000 14:07:51 -0800 From: Alfred Perlstein To: Scott Hess Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: aio_read crashing certain kernels. Message-ID: <20000126140751.F26520@fw.wintelcom.net> References: <01b301bf6824$46e928a0$1e80000a@avantgo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0.1i In-Reply-To: <01b301bf6824$46e928a0$1e80000a@avantgo.com>; from scott@avantgo.com on Wed, Jan 26, 2000 at 09:39:20AM -0800 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG * Scott Hess [000126 10:08] wrote: > Since nobody here seems to be able to figure it out... I wrote a program to > play around with aio_read(), and it ran stellarly well on my > FreeBSD3.4-release system using EIDE hard drives. But, when I tried to run > it on a system using our production kernel with Adaptec SCSI controllers, > it locked the kernel up HARD. No console messages, no Ctrl-Alt-Del, had to > push the hard reset switch. > > The kernel in question is a FreeBSD3.4-release kernel compiled with a > different set of options (lots of mbufs, etc, etc). I can't find anything > in it that seems at all related to async I/O. The appropriate sysctl > values all seem the same between the systems. And the fact that it locks > the system up instead of saying ENOTSUPP or "async I/O not compiled in" > concerns me greatly. > > Any ideas on why this might be happening? No, please provide a debug traceback and file a PR, see: http://www.freebsd.org/handbook/kerneldebug.html thanks, -Alfred To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Wed Jan 26 13:55: 2 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from pogo.caustic.org (pogo.caustic.org [208.44.193.69]) by hub.freebsd.org (Postfix) with ESMTP id 6175D14F07 for ; Wed, 26 Jan 2000 13:54:38 -0800 (PST) (envelope-from jan@caustic.org) Received: from localhost (jan@localhost) by pogo.caustic.org (8.9.3/ignatz) with ESMTP id NAA08223; Wed, 26 Jan 2000 13:55:06 -0800 (PST) Date: Wed, 26 Jan 2000 13:55:06 -0800 (PST) From: "f.johan.beisser" To: Chuck Robey Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: compiler errors (fwd) In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG oddly enough, i told him this a few days ago, but he insisted that his hardware was fine.. anyhow, thanks for the help you all have given me. -- jan On Wed, 26 Jan 2000, Chuck Robey wrote: > On Wed, 26 Jan 2000, f.johan.beisser wrote: > > > ok, here's the scenario. I didn't install any ports until I went to do the > > `make buildworld`, when I installed cvsup to get the source updates. > > > > full binary+sources install from the 14 Jan 2000 snapshot > > AMD K6-2 450MHz (corroborated by dmesg output) > > c. 8 gig Seagate IDE HD > > 64 megs RAM > > cheap motherboard with everything built in, and one PCI slot > > > > here is the final lines of output from trying to compile the GENERIC kernel > > (doing a `/usr/sbin/config GENERIC`): > > --------------- > > -D_KERNEL -include opt_global.h -elf -mpreferred-stack-boundary=2 > > ../../netinet/in.c > > cc: Internal compiler error: program cc1 got fatal signal 11 > > *** Error code 1 > > cc: Internal compiler error: program cc1 got fatal signal 11 > > Signal 11 is usually an artifact of bad hardware, like bad RAM. You don't > state what version of FreeBSD he's running, either. Did you know that, if > he's running a system older than about 3 months ago, he CAN'T buildworld > unless he installs a new kernel first? > > ---------------------------------------------------------------------------- > Chuck Robey | Interests include C & Java programming, FreeBSD, > chuckr@picnic.mat.net | electronics, communications, and signal processing. > > New Year's Resolution: I will not sphroxify gullible people into looking up > fictitious words in the dictionary. > ---------------------------------------------------------------------------- > > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-hackers" in the body of the message > +-----// f. johan beisser //------------------------------+ email: jan[at]caustic.org web: http://www.caustic.org/~jan "knowledge is power. power corrupts. study hard, be evil." To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Wed Jan 26 14:38:51 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from resnet.uoregon.edu (resnet.uoregon.edu [128.223.144.32]) by hub.freebsd.org (Postfix) with ESMTP id DEA6314E89 for ; Wed, 26 Jan 2000 14:38:48 -0800 (PST) (envelope-from dwhite@resnet.uoregon.edu) Received: from localhost (dwhite@localhost) by resnet.uoregon.edu (8.9.3/8.9.3) with ESMTP id OAA09854; Wed, 26 Jan 2000 14:38:46 -0800 (PST) (envelope-from dwhite@resnet.uoregon.edu) Date: Wed, 26 Jan 2000 14:38:46 -0800 (PST) From: Doug White To: Kris Kirby Cc: hackers@FreeBSD.ORG Subject: Re: Acceptable MBUF levels? In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Wed, 26 Jan 2000, Kris Kirby wrote: > > I was just pondering recently as to what the acceptable levels of size and > amount of mbufs in use are. I vaguely seem to recall that if you run out > of mbufs, the machine will either panic or reboot. My reason for asking is > simple: > > root:ninbox: {13} netstat -m > 767/1152 mbufs in use: > 509 mbufs allocated to data > 258 mbufs allocated to packet headers > 503/846/1024 mbuf clusters in use (current/peak/max) When people refer to mbufs, they refer to mbuf clusters, of which there's a fixed number. The kernel will allocate more mbufs as necessary. The usual rule of thumb is that the peak should never exceed 75% of the max mbufs in the system to allow for sufficient overhead in extreme situations. In this case you're at 80%, so you should probably recompile your kernel and bump maxusers. Doug White | FreeBSD: The Power to Serve dwhite@resnet.uoregon.edu | www.FreeBSD.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Wed Jan 26 14:43:30 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from acl.lanl.gov (acl.lanl.gov [128.165.147.1]) by hub.freebsd.org (Postfix) with ESMTP id C711814C8C for ; Wed, 26 Jan 2000 14:43:28 -0800 (PST) (envelope-from rminnich@lanl.gov) Received: from localhost (rminnich@localhost) by acl.lanl.gov (8.8.8/8.8.5) with ESMTP id PAA2750827 for ; Wed, 26 Jan 2000 15:43:27 -0700 (MST) X-Authentication-Warning: acl.lanl.gov: rminnich owned process doing -bs Date: Wed, 26 Jan 2000 15:43:27 -0700 From: "Ronald G. Minnich" To: hackers@freebsd.org Subject: RE: perfmon In-Reply-To: <59063B5B4D98D311BC0D0001FA7E45220FD197@l04.research.kpn.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG You also might want to check out SGI's PCP tools. I know, they're only out for linux just now, but they are nice and could be ported. ron To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Wed Jan 26 15:31: 1 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from apollo.backplane.com (apollo.backplane.com [216.240.41.2]) by hub.freebsd.org (Postfix) with ESMTP id 991F7151EE for ; Wed, 26 Jan 2000 15:30:59 -0800 (PST) (envelope-from dillon@apollo.backplane.com) Received: (from dillon@localhost) by apollo.backplane.com (8.9.3/8.9.1) id PAA16635; Wed, 26 Jan 2000 15:30:58 -0800 (PST) (envelope-from dillon) Date: Wed, 26 Jan 2000 15:30:58 -0800 (PST) From: Matthew Dillon Message-Id: <200001262330.PAA16635@apollo.backplane.com> To: "Scott Hess" Cc: Subject: Re: aio_read crashing certain kernels. References: <01b301bf6824$46e928a0$1e80000a@avantgo.com> Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG :Since nobody here seems to be able to figure it out... I wrote a program to :play around with aio_read(), and it ran stellarly well on my :FreeBSD3.4-release system using EIDE hard drives. But, when I tried to run :it on a system using our production kernel with Adaptec SCSI controllers, :it locked the kernel up HARD. No console messages, no Ctrl-Alt-Del, had to :push the hard reset switch. : :The kernel in question is a FreeBSD3.4-release kernel compiled with a :different set of options (lots of mbufs, etc, etc). I can't find anything :in it that seems at all related to async I/O. The appropriate sysctl :values all seem the same between the systems. And the fact that it locks :the system up instead of saying ENOTSUPP or "async I/O not compiled in" :concerns me greatly. : :Any ideas on why this might be happening? : :Thanks much, :scott If you can reproduce the bug easily, can you post the program that causes it plus instructions on how to reproduce the bug? If one of us can reproduce it we may be able to squeeze more info out of the crash. -Matt To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Wed Jan 26 16:36:24 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from rover.village.org (rover.village.org [204.144.255.49]) by hub.freebsd.org (Postfix) with ESMTP id 5EBD115494; Wed, 26 Jan 2000 16:36:18 -0800 (PST) (envelope-from imp@harmony.village.org) Received: from harmony.village.org (harmony.village.org [10.0.0.6]) by rover.village.org (8.9.3/8.9.3) with ESMTP id RAA02289; Wed, 26 Jan 2000 17:36:13 -0700 (MST) (envelope-from imp@harmony.village.org) Received: from harmony.village.org (localhost.village.org [127.0.0.1]) by harmony.village.org (8.9.3/8.8.3) with ESMTP id RAA04577; Wed, 26 Jan 2000 17:35:51 -0700 (MST) Message-Id: <200001270035.RAA04577@harmony.village.org> To: "Jonathan M. Bresler" Subject: Re: kern/13644 Cc: dillon@apollo.backplane.com, wes@softweyr.com, hackers@FreeBSD.org In-reply-to: Your message of "Tue, 25 Jan 2000 16:55:28 PST." <20000126005528.7DC0314BCF@hub.freebsd.org> References: <20000126005528.7DC0314BCF@hub.freebsd.org> Date: Wed, 26 Jan 2000 17:35:51 -0700 From: Warner Losh Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG In message <20000126005528.7DC0314BCF@hub.freebsd.org> "Jonathan M. Bresler" writes: : The terminology is very simple. Anyone that can cope with : either vi or emacs can learn: : : NUL: an ascii character (0x00) : NIL: a pointer at the end of the line : NULL pointer: used in C to refer to NIL. : not to be confused with NUL. But NIL is not a poitner at the end of the line in gnu emacs. It is the empty list. Warner To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Wed Jan 26 17: 8: 0 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from oracle.dsuper.net (oracle.dsuper.net [205.205.255.1]) by hub.freebsd.org (Postfix) with ESMTP id CA385153C4 for ; Wed, 26 Jan 2000 17:07:50 -0800 (PST) (envelope-from bmilekic@dsuper.net) Received: from oracle.dsuper.net (oracle.dsuper.net [205.205.255.1]) by oracle.dsuper.net (8.9.3/8.9.3) with ESMTP id UAA22383; Wed, 26 Jan 2000 20:07:39 -0500 (EST) Date: Wed, 26 Jan 2000 20:07:39 -0500 (EST) From: Bosko Milekic To: Doug White Cc: Kris Kirby , hackers@FreeBSD.ORG Subject: Re: Acceptable MBUF levels? In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Wed, 26 Jan 2000, Doug White wrote: >When people refer to mbufs, they refer to mbuf clusters, of which there's >a fixed number. The kernel will allocate more mbufs as necessary. Uhm, actually, mbufs are also allocated from mb_map. Thus, they are also capped. (Unless I'm missing something big again... :-) ) >The usual rule of thumb is that the peak should never exceed 75% of the >max mbufs in the system to allow for sufficient overhead in extreme >situations. In this case you're at 80%, so you should probably recompile >your kernel and bump maxusers. Actually, for mbufs and mbuf clusters, you should increase NMBCLUSTERS, which will serve as an indication of allocate-able clusters as well as, ultimately, mbufs. -- Bosko Milekic Email: bmilekic@dsuper.net To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Wed Jan 26 17:29:24 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from venera.isi.edu (venera.isi.edu [128.9.176.32]) by hub.freebsd.org (Postfix) with ESMTP id E74C61547A for ; Wed, 26 Jan 2000 17:29:20 -0800 (PST) (envelope-from faber@ISI.EDU) Received: from ted.isi.edu (ted.isi.edu [128.9.160.104]) by venera.isi.edu (8.8.7/8.8.6) with ESMTP id RAA15498 for ; Wed, 26 Jan 2000 17:29:18 -0800 (PST) Received: from ted.isi.edu (localhost [127.0.0.1]) by ted.isi.edu (8.9.3/8.9.3) with ESMTP id RAA14147 for ; Wed, 26 Jan 2000 17:29:19 -0800 (PST) (envelope-from faber@ted.isi.edu) Message-Id: <200001270129.RAA14147@ted.isi.edu> X-Mailer: exmh version 2.1.1 10/15/1999 To: hackers@freebsd.org Subject: Y2K: groff in the tree out of date X-Url: http://www.isi.edu/~faber Date: Wed, 26 Jan 2000 17:29:19 -0800 From: Ted Faber Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Content-Type: text/plain; charset=us-ascii The groff in 3.4-stable is out of date. Specifically, it's version 1.11, while 1.12 has the Y2K bugs allegedly fixed. Current documents using ms and the \*(DY string (current date) do some time travel. You can see this with: $ groff -ms -Tascii < .pl 1i > \*(DY > END :2: warning: `cov*first-page-init' not defined 26 January 1900 Should I submit a PR on this? -----BEGIN PGP SIGNATURE----- Version: PGPfreeware 5.0i for non-commercial use Charset: noconv iQA/AwUBOI+fb2lM93/mX/l7EQJqZwCgsL3cGJM4bRIPWAoXYs3svMKqZCUAn1/w p5gUTdj2LK8un+sZKFbOeKuP =GxN3 -----END PGP SIGNATURE----- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Wed Jan 26 18:21:56 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from dorifer.heim3.tu-clausthal.de (dorifer.heim3.tu-clausthal.de [139.174.243.252]) by hub.freebsd.org (Postfix) with ESMTP id 458E0154CB for ; Wed, 26 Jan 2000 18:18:08 -0800 (PST) (envelope-from olli@dorifer.heim3.tu-clausthal.de) Received: (from olli@localhost) by dorifer.heim3.tu-clausthal.de (8.9.3/8.9.3) id DAA36676; Thu, 27 Jan 2000 03:17:58 +0100 (CET) (envelope-from olli) Date: Thu, 27 Jan 2000 03:17:58 +0100 (CET) Message-Id: <200001270217.DAA36676@dorifer.heim3.tu-clausthal.de> From: Oliver Fromme To: freebsd-hackers@FreeBSD.ORG Reply-To: freebsd-hackers@FreeBSD.ORG Subject: Re: kern/13644 X-Newsgroups: list.freebsd-hackers In-Reply-To: <86o40p$2pei$1@atlantis.rz.tu-clausthal.de> User-Agent: tin/1.4.1-19991201 ("Polish") (UNIX) (FreeBSD/3.4-19991219-STABLE (i386)) MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Warner Losh wrote in list.freebsd-hackers: > In message <20000126005528.7DC0314BCF@hub.freebsd.org> "Jonathan M. Bresler" writes: > : The terminology is very simple. Anyone that can cope with > : either vi or emacs can learn: > : > : NUL: an ascii character (0x00) > : NIL: a pointer at the end of the line > : NULL pointer: used in C to refer to NIL. > : not to be confused with NUL. > > But NIL is not a poitner at the end of the line in gnu emacs. It is > the empty list. Traditionally, NIL is the last element in a list, which marks the end of the list. NIL is the abbreviation of "not in list". (I'm not familiar with elisp, though.) Regards Oliver -- Oliver Fromme, Leibnizstr. 18/61, 38678 Clausthal, Germany (Info: finger userinfo:olli@dorifer.heim3.tu-clausthal.de) "In jedem Stück Kohle wartet ein Diamant auf seine Geburt" (Terry Pratchett) To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Wed Jan 26 18:50:11 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from picnic.mat.net (picnic.mat.net [206.246.122.133]) by hub.freebsd.org (Postfix) with ESMTP id 073D31548D for ; Wed, 26 Jan 2000 18:50:05 -0800 (PST) (envelope-from chuckr@picnic.mat.net) Received: from localhost (chuckr@localhost [127.0.0.1]) by picnic.mat.net (8.9.3/8.9.3) with ESMTP id VAA49974 for ; Wed, 26 Jan 2000 21:49:54 -0500 (EST) (envelope-from chuckr@picnic.mat.net) Date: Wed, 26 Jan 2000 21:49:53 -0500 (EST) From: Chuck Robey To: freebsd-hackers@FreeBSD.ORG Subject: Re: kern/13644 In-Reply-To: <200001270217.DAA36676@dorifer.heim3.tu-clausthal.de> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Thu, 27 Jan 2000, Oliver Fromme wrote: > Warner Losh wrote in list.freebsd-hackers: > > In message <20000126005528.7DC0314BCF@hub.freebsd.org> "Jonathan M. Bresler" writes: > > : The terminology is very simple. Anyone that can cope with > > : either vi or emacs can learn: > > : > > : NUL: an ascii character (0x00) > > : NIL: a pointer at the end of the line > > : NULL pointer: used in C to refer to NIL. > > : not to be confused with NUL. > > > > But NIL is not a poitner at the end of the line in gnu emacs. It is > > the empty list. > > Traditionally, NIL is the last element in a list, which marks > the end of the list. NIL is the abbreviation of "not in list". > (I'm not familiar with elisp, though.) Now that's the definition *I* learned. ---------------------------------------------------------------------------- Chuck Robey | Interests include C & Java programming, FreeBSD, chuckr@picnic.mat.net | electronics, communications, and signal processing. New Year's Resolution: I will not sphroxify gullible people into looking up fictitious words in the dictionary. ---------------------------------------------------------------------------- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Wed Jan 26 18:58:45 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from relay.butya.kz (butya-gw.butya.kz [212.154.129.94]) by hub.freebsd.org (Postfix) with ESMTP id 0819015525 for ; Wed, 26 Jan 2000 18:58:40 -0800 (PST) (envelope-from bp@butya.kz) Received: from bp (helo=localhost) by relay.butya.kz with local-esmtp (Exim 2.12 #1) id 12Df8d-000ECm-00; Thu, 27 Jan 2000 08:58:27 +0600 Date: Thu, 27 Jan 2000 08:58:26 +0600 (ALMT) From: Boris Popov To: Brian Beattie Cc: hackers@freebsd.org Subject: Re: Chosing a value for VT_XXXX (enum vtagtype) In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Wed, 26 Jan 2000, Brian Beattie wrote: > I'm playing around with writing a filesystem module and am trying to > figure out what value to use for the vtagtype. Do I ask to have one > assigned, should I use an existing one, should I make up a new one? Well, while debugging new fs you can pick any VT_ tag that unused on your system: #define VT_MYGREATFS VT_TFS later, when filesystem became useful a new tag can be added to vtagtype enum. -- Boris Popov http://www.butya.kz/~bp/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Wed Jan 26 19:32:45 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from bomber.avantgo.com (ws1.avantgo.com [207.214.200.194]) by hub.freebsd.org (Postfix) with ESMTP id 0C1BC15216 for ; Wed, 26 Jan 2000 19:32:42 -0800 (PST) (envelope-from scott@avantgo.com) Received: from river ([10.0.128.30]) by bomber.avantgo.com (Netscape Messaging Server 3.5) with SMTP id 230; Wed, 26 Jan 2000 19:28:54 -0800 Message-ID: <066e01bf6877$02deb550$1e80000a@avantgo.com> From: "Scott Hess" To: "Matthew Dillon" Cc: References: <01b301bf6824$46e928a0$1e80000a@avantgo.com> <200001262330.PAA16635@apollo.backplane.com> Subject: Re: aio_read crashing certain kernels. Date: Wed, 26 Jan 2000 19:31:34 -0800 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 5.00.2919.6600 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG "Matthew Dillon" wrote: > :Since nobody here seems to be able to figure it out... I wrote a program to > :play around with aio_read(), and it ran stellarly well on my > :FreeBSD3.4-release system using EIDE hard drives. But, when I tried to run > :it on a system using our production kernel with Adaptec SCSI controllers, > :it locked the kernel up HARD. No console messages, no Ctrl-Alt-Del, had to > :push the hard reset switch. > > If you can reproduce the bug easily, can you post the program that > causes it plus instructions on how to reproduce the bug? If one of us > can reproduce it we may be able to squeeze more info out of the crash. The simplest program imaginable causes the problem (see included file for an example). Another item came to mind - SMP. The boxes with the crashes are SMP, the box without the crashes is not. Since rfork(RFMEM) doesn't work with SMP, and aio_read seems to be implemented by sharing memory with an aiod process, perhaps it's the same issue? [If so, perhaps it needs to be returning an ENOTSUPP from aio_read :-).] void main( void) { int fd=open( "/tmp/myfile", O_RDONLY); char buf[ 1024]; struct aiocb iocb; iocb.aio_fildes=fd; iocb.aio_offset=0; iocb.aio_buf=buf; iocb.aio_nbytes=sizeof( buf); iocb.aio_sigevent.sigev_notify=SIGEV_SIGNAL; iocb.aio_sigevent.sigev_signo=SIGIO; aio_read( &iocb); } Thanks, scott To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Wed Jan 26 20:57:36 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from apollo.backplane.com (apollo.backplane.com [216.240.41.2]) by hub.freebsd.org (Postfix) with ESMTP id B055D154E5 for ; Wed, 26 Jan 2000 20:57:30 -0800 (PST) (envelope-from dillon@apollo.backplane.com) Received: (from dillon@localhost) by apollo.backplane.com (8.9.3/8.9.1) id UAA18887; Wed, 26 Jan 2000 20:57:29 -0800 (PST) (envelope-from dillon) Date: Wed, 26 Jan 2000 20:57:29 -0800 (PST) From: Matthew Dillon Message-Id: <200001270457.UAA18887@apollo.backplane.com> To: "Scott Hess" Cc: Subject: Re: aio_read crashing certain kernels. References: <01b301bf6824$46e928a0$1e80000a@avantgo.com> <200001262330.PAA16635@apollo.backplane.com> <066e01bf6877$02deb550$1e80000a@avantgo.com> Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG :The simplest program imaginable causes the problem (see included file for :an example). Another item came to mind - SMP. The boxes with the crashes :are SMP, the box without the crashes is not. Since rfork(RFMEM) doesn't :work with SMP, and aio_read seems to be implemented by sharing memory with :an aiod process, perhaps it's the same issue? [If so, perhaps it needs to :be returning an ENOTSUPP from aio_read :-).] : :void main( void) :{ : int fd=open( "/tmp/myfile", O_RDONLY); : char buf[ 1024]; : struct aiocb iocb; : iocb.aio_fildes=fd; : iocb.aio_offset=0; : iocb.aio_buf=buf; : iocb.aio_nbytes=sizeof( buf); : iocb.aio_sigevent.sigev_notify=SIGEV_SIGNAL; : iocb.aio_sigevent.sigev_signo=SIGIO; : aio_read( &iocb); :} : :Thanks, :scott This is an incredibly scary program! It's sending an iocb to aio_read and then pops the stack and exits. The act of exiting could very well scribble all over the iocb structure while the I/O is in progress and, of course, then the program invalidates the stack and exits. I haven't been able to reproduce the crash on my 3.4 test box yet, I've tried both SMP and non-SMP builds (it's a duel-cpu box). I would like you to make some modifications to your program ... please bzero() the iocb structure before you initialize it, and see if the problem still occurs. If it does, then try putting a sleep(5) after the aio_read() and see if the problem still occurs. You could be right about the SMP build --- the aio code is indeed doing a fork with RFMEM and that *WILL* break under SMP. -Matt Matthew Dillon To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Wed Jan 26 21:35:27 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from gidora.zeta.org.au (gidora.zeta.org.au [203.26.10.25]) by hub.freebsd.org (Postfix) with SMTP id D8C4E15401 for ; Wed, 26 Jan 2000 21:35:23 -0800 (PST) (envelope-from bde@zeta.org.au) Received: (qmail 19595 invoked from network); 27 Jan 2000 05:35:20 -0000 Received: from bde.zeta.org.au (203.2.228.102) by gidora.zeta.org.au with SMTP; 27 Jan 2000 05:35:20 -0000 Date: Thu, 27 Jan 2000 16:35:16 +1100 (EST) From: Bruce Evans X-Sender: bde@alphplex.bde.org To: "Yevmenkin, Maksim N, CSCIO" Cc: "'freebsd-current@freebsd.org'" , "'freebsd-hackers@freebsd.org'" Subject: RE: BPF bug or not? In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Wed, 26 Jan 2000, Yevmenkin, Maksim N, CSCIO wrote: > > > I've just found that read from /dev/bpfX never return > > EAGAIN/EWOULDBLOCK. > > > It means that when you do a non blocking read and there is > > no data you will > > > always get 0. > [ untested fix removed :) ] > > Yes, it works. But it returns EAGAIN for both O_RDONLY|O_NONBLOCK and > O_RDWR|O_NONBLOCK open modes. In the same time pipe returns 0 for > O_RDONLY|O_NONBLOCK mode and EAGAIN for O_RDWR|O_NONBLOCK. > > It there any specs for "read" system call? Well, POSIX is very complete for read() on regular files and pipes (both ordinary pipes and fifos. read() on a pipe with no data and writers returns 0 because that case is considered to be EOF. O_RDWR for fifos gives undefined behaviour. I don't know of any legitimate use for it. It has the illegitimate use of talking to oneself using only one channel :-). This gives the EAGAIN behaviour for O_RDWR|O_NONBLOCK. Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Thu Jan 27 0: 7:43 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from turtle.looksharp.net (cc360882-a.strhg1.mi.home.com [24.2.221.22]) by hub.freebsd.org (Postfix) with ESMTP id 00C0514C03 for ; Thu, 27 Jan 2000 00:07:38 -0800 (PST) (envelope-from bsdx@looksharp.net) Received: from localhost (bsdx@localhost) by turtle.looksharp.net (8.9.3/8.9.3) with ESMTP id DAA26008; Thu, 27 Jan 2000 03:08:04 -0500 (EST) (envelope-from bsdx@looksharp.net) Date: Thu, 27 Jan 2000 03:08:04 -0500 (EST) From: Adam To: "f.johan.beisser" Cc: hackers@freebsd.org Subject: Re: compiler errors (fwd) In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Tell him he cannot claim it is not the hardware until he actually replaces the ram and cpu with truely known good ones and un-overclocks if he is oc'ing. Also try underclocking. I mention truely known good ones because I recently went through *3* bad cpu's before finding a useable one from our cpu stash at work. On Wed, 26 Jan 2000, f.johan.beisser wrote: > >oddly enough, i told him this a few days ago, but he insisted that his >hardware was fine.. > >anyhow, thanks for the help you all have given me. > >-- jan > > >On Wed, 26 Jan 2000, Chuck Robey wrote: > >> On Wed, 26 Jan 2000, f.johan.beisser wrote: >> >> > ok, here's the scenario. I didn't install any ports until I went to do the >> > `make buildworld`, when I installed cvsup to get the source updates. >> > >> > full binary+sources install from the 14 Jan 2000 snapshot >> > AMD K6-2 450MHz (corroborated by dmesg output) >> > c. 8 gig Seagate IDE HD >> > 64 megs RAM >> > cheap motherboard with everything built in, and one PCI slot >> > >> > here is the final lines of output from trying to compile the GENERIC kernel >> > (doing a `/usr/sbin/config GENERIC`): >> > --------------- >> > -D_KERNEL -include opt_global.h -elf -mpreferred-stack-boundary=2 >> > ../../netinet/in.c >> > cc: Internal compiler error: program cc1 got fatal signal 11 >> > *** Error code 1 >> > cc: Internal compiler error: program cc1 got fatal signal 11 >> >> Signal 11 is usually an artifact of bad hardware, like bad RAM. You don't >> state what version of FreeBSD he's running, either. Did you know that, if >> he's running a system older than about 3 months ago, he CAN'T buildworld >> unless he installs a new kernel first? >> >> ---------------------------------------------------------------------------- >> Chuck Robey | Interests include C & Java programming, FreeBSD, >> chuckr@picnic.mat.net | electronics, communications, and signal processing. >> >> New Year's Resolution: I will not sphroxify gullible people into looking up >> fictitious words in the dictionary. >> ---------------------------------------------------------------------------- >> >> >> >> To Unsubscribe: send mail to majordomo@FreeBSD.org >> with "unsubscribe freebsd-hackers" in the body of the message >> > > +-----// f. johan beisser //------------------------------+ > email: jan[at]caustic.org web: http://www.caustic.org/~jan > "knowledge is power. power corrupts. study hard, be evil." > > > >To Unsubscribe: send mail to majordomo@FreeBSD.org >with "unsubscribe freebsd-hackers" in the body of the message > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Thu Jan 27 0:19:28 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from mimer.webgiro.com (mimer.webgiro.com [212.209.29.5]) by hub.freebsd.org (Postfix) with ESMTP id 3B90414A27 for ; Thu, 27 Jan 2000 00:19:25 -0800 (PST) (envelope-from abial@webgiro.com) Received: by mimer.webgiro.com (Postfix, from userid 66) id 295482DC0B; Thu, 27 Jan 2000 09:18:58 +0100 (CET) Received: by mx.webgiro.com (Postfix, from userid 1001) id D14937811; Thu, 27 Jan 2000 09:18:16 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by mx.webgiro.com (Postfix) with ESMTP id CF03510E10; Thu, 27 Jan 2000 09:18:16 +0100 (CET) Date: Thu, 27 Jan 2000 09:18:16 +0100 (CET) From: Andrzej Bialecki To: Matthew Dillon Cc: Scott Hess , freebsd-hackers@FreeBSD.ORG Subject: Re: aio_read crashing certain kernels. In-Reply-To: <200001270457.UAA18887@apollo.backplane.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Wed, 26 Jan 2000, Matthew Dillon wrote: > This is an incredibly scary program! It's sending an iocb to aio_read > and then pops the stack and exits. The act of exiting could very well > scribble all over the iocb structure while the I/O is in progress and, > of course, then the program invalidates the stack and exits. Even if that's the case, it's still a userland program that is able to panic the system. So, no matter what the program does, it's still a bug in the way we handle aio. Andrzej Bialecki // WebGiro AB, Sweden (http://www.webgiro.com) // ------------------------------------------------------------------- // ------ FreeBSD: The Power to Serve. http://www.freebsd.org -------- // --- Small & Embedded FreeBSD: http://www.freebsd.org/~picobsd/ ---- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Thu Jan 27 2: 6:36 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from hyperbate.francenet.fr (hyperbate.francenet.fr [193.149.97.80]) by hub.freebsd.org (Postfix) with ESMTP id 7C14B14EA5 for ; Thu, 27 Jan 2000 02:06:29 -0800 (PST) (envelope-from perrot@FranceNet.fr) Received: from breizh.francenet.fr (gpconnect.francenet.net [193.149.111.208]) by hyperbate.francenet.fr (8.9.3/8.9.3) with ESMTP id LAA25343 for ; Thu, 27 Jan 2000 11:06:27 +0100 (MET) Received: from localhost (localhost [127.0.0.1]) by breizh.francenet.fr (8.9.3/8.9.1) with ESMTP id LAA02373 for ; Thu, 27 Jan 2000 11:06:16 +0100 (CET) Message-Id: <200001271006.LAA02373@breizh.francenet.fr> X-Mailer: exmh version 2.1.1 10/15/1999 To: freebsd-hackers@FreeBSD.ORG Subject: qpopper and sendmail ports on FreeBSD 3.x : locking process ? X-Face: '%)H7X3>"mU[aaPz3aZ`^e{*DV1&W;+P-Wx*Yk)Ah[e(-AO&EB\D.gq2y{kH73Q29}_A4H,eykdf!9dj[m\gwFgZOTt?=7gI+RBN,I({A32-MyZrmtrD%8*L/boGS0,+Lj$H|@ X-Url: http://www.francenet.fr/ Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Thu, 27 Jan 2000 11:06:16 +0100 From: Gildas PERROT Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Hi, I was thinking to use qpopper 2.53 port on FreeBSD 3.3 with sendmail 8.9.3 port (mail.local delivery) but I would like to know the impact of the patches added to source files especially concerning the lock process since I want to run a script to expire mail. Why does ..pop stay in /var/mail in the spool even at the end of POP3 session. The usual qpopper process is to remove .pop at the end of POP3 session. How does the lock process work with that port (I saw a flock.c file added to original distribution) ? If I want to expire mail, what should be the locking process in it considering I use sendmail and qpopper ports ? Furthermore, I would like to increase the performances of that server. With that port, is it possible to : - use server mode - put the POP_DROP on another directory (which is on another device) - use HASH_SPOOL=2 Furthermore, is there any patches dependency with sendmail 8.9.3 provided by FreeBSD 3.3 ? Finally, is it possible to use last version of qpopper 3.x without patches to get a correct behaviour especially with locking process. Thanks in advance for your help. Gildas. -- Gildas PERROT, perrot@francenet.fr __o FranceNet, 28 rue Desaix, 75015 Paris ---_ \<,_ http://www.francenet.fr ---- (_)/ (_) To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Thu Jan 27 3:11:10 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from mercury.is.co.za (mercury.is.co.za [196.4.160.222]) by hub.freebsd.org (Postfix) with ESMTP id 65193155CA for ; Thu, 27 Jan 2000 03:11:05 -0800 (PST) (envelope-from geoffr@is.co.za) Received: from hermwas.is.co.za (hermwas.is.co.za [196.23.0.8]) by mercury.is.co.za (8.9.3/8.9.3) with ESMTP id NAA10412; Thu, 27 Jan 2000 13:11:02 +0200 Received: (from geoffr@localhost) by hermwas.is.co.za (8.9.3/8.9.3) id NAA09507; Thu, 27 Jan 2000 13:11:00 +0200 (SAT) Date: Thu, 27 Jan 2000 13:11:00 +0200 From: Geoff Rehmet To: hackers@freebsd.org Cc: conradj@is.co.za, shafiek@is.co.za Subject: Success with Dell Poweredge 2400s? Message-ID: <20000127131100.C7586@hermwas.is.co.za> Reply-To: Geoff Rehmet , conradj@is.co.za, shafiek@is.co.za Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0pre3i Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Hi all, a short while ago, there was discussion about problems with Dell Poweredge 2400s. We are currently trying to get a couple of these beasts going (dual processor) and I'd like to know if anyone has had any success so far. Last time I looked, there seemed to be an issue about the Chipset? Regards, Geoff. -- Geoff Rehmet, The Internet Solution - Infrastructure tel: +27-11-283-5462, fax: +27-11-283-5401 mobile: +27-83-292-5800 email: geoffr@is.co.za, geoff@is.co.za URL: http://www.is.co.za To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Thu Jan 27 6:11:46 2000 Delivered-To: freebsd-hackers@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 608) id D6BE0155FB; Thu, 27 Jan 2000 06:11:43 -0800 (PST) From: "Jonathan M. Bresler" To: imp@village.org Cc: dillon@apollo.backplane.com, wes@softweyr.com, hackers@FreeBSD.org In-reply-to: <200001270035.RAA04577@harmony.village.org> (message from Warner Losh on Wed, 26 Jan 2000 17:35:51 -0700) Subject: Re: kern/13644 Message-Id: <20000127141143.D6BE0155FB@hub.freebsd.org> Date: Thu, 27 Jan 2000 06:11:43 -0800 (PST) Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG s/line/list/ NIL is what you test against to determin if you have reached the end of a list. the empty list is just a NIL ( hand wave over all the car and cdr reality in favor of a simpler albeit not-correct description of how it works.) jmb > > In message <20000126005528.7DC0314BCF@hub.freebsd.org> "Jonathan M. Bresler" writes: > : The terminology is very simple. Anyone that can cope with > : either vi or emacs can learn: > : > : NUL: an ascii character (0x00) > : NIL: a pointer at the end of the line > : NULL pointer: used in C to refer to NIL. > : not to be confused with NUL. > > But NIL is not a poitner at the end of the line in gnu emacs. It is > the empty list. > > Warner > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Thu Jan 27 8:44: 2 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from moffetimages.com (alar.scruz.predictive.com [207.251.1.130]) by hub.freebsd.org (Postfix) with ESMTP id F37E314C8B for ; Thu, 27 Jan 2000 08:43:59 -0800 (PST) (envelope-from brianm@moffetimages.com) Received: from brianm.moffetimages.com (dhcp8.moffetimages.com [10.0.1.8]) by moffetimages.com (8.9.3/8.9.3) with SMTP id IAA01750; Thu, 27 Jan 2000 08:43:48 -0800 (PST) (envelope-from brianm@moffetimages.com) Message-Id: <3.0.5.32.20000126163626.007a0340@orac.moffetimages.com> X-Sender: brianm@orac.moffetimages.com X-Mailer: QUALCOMM Windows Eudora Light Version 3.0.5 (32) Date: Wed, 26 Jan 2000 16:36:26 -0800 To: Marwan Fayed From: "Brian D. Moffet" Subject: Re: disappearing mount points after install Cc: freebsd-hackers@FreeBSD.org In-Reply-To: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG At 03:59 PM 1/22/00 -0500, you wrote: >FreeBSD loader does not start up, nor does the kernel (obviously). The >error message I get back is literally translated as "No O.S." "No O.S " means that the master boot block has not been written. I have no idea why your version of FreeBSD didn't write one, or if it wrote a corrupted one. The message comes from the BIOS loading code in the machine. Several possibilities exist, install a DOS partition which will boot, and then remove it and install your FreeBSD. That should get you your master boot block. I installed on a 13 Gig EIDE, with the "FreeBSD is the only OS ever on this machine" option (my manuals are elsewhere), and it installed and booted just fine, with no previous OS installed. There is probably a program or option to do this. Usually fdisk on the other versions of Intel Unix I have used dd the master boot block out... If you want to get really daring, look at the first sector of the BIOS and see if it starts with a "jump" command, e9 or eb or something like that. :-) If any of this is incorrect for FreeBSD, I hope someone lets me know, and lets me know how it is incorrect. Good luck Brian Brian D. Moffet www.moffetimages.com brianm@ricochet.net photographer, pilot, musician, programmer To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Thu Jan 27 8:57: 0 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from polaris.cs.laurentian.ca (polaris.cs.laurentian.ca [142.51.24.200]) by hub.freebsd.org (Postfix) with SMTP id EFDBC15891 for ; Thu, 27 Jan 2000 08:56:52 -0800 (PST) (envelope-from s0121430@cs.laurentian.ca) Received: (qmail 19995 invoked from network); 27 Jan 2000 16:56:51 -0000 Received: from unknown (HELO eten-01.cs.laurentian.ca) (142.51.24.1) by polaris.cs.laurentian.ca with SMTP; 27 Jan 2000 16:56:51 -0000 Date: Thu, 27 Jan 2000 11:56:51 -0500 (EST) From: Marwan Fayed To: "Brian D. Moffet" Cc: freebsd-hackers@FreeBSD.org Subject: Re: disappearing mount points after install In-Reply-To: <3.0.5.32.20000126163626.007a0340@orac.moffetimages.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Wed, 26 Jan 2000, Brian D. Moffet wrote: > At 03:59 PM 1/22/00 -0500, you wrote: > >FreeBSD loader does not start up, nor does the kernel (obviously). The > >error message I get back is literally translated as "No O.S." > > on the other versions of Intel Unix I have used dd the master boot block > out... > > If you want to get really daring, look at the first sector of the BIOS and see > if it starts with a "jump" command, e9 or eb or something like that. :-) > > If any of this is incorrect for FreeBSD, I hope someone lets me know, and lets > me know how it is incorrect. > Hi Brian, Through some pointing from others, and trial and error on my part, I discovered that my BIOS requires that my first bootable partition be a bootable DOS partition. What is most strange is that for some reason it is required to be at least 20Megs in size. I only discovered this after trying 2,5,10,15 megabyte partitions. Anyway, it works now as a dual boot machine. Even though I had to give up 20Megs (on an 800MB HD), at least it works... and I discovered I can use that space as FreeBSD swap space so it's not completely wasted. I should end by saying, "Thanks IBM for all the proprietary stuff you force on people" (can you sense the sarcasm!?) ;-) Marwan ps. The machine was an IBM Thinkpad 365XD. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Thu Jan 27 9:45:15 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from green.dyndns.org (localhost [127.0.0.1]) by hub.freebsd.org (Postfix) with ESMTP id 103CF15240; Thu, 27 Jan 2000 09:45:09 -0800 (PST) (envelope-from green@FreeBSD.org) Received: from localhost (green@localhost) by green.dyndns.org (8.9.3/8.9.3) with ESMTP id MAA03403; Thu, 27 Jan 2000 12:44:16 -0500 (EST) (envelope-from green@FreeBSD.org) X-Authentication-Warning: green.dyndns.org: green owned process doing -bs Date: Thu, 27 Jan 2000 12:44:10 -0500 (EST) From: Brian Fundakowski Feldman X-Sender: green@green.dyndns.org To: hackers@FreeBSD.org, yokota@FreeBSD.org Subject: VGA card (mis)behavior Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG This really does need to be fixed for 4.0-RELEASE. There exists the problem where certain BIOSes will whack a VGA card out of shape, preventing FreeBSD from recognizing the card. The proper solution is to whack it into shape ASAP, and ASAP here would be the loader: you need to be able to interact with the loader, and weird BIOS modes making things impossible to read are _bad_. It's been tested for a while here, and works, setting the card to the correct mode. What needs work is to have the right mode for monochromatic cards set, which it isn't now. Would someone in the know review, (fix WRT mono) and commit these diffs? It's very important to be done. I originally got these diffs from W. Gerald Hicks. -- Brian Fundakowski Feldman \ FreeBSD: The Power to Serve! / green@FreeBSD.org `------------------------------' Index: i386/libi386/vidconsole.c =================================================================== RCS file: /usr2/ncvs/src/sys/boot/i386/libi386/vidconsole.c,v retrieving revision 1.12 diff -u -r1.12 vidconsole.c --- i386/libi386/vidconsole.c 1999/08/28 00:40:16 1.12 +++ i386/libi386/vidconsole.c 2000/01/19 08:16:17 @@ -42,6 +42,7 @@ #endif static void vidc_probe(struct console *cp); static int vidc_init(int arg); +static void vidc_setmode(int mode); static void vidc_putchar(int c); static int vidc_getchar(void); static int vidc_ischar(void); @@ -106,6 +107,7 @@ if (vidc_started && arg == 0) return; vidc_started = 1; + vidc_setmode(3); /* XXX - set 80x25 16 color text mode */ #ifdef TERM_EMU /* Init terminal emulator */ end_term(); @@ -117,6 +119,15 @@ for(i = 0; i < 10 && vidc_ischar(); i++) (void)vidc_getchar(); return(0); /* XXX reinit? */ +} + +static void +vidc_setmode(int mode) +{ + v86.ctl = 0; + v86.addr = 0x10; + v86.eax = mode & 0xff; /* AH=0, AL=mode */ + v86int(); } static void To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Thu Jan 27 10:55:15 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from bomber.avantgo.com (ws1.avantgo.com [207.214.200.194]) by hub.freebsd.org (Postfix) with ESMTP id 5492815706 for ; Thu, 27 Jan 2000 10:55:12 -0800 (PST) (envelope-from scott@avantgo.com) Received: from river ([10.0.128.30]) by bomber.avantgo.com (Netscape Messaging Server 3.5) with SMTP id 291; Thu, 27 Jan 2000 10:51:30 -0800 Message-ID: <073d01bf68f7$e3ca25b0$1e80000a@avantgo.com> From: "Scott Hess" To: "Matthew Dillon" Cc: References: <01b301bf6824$46e928a0$1e80000a@avantgo.com> <200001262330.PAA16635@apollo.backplane.com> <066e01bf6877$02deb550$1e80000a@avantgo.com> <200001270457.UAA18887@apollo.backplane.com> Subject: Re: aio_read crashing certain kernels. Date: Thu, 27 Jan 2000 10:54:07 -0800 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 5.00.2919.6600 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG "Matthew Dillon" wrote: > This is an incredibly scary program! OK, so I was facetious in including that program - my basic point was that it doesn't happen when I'm doing anything weird, it happens with the most straightforward aio_read program imaginable. Furthermore, it works on the uniprocessor/EIDE/standard-kernel machine, it doesn't on the SMP/Adaptec/custom-kernel machine. I've included another version of the program which I've used to actually kill a machine, repeatedly. > It's sending an iocb to aio_read > and then pops the stack and exits. The act of exiting could very well > scribble all over the iocb structure while the I/O is in progress and, > of course, then the program invalidates the stack and exits. ??? The problem is that I'm locking up the entire box, hard enough this morning that I had to pull the plug to get it back. If all I got were a coredump, I'd be over on freebsd-questions trying to figure out how it was that I misunderstood the problem. [Actually, I think this did cause my original posting to work right, because the process exitting probably caused the aio stuff to either error out or work correctly :-).] > You could be right about the SMP build --- the aio code is indeed > doing a fork with RFMEM and that *WILL* break under SMP. The weird thing is, rfork() on SMP returns ENOTSUPP - it doesn't work, but it doesn't break, either. Here's the program. I've found that it actually sometimes works, but I haven't been able to figure out why. It seems to have something to do with whether the file might be in the buffer cache or not (so it helps to pass a file which hasn't been accessed in awhile). Also, if I change the #if 1 to #if 0, it seems to work just fine. My suspicion is that it could be an SMP issue, and if I'm lucky, everything executes on a single CPU and works. If I'm unlucky, BAM! The code that I'm really hacking on does a lot of reads from widely placed sections of a file, and thus is more likely to hit the problem (if someone really really really wants that program, I can try to hack it into postable shape, but the enclosed program does the job for me). Again, the symptoms of a problem are that the entire box locks up so hard that you have to power cycle it at best, or pull the plug at worst. #include #include #include void main( int argc, char **argv) { int fd=open( argc>1 ? argv[1] : "/usr/tmp/aiotest.c", O_RDONLY); char buf[ 1024]; struct aiocb iocb; sigset_t sigset; if( fd==-1) { perror( "opening"); } bzero( &iocb, sizeof( iocb)); iocb.aio_fildes=fd; iocb.aio_offset=0; iocb.aio_buf=buf; iocb.aio_nbytes=sizeof( buf); iocb.aio_sigevent.sigev_notify=SIGEV_SIGNAL; iocb.aio_sigevent.sigev_signo=SIGIO; #if 1 if( aio_read( &iocb)==-1) { perror( "aio_read"); } while( aio_error( &iocb)==EINPROGRESS); #else printf( "aio_read\n"); if( aio_read( &iocb)==-1) { perror( "aio_read"); } do { printf( "aio_error\n"); } while( aio_error( &iocb)==EINPROGRESS); #endif printf( "en==%d\n", aio_error( &iocb)); printf( "rc==%d\n", aio_return( &iocb)); } To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Thu Jan 27 14:37: 4 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from server.baldwin.cx (jobaldwi.campus.vt.edu [198.82.67.146]) by hub.freebsd.org (Postfix) with ESMTP id D83FF15877; Thu, 27 Jan 2000 14:36:47 -0800 (PST) (envelope-from jhb@FreeBSD.org) Received: from john.baldwin.cx (john [10.0.0.2]) by server.baldwin.cx (8.9.3/8.9.3) with ESMTP id RAA54160; Thu, 27 Jan 2000 17:36:45 -0500 (EST) (envelope-from jhb@FreeBSD.org) Message-Id: <200001272236.RAA54160@server.baldwin.cx> X-Mailer: XFMail 1.4.0 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: Date: Thu, 27 Jan 2000 17:36:45 -0500 (EST) From: John Baldwin To: Brian Fundakowski Feldman Subject: RE: VGA card (mis)behavior Cc: yokota@FreeBSD.org, hackers@FreeBSD.org Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On 27-Jan-00 Brian Fundakowski Feldman wrote: > This really does need to be fixed for 4.0-RELEASE. There exists the problem > where certain BIOSes will whack a VGA card out of shape, preventing > FreeBSD from recognizing the card. The proper solution is to whack it > into shape ASAP, and ASAP here would be the loader: you need to be able > to interact with the loader, and weird BIOS modes making things impossible > to read are _bad_. It's been tested for a while here, and works, setting > the card to the correct mode. What needs work is to have the right > mode for monochromatic cards set, which it isn't now. Would someone > in the know review, (fix WRT mono) and commit these diffs? It's very > important to be done. I originally got these diffs from W. Gerald Hicks. There is a way to detect monochrome or color via one of the 0x3dX registers. It's the register that tells you if the rest of the vido registers are at 0x3bX (mono) or 0x3cX (color). I can't remember which bit in which register that is though. If someone can find that out, then we can fix this properly. > -- > Brian Fundakowski Feldman \ FreeBSD: The Power to Serve! / > green@FreeBSD.org `------------------------------' > > Index: i386/libi386/vidconsole.c > =================================================================== > RCS file: /usr2/ncvs/src/sys/boot/i386/libi386/vidconsole.c,v > retrieving revision 1.12 > diff -u -r1.12 vidconsole.c > --- i386/libi386/vidconsole.c 1999/08/28 00:40:16 1.12 > +++ i386/libi386/vidconsole.c 2000/01/19 08:16:17 > @@ -42,6 +42,7 @@ > #endif > static void vidc_probe(struct console *cp); > static int vidc_init(int arg); > +static void vidc_setmode(int mode); > static void vidc_putchar(int c); > static int vidc_getchar(void); > static int vidc_ischar(void); > @@ -106,6 +107,7 @@ > if (vidc_started && arg == 0) > return; > vidc_started = 1; > + vidc_setmode(3); /* XXX - set 80x25 16 color text mode */ > #ifdef TERM_EMU > /* Init terminal emulator */ > end_term(); > @@ -117,6 +119,15 @@ > for(i = 0; i < 10 && vidc_ischar(); i++) > (void)vidc_getchar(); > return(0); /* XXX reinit? */ > +} > + > +static void > +vidc_setmode(int mode) > +{ > + v86.ctl = 0; > + v86.addr = 0x10; > + v86.eax = mode & 0xff; /* AH=0, AL=mode */ > + v86int(); > } > > static void > > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-hackers" in the body of the message -- John Baldwin -- http://www.FreeBSD.org/~jhb/ PGP Key: http://www.cslab.vt.edu/~jobaldwi/pgpkey.asc "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Thu Jan 27 15:14:42 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from smtp6.mindspring.com (smtp6.mindspring.com [207.69.200.110]) by hub.freebsd.org (Postfix) with ESMTP id C82FB14E6B; Thu, 27 Jan 2000 15:14:38 -0800 (PST) (envelope-from jhix@mindspring.com) Received: from wghicks.mindspring.com (user-33qtgvu.dialup.mindspring.com [199.174.195.254]) by smtp6.mindspring.com (8.9.3/8.8.5) with ESMTP id SAA20328; Thu, 27 Jan 2000 18:14:27 -0500 (EST) Received: from wghicks.mindspring.com (IDENT:jhix@localhost [127.0.0.1]) by wghicks.mindspring.com (8.9.3/8.9.2) with ESMTP id PAA66098; Thu, 27 Jan 2000 15:16:43 -0800 (PST) (envelope-from jhix@wghicks.mindspring.com) Message-Id: <200001272316.PAA66098@mindspring.com> To: John Baldwin Cc: Brian Fundakowski Feldman , yokota@FreeBSD.ORG, hackers@FreeBSD.ORG, dcs@FreeBSD.ORG Subject: Re: VGA card (mis)behavior In-reply-to: Your message of "Thu, 27 Jan 2000 17:36:45 EST." <200001272236.RAA54160@server.baldwin.cx> Date: Thu, 27 Jan 2000 15:16:42 -0800 From: W Gerald Hicks Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Hi Folks, (included Daniel since he had other concerns we discussed elsewhere) I haven't submitted a PR yet, pending the outcome of the discussion; since the right group of people seems to be talking about it, I'll just get out of the way :-) Cheers, Jerry Hicks jhix@mindspring.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Thu Jan 27 15:21:23 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from tetron02.tetronsoftware.com (ftp.tetronsoftware.com [208.236.46.106]) by hub.freebsd.org (Postfix) with ESMTP id EAACA158A1 for ; Thu, 27 Jan 2000 15:21:18 -0800 (PST) (envelope-from zeus@tetronsoftware.com) Received: from tetron02.tetronsoftware.com (tetron02.tetronsoftware.com [208.236.46.106]) by tetron02.tetronsoftware.com (8.9.3/8.9.3) with ESMTP id RAA00805 for ; Thu, 27 Jan 2000 17:24:46 -0600 (CST) (envelope-from zeus@tetronsoftware.com) Date: Thu, 27 Jan 2000 17:24:46 -0600 (CST) From: Gene Harris To: freebsd-hackers@freebsd.org Subject: Compiling under the linux emulator Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG I need to compile a program under the freebsd linux emulator. How do I set up an environment where make, cc, etcetera point to the emulator binaries? I am attempting to recompile the xfstt port under the linux emulator to test some stability issues. Many thanks, Gene *==============================================* *Gene Harris http://www.tetronsoftware.com* *FreeBSD Novice * *==============================================* To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Thu Jan 27 15:45:56 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from outmail.utsunomiya-u.ac.jp (outmail.utsunomiya-u.ac.jp [160.12.196.3]) by hub.freebsd.org (Postfix) with ESMTP id C6F3D15892; Thu, 27 Jan 2000 15:45:50 -0800 (PST) (envelope-from yokota@zodiac.mech.utsunomiya-u.ac.jp) Received: from zodiac.mech.utsunomiya-u.ac.jp (IDENT:CG4pTjo7RtXohkvdoGYtJBVSSbo3Ooyu@zodiac.mech.utsunomiya-u.ac.jp [160.12.42.1]) by outmail.utsunomiya-u.ac.jp (8.9.3/3.7Wpl2) with ESMTP id IAA06633; Fri, 28 Jan 2000 08:45:17 +0900 (JST) Received: from zodiac.mech.utsunomiya-u.ac.jp (zodiac.mech.utsunomiya-u.ac.jp [160.12.42.1]) by zodiac.mech.utsunomiya-u.ac.jp (8.7.6+2.6Wbeta7/3.4W/zodiac-May96) with ESMTP id IAA11592; Fri, 28 Jan 2000 08:50:55 +0900 (JST) Message-Id: <200001272350.IAA11592@zodiac.mech.utsunomiya-u.ac.jp> To: John Baldwin Cc: Brian Fundakowski Feldman , hackers@freebsd.org, yokota@zodiac.mech.utsunomiya-u.ac.jp Subject: Re: VGA card (mis)behavior In-reply-to: Your message of "Thu, 27 Jan 2000 17:36:45 EST." <200001272236.RAA54160@server.baldwin.cx> References: <200001272236.RAA54160@server.baldwin.cx> Date: Fri, 28 Jan 2000 08:50:54 +0900 From: Kazutaka YOKOTA Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG >There is a way to detect monochrome or color via one of the 0x3dX registers. >It's the register that tells you if the rest of the vido registers are at 0x3b >X >(mono) or 0x3cX (color). I can't remember which bit in which register that is >though. If someone can find that out, then we can fix this properly. The word at 0x463 in the BIOS data area tells at which I/O address the CRTC is sitting on. It's 0x3b4 for the monochrome adapter and EGA/VGA in a monochrome mode, and 0x3d4 for CGA and EGA/VGA in a color mode. So, we should try to set the mode 3 when we find 0x3d4 and the mode 7 for 0x3b4. Kazu To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Thu Jan 27 15:58:23 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from server.baldwin.cx (jobaldwi.campus.vt.edu [198.82.67.146]) by hub.freebsd.org (Postfix) with ESMTP id 0040D15853; Thu, 27 Jan 2000 15:58:17 -0800 (PST) (envelope-from jhb@FreeBSD.org) Received: from john.baldwin.cx (john [10.0.0.2]) by server.baldwin.cx (8.9.3/8.9.3) with ESMTP id SAA64004; Thu, 27 Jan 2000 18:57:58 -0500 (EST) (envelope-from jhb@FreeBSD.org) Message-Id: <200001272357.SAA64004@server.baldwin.cx> X-Mailer: XFMail 1.4.0 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: <200001272350.IAA11592@zodiac.mech.utsunomiya-u.ac.jp> Date: Thu, 27 Jan 2000 18:57:58 -0500 (EST) From: John Baldwin To: Kazutaka YOKOTA Subject: Re: VGA card (mis)behavior Cc: hackers@FreeBSD.org, Brian Fundakowski Feldman Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On 27-Jan-00 Kazutaka YOKOTA wrote: >>There is a way to detect monochrome or color via one of the 0x3dX registers. >>It's the register that tells you if the rest of the vido registers are at 0x3b >>X >>(mono) or 0x3cX (color). I can't remember which bit in which register that is >>though. If someone can find that out, then we can fix this properly. > > The word at 0x463 in the BIOS data area tells at which I/O address the > CRTC is sitting on. It's 0x3b4 for the monochrome adapter and EGA/VGA > in a monochrome mode, and 0x3d4 for CGA and EGA/VGA in a color mode. > > So, we should try to set the mode 3 when we find 0x3d4 and the mode 7 > for 0x3b4. I knew someone would know. :) I'll try to work on a patch for this tonight if I have time. Would it be ok if this was done very early on, like before the loader binary itself was started? IOW, do it in btxldr? We might also want to do it in boot1. > Kazu -- John Baldwin -- http://www.FreeBSD.org/~jhb/ PGP Key: http://www.cslab.vt.edu/~jobaldwi/pgpkey.asc "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Thu Jan 27 19:33:51 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from blaubaer.kn-bremen.de (blaubaer.kn-bremen.de [195.37.179.254]) by hub.freebsd.org (Postfix) with ESMTP id 10F53159A3 for ; Thu, 27 Jan 2000 19:33:47 -0800 (PST) (envelope-from nox@saturn.kn-bremen.de) Received: from saturn.kn-bremen.de (uucp@localhost) by blaubaer.kn-bremen.de (8.9.1/8.9.1) with UUCP id EAA30275; Fri, 28 Jan 2000 04:29:08 +0100 Received: (from nox@localhost) by saturn.kn-bremen.de (8.9.3/8.8.5) id CAA12986; Fri, 28 Jan 2000 02:59:22 +0100 (CET) From: Juergen Lock Date: Fri, 28 Jan 2000 02:59:22 +0100 To: Jeroen Ruigrok/Asmodai Cc: =?iso-8859-1?Q?Joachim_J=E4ckel?= , "freebsd-hackers@freebsd.org" Subject: Re: How to write a device-driver? Message-ID: <20000128025921.A8066@saturn.kn-bremen.de> References: <388B8724.D3B9707C@d.kamp.net> <20000125185415.C290@daemon.ninth-circle.org> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Mailer: Mutt 0.95.7i In-Reply-To: <20000125185415.C290@daemon.ninth-circle.org> Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Tue, Jan 25, 2000 at 06:54:15PM +0100, Jeroen Ruigrok/Asmodai wrote: > -On [20000124 00:00], Joachim Jäckel (Joachim.Jaeckel@d.kamp.net) wrote: > >But how get's the zoran36067_regs structure the information from the > >chip? > > If you were using newbus (on FreeBSD 4.0) I'd say bus_space_read_#() to > get the info in the registers our of your chip. > > >If I change the content of the structure, which function would change > >the registers on the chip accordingly? (Or is it done through the call > >of pci_map_mem? And is everything I change to the structure > >automatically changed on the card?) > > I have to show my lack of 2.2.x and 3.x driver programming. I am > spoiled due to 4.x. I think someone else needs to answer this. Juergen > appears to know 3.x driver programming. Oh i'm sure there are others here that know more than me! But since i see no other followup (huh?), here goes: The bus_space_* are in -stable too (and i just looked, they're even in RELENG_2_2, went in Jan 1988, sys/i386/include/bus.h), they are just not used by all drivers, most(?) simply are older. (sys/pci/es1370.c is one that uses them.) For memory mapped registers on -stable use pci_map_mem, this maps them into memory. then, since you're making a new driver, i'd access them thru the bus_space_* macros too. Whether you need a zoran36067_regs struct to mirror the register contents depends on the card, if there are no special restrictions on accessing registers then there's probably no need for it. (Or do you mean the virtual address returned by pci_map_mem? that will point to the registers themselves, accessing them thru the bus_space_* macros instead of `by hand' is just more portable, and you don't have to remember the `volatile', etc...) The `proper' way to get the first arg (tag) to the bus_space_* for memory mapped io on -stable seems to be something like this, #ifdef __i386__ #define MEM_SPACE_MAPPING I386_BUS_SPACE_MEM #endif #ifdef __alpha__ #define MEM_SPACE_MAPPING ALPHA_BUS_SPACE_MEM #endif the second arg is the virtual address (on -stable from pci_map_mem), the third is the offset... And if you want to know things like what changed in -current in some file when you only have the -stable version of it you can also use cvsweb, bus.h for example would be here: http://www.freebsd.org/cgi-bin/cvsweb.cgi/src/sys/i386/include/bus.h And now i should probably convert the cascade driver to use the bus_space_* too... :) (Note, most(?) of the above is only what i learned from looking at the source myself, if i managed to talk nonsense please someone say so...) HTH, -- Juergen Lock (remove dot foo from address to reply) To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Thu Jan 27 20:43:20 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from mgo.iij.ad.jp (mgo.iij.ad.jp [202.232.15.6]) by hub.freebsd.org (Postfix) with ESMTP id D482915968 for ; Thu, 27 Jan 2000 20:43:15 -0800 (PST) (envelope-from shigeru@iij.ad.jp) Received: from ns.iij.ad.jp (root@ns.iij.ad.jp [192.168.2.8]) by mgo.iij.ad.jp (8.8.8/MGO1.0) with ESMTP id NAA15961; Fri, 28 Jan 2000 13:43:13 +0900 (JST) Received: from fs.iij.ad.jp (root@fs.iij.ad.jp [192.168.2.9]) by ns.iij.ad.jp (8.8.5/3.5Wpl7) with ESMTP id NAA02654; Fri, 28 Jan 2000 13:43:12 +0900 (JST) Received: from mercury.iij.ad.jp (mercury.iij.ad.jp [192.168.4.89]) by fs.iij.ad.jp (8.8.5/3.5Wpl7) with ESMTP id NAA26599; Fri, 28 Jan 2000 13:43:12 +0900 (JST) Received: from localhost (localhost [127.0.0.1]) by mercury.iij.ad.jp (8.9.3/3.5W) with ESMTP id NAA10124; Fri, 28 Jan 2000 13:43:11 +0900 (JST) To: imp@village.org Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: how to allocate an alined address for a device? In-Reply-To: Your message of "Tue, 18 Jan 2000 16:15:36 -0700" <200001182315.QAA20891@harmony.village.org> References: <200001182315.QAA20891@harmony.village.org> X-Mailer: Mew version 1.93b38 on XEmacs 21.2 (Shinjuku) Mime-Version: 1.0 Content-Type: Multipart/Mixed; boundary="--Next_Part(Fri_Jan_28_13:42:12_2000_229)--" Content-Transfer-Encoding: 7bit Message-Id: <20000128134310D.shigeru@iij.ad.jp> Date: Fri, 28 Jan 2000 13:43:10 +0900 From: YAMAMOTO Shigeru X-Dispatcher: imput version 991025(IM133) Lines: 106 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG ----Next_Part(Fri_Jan_28_13:42:12_2000_229)-- Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit >>>>> "Warner" == Warner Losh writes: Warner> In a cardbus system, one would force the alignment in the card bus Warner> bridge. It would reject those things that aren't aligned in a sane Warner> manner for cardbus. It would try again to get a different range, if Warner> possible, or would reject the attempt. I think it is no good to try again to get a different range. Because, a different system has a different free address range and a device dirver can not know where is a free address range. So I change rman_reserve_resource() in @src/sys/kern/subr_rman.c for we can allocate an aligned address. My idea is using high bits of flags. RF_ALIGN_XXX in aflags specifies an alignment request and an alignment size. Bad point of my idea is that we need to use a different bit for each an alignment size. This is a patch for @src/sys/kern/subr_rman.c (rev. 1.10) and @src/sys/sys/rman.h (rev. 1.5) Is my idea good or not? Thanks, ------- YAMAMOTO Shigeru Internet Initiative Japan Inc. Network Engineering Div. ----Next_Part(Fri_Jan_28_13:42:12_2000_229)-- Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=align.diff --- kern/subr_rman.c.org Tue Nov 16 08:28:57 1999 +++ kern/subr_rman.c Thu Jan 27 02:33:03 2000 @@ -227,7 +227,17 @@ continue; } rstart = max(s->r_start, start); - rend = min(s->r_end, max(start + count, end)); + if (flags & RF_ALIGN_MASK) { + /* need to align an address */ + u_long aligned_rstart; + + aligned_rstart = (rstart & (~((u_long)(flags & RF_ALIGN_MASK)) + 1u)); + if ((rstart & (~(~((u_long)(flags & RF_ALIGN_MASK)) + 1u))) != 0) { + aligned_rstart += ((u_long)(flags & RF_ALIGN_MASK)); + } + rstart = aligned_rstart; + } + rend = min(s->r_end, max(max(start + count, end), rstart + count)); #ifdef RMAN_DEBUG printf("truncated region: [%#lx, %#lx]; size %#lx (requested %#lx)\n", rstart, rend, (rend - rstart + 1), count); --- sys/rman.h.org Mon Jan 10 08:48:52 2000 +++ sys/rman.h Thu Jan 27 02:36:51 2000 @@ -57,14 +57,33 @@ struct rman *r_rm; /* resource manager from whence this came */ }; -#define RF_ALLOCATED 0x0001 /* resource has been reserved */ -#define RF_ACTIVE 0x0002 /* resource allocation has been activated */ -#define RF_SHAREABLE 0x0004 /* resource permits contemporaneous sharing */ -#define RF_TIMESHARE 0x0008 /* resource permits time-division sharing */ -#define RF_WANTED 0x0010 /* somebody is waiting for this resource */ -#define RF_FIRSTSHARE 0x0020 /* first in sharing list */ +#define RF_ALLOCATED 0x00000001 /* resource has been reserved */ +#define RF_ACTIVE 0x00000002 /* resource allocation has been activated */ +#define RF_SHAREABLE 0x00000004 /* resource permits contemporaneous sharing */ +#define RF_TIMESHARE 0x00000008 /* resource permits time-division sharing */ +#define RF_WANTED 0x00000010 /* somebody is waiting for this resource */ +#define RF_FIRSTSHARE 0x00000020 /* first in sharing list */ -#define RF_PCCARD_ATTR 0x10000 /* PCCARD attribute memory */ +#define RF_ALIGN_4K 0x00001000 /* require 4K byte address alignment */ +#define RF_ALIGN_8K 0x00002000 /* require 8K byte address alignment */ +#define RF_ALIGN_16K 0x00004000 /* require 16K byte address alignment */ +#define RF_ALIGN_32K 0x00008000 /* require 32K byte address alignment */ +#define RF_ALIGN_64K 0x00010000 /* require 64K byte address alignment */ +#define RF_ALIGN_128K 0x00020000 /* require 128K byte address alignment */ +#define RF_ALIGN_256K 0x00040000 /* require 256K byte address alignment */ +#define RF_ALIGN_512K 0x00080000 /* require 512K byte address alignment */ +#define RF_ALIGN_1M 0x00100000 /* require 1M byte address alignment */ +#define RF_ALIGN_2M 0x00200000 /* require 2M byte address alignment */ +#define RF_ALIGN_4M 0x00400000 /* require 4M byte address alignment */ +#define RF_ALIGN_8M 0x00800000 /* require 8M byte address alignment */ +#if 0 /* XXX Is there a device which requires more large address alignment? */ +#define RF_ALIGN_16M 0x01000000 /* require 16M byte address alignment */ +#define RF_ALIGN_32M 0x02000000 /* require 32M byte address alignment */ +#define RF_ALIGN_64M 0x04000000 /* require 64M byte address alignment */ +#define RF_ALIGN_128M 0x08000000 /* require 128M byte address alignment */ +#endif +#define RF_ALIGN_MASK 0x00FFF000 /* mask for RF_ALIGN_XX */ +#define RF_PCCARD_ATTR RF_ALIGN_4K /* PCCARD attribute memory */ enum rman_type { RMAN_UNINIT = 0, RMAN_GAUGE, RMAN_ARRAY }; ----Next_Part(Fri_Jan_28_13:42:12_2000_229)---- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Thu Jan 27 22:19:51 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from outmail.utsunomiya-u.ac.jp (outmail.utsunomiya-u.ac.jp [160.12.196.3]) by hub.freebsd.org (Postfix) with ESMTP id E24AC14C41; Thu, 27 Jan 2000 22:19:40 -0800 (PST) (envelope-from yokota@zodiac.mech.utsunomiya-u.ac.jp) Received: from zodiac.mech.utsunomiya-u.ac.jp (IDENT:Azl7HI/t/oyjWSZ8hhMknigdl7SoK8+0@zodiac.mech.utsunomiya-u.ac.jp [160.12.42.1]) by outmail.utsunomiya-u.ac.jp (8.9.3/3.7Wpl2) with ESMTP id PAA10115; Fri, 28 Jan 2000 15:19:33 +0900 (JST) Received: from zodiac.mech.utsunomiya-u.ac.jp (zodiac.mech.utsunomiya-u.ac.jp [160.12.42.1]) by zodiac.mech.utsunomiya-u.ac.jp (8.7.6+2.6Wbeta7/3.4W/zodiac-May96) with ESMTP id PAA27800; Fri, 28 Jan 2000 15:25:07 +0900 (JST) Message-Id: <200001280625.PAA27800@zodiac.mech.utsunomiya-u.ac.jp> To: John Baldwin Cc: hackers@freebsd.org, Brian Fundakowski Feldman , msmith@freebsd.org, rnordier@freebsd.org, yokota@zodiac.mech.utsunomiya-u.ac.jp Subject: Setting the video mode during boot (was: Re: VGA card (mis)behavior) In-reply-to: Your message of "Thu, 27 Jan 2000 18:57:58 EST." <200001272357.SAA64004@server.baldwin.cx> References: <200001272357.SAA64004@server.baldwin.cx> Date: Fri, 28 Jan 2000 15:25:06 +0900 From: Kazutaka YOKOTA Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG >> The word at 0x463 in the BIOS data area tells at which I/O address the >> CRTC is sitting on. It's 0x3b4 for the monochrome adapter and EGA/VGA >> in a monochrome mode, and 0x3d4 for CGA and EGA/VGA in a color mode. >> >> So, we should try to set the mode 3 when we find 0x3d4 and the mode 7 >> for 0x3b4. > >I knew someone would know. :) I'll try to work on a patch for this tonight >if I have time. Would it be ok if this was done very early on, like before >the loader binary itself was started? IOW, do it in btxldr? We might also >want to do it in boot1. There probably isn't much space in boot1. While boot2 and loader(8) print string on the video adapter via BIOS, btxldr appears to assume the video card is in the text mode (whether it is mono or color) and directly goes to the text buffer address (0xb8000 for color and 0xb0000 for mono). I think we may set the video mode at the very beginning of btxldr. But, even if we cannot find space to do so in btxldr, I won't moan. Because I don't think we will loose vital information even if we don't see btxldr's banner. So, setting the video mode during boot2 or in loader(8) should be sufficient, I would expect... Kazu To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Thu Jan 27 22:30:33 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from server.baldwin.cx (jobaldwi.campus.vt.edu [198.82.67.146]) by hub.freebsd.org (Postfix) with ESMTP id 6EE3514C9C; Thu, 27 Jan 2000 22:30:22 -0800 (PST) (envelope-from jhb@FreeBSD.org) Received: from john.baldwin.cx (john [10.0.0.2]) by server.baldwin.cx (8.9.3/8.9.3) with ESMTP id BAA11680; Fri, 28 Jan 2000 01:30:13 -0500 (EST) (envelope-from jhb@FreeBSD.org) Message-Id: <200001280630.BAA11680@server.baldwin.cx> X-Mailer: XFMail 1.4.0 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: <200001280625.PAA27800@zodiac.mech.utsunomiya-u.ac.jp> Date: Fri, 28 Jan 2000 01:30:12 -0500 (EST) From: John Baldwin To: Kazutaka YOKOTA Subject: RE: Setting the video mode during boot (was: Re: VGA card (mis)b Cc: rnordier@FreeBSD.org, msmith@FreeBSD.org, Brian Fundakowski Feldman , hackers@FreeBSD.org Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On 28-Jan-00 Kazutaka YOKOTA wrote: >>> The word at 0x463 in the BIOS data area tells at which I/O address the >>> CRTC is sitting on. It's 0x3b4 for the monochrome adapter and EGA/VGA >>> in a monochrome mode, and 0x3d4 for CGA and EGA/VGA in a color mode. >>> >>> So, we should try to set the mode 3 when we find 0x3d4 and the mode 7 >>> for 0x3b4. >> >>I knew someone would know. :) I'll try to work on a patch for this tonight >>if I have time. Would it be ok if this was done very early on, like before >>the loader binary itself was started? IOW, do it in btxldr? We might also >>want to do it in boot1. > > There probably isn't much space in boot1. I think we can fit it in boot1, at least I'm going to try. Even boot2 would be before btxldr was run. IMO, here's what we should do: After we run the code to detect a serial console in boot[12], or cdldr, or the forthcoming pxeldr, if it is not a serial console, then reset the video mode to either 3 or 7 based on the word at 0x463. Then it's done at the very beginning of the process before btxldr is started. > While boot2 and loader(8) print string on the video adapter via BIOS, > btxldr appears to assume the video card is in the text mode (whether > it is mono or color) and directly goes to the text buffer address > (0xb8000 for color and 0xb0000 for mono). > > I think we may set the video mode at the very beginning of btxldr. > But, even if we cannot find space to do so in btxldr, I won't moan. > Because I don't think we will loose vital information even if we don't > see btxldr's banner. So, setting the video mode during boot2 or in > loader(8) should be sufficient, I would expect... > > Kazu -- John Baldwin -- http://www.FreeBSD.org/~jhb/ PGP Key: http://www.cslab.vt.edu/~jobaldwi/pgpkey.asc "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Thu Jan 27 23: 3:16 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from cepheus.azstarnet.com (cepheus.azstarnet.com [169.197.56.195]) by hub.freebsd.org (Postfix) with ESMTP id C663914EC8 for ; Thu, 27 Jan 2000 23:03:08 -0800 (PST) (envelope-from bobkat@azstarnet.com) Received: from atlas.tic.toc (dialup001ip015.tus.azstarnet.com [169.197.12.15]) by cepheus.azstarnet.com (8.9.3+blt.Beta0/8.9.3) with SMTP id AAA00883 for ; Fri, 28 Jan 2000 00:03:03 -0700 (MST) X-Sent-via: StarNet http://www.azstarnet.com/ From: Bob Kot To: freebsd-hackers@FreeBSD.ORG Subject: Fwd: New soundcard device driver -TurtleBeach Multisound Monterey for 3.x Date: Thu, 27 Jan 2000 23:59:53 -0700 X-Mailer: KMail [version 1.0.21] Content-Type: text/plain MIME-Version: 1.0 Message-Id: <00012800030201.01081@atlas.tic.toc> Content-Transfer-Encoding: 8bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG I offer this new driver to any and all who are interested under the GNU public license. Development was done solely on The Multisound Monterey card (because it's the one I own). The Multisound family also includes the older Classic, the later Pinnacle and Fiji. I would encourage those users to at least try this driver. No guarantees!!! This was also developed on FreeBSD 3.3-Release as I cannot abide -current as a development environment. I have had some testers report success in at least compiling/attaching this driver on 3.1-Release and 3.4-Release. So I also encourage anyone on the 3.x branch to give it a try. For info on capabilities, limitations, prospects , support and "grabbing the goods" see http://www.treefort.org/~bobkat/msm_main.shtml Driver is dual mode. Can be statically compiled into a new kernel or built as a KLD module and dynamically loaded/unloaded from a running kernel. Any and all comments / constructive criticisms / compliments welcome. Have at it. Crank up that mixer volume. Have some fun. Which other FreeBSD lists might be intersted in this notice? Bob Kot Sonoran Desert To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Thu Jan 27 23: 9:16 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from pacman.redwoodsoft.com (adsl-63-193-215-238.dsl.snfc21.pacbell.net [63.193.215.238]) by hub.freebsd.org (Postfix) with SMTP id EC16815811 for ; Thu, 27 Jan 2000 23:09:14 -0800 (PST) (envelope-from dru@redwoodsoft.com) Received: (qmail 16004 invoked from network); 28 Jan 2000 07:09:14 -0000 Received: from localhost (127.0.0.1) by localhost with SMTP; 28 Jan 2000 07:09:14 -0000 Date: Thu, 27 Jan 2000 23:09:13 -0800 (PST) From: Dru Nelson To: freebsd-hackers@freebsd.org Subject: Quanta tricks Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG During one of the BayAreaFreebsdUsersGroup meetings, Matt D. and Terry were mentioning that certain do some tricks to hold their quanta (Apache?). What are these tricks? (Just out of curiousity). Please reply to me directly, I will summarize the results to the list. Dru Nelson San Mateo, California To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Thu Jan 27 23:40:22 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from pacman.redwoodsoft.com (adsl-63-193-215-238.dsl.snfc21.pacbell.net [63.193.215.238]) by hub.freebsd.org (Postfix) with SMTP id A201D15A76 for ; Thu, 27 Jan 2000 23:40:19 -0800 (PST) (envelope-from dru@redwoodsoft.com) Received: (qmail 16023 invoked from network); 28 Jan 2000 07:40:12 -0000 Received: from localhost (127.0.0.1) by localhost with SMTP; 28 Jan 2000 07:40:12 -0000 Date: Thu, 27 Jan 2000 23:40:12 -0800 (PST) From: Dru Nelson To: freebsd-hackers@freebsd.org Subject: Proper Kernel notification to a user level process In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG What is the proper or best practice method for the kernel to notify a user level process (or processes) of an event. This event may possibly have data. The processes may or may not exist. The event is generated by some arbitrary kernel event (a counter, a call being made, etc.) Typically I have seen this done as file I/O via a device. syslogd is a program that fits this description. A special device '/dev/klog' was provided for it. What is the best practice these days? Please reply to me directly, I will summarize the results to the list. Dru Nelson San Mateo, California To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Fri Jan 28 2:16:49 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from Thingol.KryptoKom.DE (Thingol.KryptoKom.DE [194.245.91.1]) by hub.freebsd.org (Postfix) with ESMTP id DB1B8155A4 for ; Fri, 28 Jan 2000 02:16:46 -0800 (PST) (envelope-from Thomas.Klein@KryptoKom.DE) Received: (from root@localhost) by Thingol.KryptoKom.DE (8.9.1/8.9.3) id LAA25298 for ; Fri, 28 Jan 2000 11:07:10 +0100 Received: from cirdan.kryptokom.de by KryptoWall via smtpp (Version 1.2.0) id kwa25296; Fri Jan 28 11:07:08 2000 Received: from nt-notes.kryptokom.de (nt-notes.kryptokom.de [192.168.6.247]) by cirdan.kryptokom.de (8.9.3/8.9.3) with SMTP id LAA13902 for ; Fri, 28 Jan 2000 11:06:21 +0100 Received: by nt-notes.kryptokom.de(Lotus SMTP MTA v4.6.3 (733.2 10-16-1998)) id C1256874.00381109 ; Fri, 28 Jan 2000 11:12:23 +0100 X-Lotus-FromDomain: UTIMACO From: "Thomas Klein" To: freebsd-hackers@freebsd.org Message-ID: Date: Fri, 28 Jan 2000 11:12:17 +0100 Subject: how to catch a wildrunning pointer Mime-Version: 1.0 Content-type: text/plain; charset=us-ascii Content-Disposition: inline Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Hi My Problem: Within a kernel timeout routine I allocate memory and fill it with data. After a while I lock at this data again and realize that it it was modifyted (but not by me). How can I set a kernel mode watch point to that data to see which function change the data. Any Ideas ???? Regards Thomas To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Fri Jan 28 2:50:48 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from fw.wintelcom.net (ns1.wintelcom.net [209.1.153.20]) by hub.freebsd.org (Postfix) with ESMTP id 8D76C14E19 for ; Fri, 28 Jan 2000 02:50:40 -0800 (PST) (envelope-from bright@fw.wintelcom.net) Received: (from bright@localhost) by fw.wintelcom.net (8.9.3/8.9.3) id CAA15750; Fri, 28 Jan 2000 02:49:34 -0800 (PST) Date: Fri, 28 Jan 2000 02:49:34 -0800 From: Alfred Perlstein To: Thomas Klein Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: how to catch a wildrunning pointer Message-ID: <20000128024934.D7157@fw.wintelcom.net> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0.1i In-Reply-To: ; from Thomas.Klein@KryptoKom.DE on Fri, Jan 28, 2000 at 11:12:17AM +0100 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG * Thomas Klein [000128 02:42] wrote: > > > Hi > > My Problem: > Within a kernel timeout routine I allocate memory and fill it with data. > After a while I lock at this data again and realize that it it was modifyted > (but not by me). > How can I set a kernel mode watch point to that data to see which function > change the data. > > Any Ideas ???? Look at the vm code, you can probably write protect the pages while you aren't accessing them, this will cause offending code to panic the machine so you can figure out who is twiddling your bits. Of course you'll have to unprotect the memory when you want to access it for legitimate reasons. You owe the oracle a how-to on acually doing this, a paragraph or two would suffice. thanks, -Or^H^HAlfred To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Fri Jan 28 4: 7:14 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from anchor-post-30.mail.demon.net (anchor-post-30.mail.demon.net [194.217.242.88]) by hub.freebsd.org (Postfix) with ESMTP id 7224114DCD for ; Fri, 28 Jan 2000 04:06:59 -0800 (PST) (envelope-from dfr@nlsystems.com) Received: from nlsys.demon.co.uk ([158.152.125.33] helo=herring.nlsystems.com) by anchor-post-30.mail.demon.net with esmtp (Exim 2.12 #1) id 12E8fC-0009r5-0U; Fri, 28 Jan 2000 10:30:02 +0000 Received: from salmon.nlsystems.com (salmon.nlsystems.com [10.0.0.3]) by herring.nlsystems.com (8.9.3/8.8.8) with ESMTP id KAA10785; Fri, 28 Jan 2000 10:32:50 GMT (envelope-from dfr@nlsystems.com) Date: Fri, 28 Jan 2000 10:28:44 +0000 (GMT) From: Doug Rabson To: YAMAMOTO Shigeru Cc: imp@village.org, freebsd-hackers@freebsd.org Subject: Re: how to allocate an alined address for a device? In-Reply-To: <20000128134310D.shigeru@iij.ad.jp> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Fri, 28 Jan 2000, YAMAMOTO Shigeru wrote: > > >>>>> "Warner" == Warner Losh writes: > Warner> In a cardbus system, one would force the alignment in the card bus > Warner> bridge. It would reject those things that aren't aligned in a sane > Warner> manner for cardbus. It would try again to get a different range, if > Warner> possible, or would reject the attempt. > > I think it is no good to try again to get a different range. > Because, a different system has a different free address range and a device > dirver can not know where is a free address range. > > So I change rman_reserve_resource() in @src/sys/kern/subr_rman.c for we can > allocate an aligned address. > > My idea is using high bits of flags. > RF_ALIGN_XXX in aflags specifies an alignment request and an alignment > size. > Bad point of my idea is that we need to use a different bit for each an > alignment size. > > This is a patch for @src/sys/kern/subr_rman.c (rev. 1.10) and > @src/sys/sys/rman.h (rev. 1.5) > > Is my idea good or not? I'm uneasy about using the flags for this since I'm vaguely reserving the upper 16 bits of flags for bus-specific purposes (although I haven't formalised this). For allocating aligned regions with pnp, I simply looped in the caller trying each specific range until one was free (see isa_find_port() in isa_common.c). This is ugly but it does work. In the long run, I think we need either an extra parameter to rman_reserve_resource() or a new api rman_reserve_resource_aligned(). This also implies changing the method BUS_ALLOC_RESOURCE() or adding BUS_ALLOC_RESOURCE_ALIGNED(). -- Doug Rabson Mail: dfr@nlsystems.com Nonlinear Systems Ltd. Phone: +44 181 442 9037 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Fri Jan 28 4:29:56 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from fw.wintelcom.net (ns1.wintelcom.net [209.1.153.20]) by hub.freebsd.org (Postfix) with ESMTP id 5A14715AC4 for ; Fri, 28 Jan 2000 04:29:51 -0800 (PST) (envelope-from bright@fw.wintelcom.net) Received: (from bright@localhost) by fw.wintelcom.net (8.9.3/8.9.3) id EAA18660 for hackers@freebsd.org; Fri, 28 Jan 2000 04:54:40 -0800 (PST) Date: Fri, 28 Jan 2000 04:54:40 -0800 From: Alfred Perlstein To: hackers@freebsd.org Subject: downed IP addresses/redundancy Message-ID: <20000128045440.F7157@fw.wintelcom.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0.1i Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG This is an idea I had to help people provide for reduntant servers. Many programs will bind to all interfaces to serve requests, however sometimes it's important that a service only appear on a single IP or interface. However you'd really like the server to be able to bind to 2 IP addresses, one that you're serving for and another in case your sister server goes down. My idea is that you'd be able to ifconfig an IP to an interface but leave the IP 'deactivated', when another server goes down you can activate the IP address so that it will now take incomming requests. A 'hack' way of doing this would be to use IPFW and only add the extra IP after firewalling it off, when it'd needed then remove the block on the IP address. Does anyone particularly like/hate this idea? Just wanted to share, and possibly get better suggestions. The main problem I see is that now you have to hack around with routing otherwise you can't talk to the machine who's IP you're holding for replacement. thanks, -- -Alfred Perlstein - [bright@wintelcom.net|alfred@freebsd.org] To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Fri Jan 28 7:17:54 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from primary.rci.net (mail.rci.net [209.251.132.252]) by hub.freebsd.org (Postfix) with ESMTP id CC72E15B4D for ; Fri, 28 Jan 2000 07:17:46 -0800 (PST) (envelope-from jar@rci.net) Received: from rci.net (168.p1.dialup.gru.net [198.190.223.168]) by primary.rci.net (8.9.3/8.9.3) with ESMTP id KAA17776; Fri, 28 Jan 2000 10:17:30 -0500 (EST) (envelope-from jar@rci.net) Message-ID: <3891B307.620A684F@rci.net> Date: Fri, 28 Jan 2000 10:17:27 -0500 From: Jack Rusher Organization: Integratus, Inc. X-Mailer: Mozilla 4.7 [en] (X11; I; Linux 2.0.36 i386) X-Accept-Language: en MIME-Version: 1.0 To: Alfred Perlstein , hackers@FreeBSD.ORG Subject: Re: downed IP addresses/redundancy References: <20000128045440.F7157@fw.wintelcom.net> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Alfred Perlstein wrote: > > Does anyone particularly like/hate this idea? Just wanted to > share, and possibly get better suggestions. I usually do that like this: HostA -> Address1, Alias1 HostB -> Address2 ...where Host A and Host B talk to each other through the pair of "real" addresses, while the service network uses the address referred to above as "alias 1". When Host A goes away, Host B does an ifconfig alias to bring up the service net address on Host B. We just completed a full n-way local and wide area application level failover product that runs under FreeBSD 3.x. It does a lot of this for you, including maintaining heartbeat links, starting and stopping services, and the rest of the stuff you would expect from such a beast. Oh, and it runs cross platform; you can fail an Apache (or whatever) instance between Solaris, Linux and FreeBSD. Go check out the press release at the URL below. Yours, -- Jack Rusher, Chief Engineer | mailto:jar@integratus.com Integratus, Inc. | http://www.integratus.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Fri Jan 28 10: 2: 6 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from lodge.guild.ab.ca (lodge.guild.ab.ca [209.91.118.66]) by hub.freebsd.org (Postfix) with ESMTP id D4CE614C08 for ; Fri, 28 Jan 2000 10:02:02 -0800 (PST) (envelope-from davidc@lodge.guild.ab.ca) Received: from localhost (davidc@localhost) by lodge.guild.ab.ca (8.9.3/8.9.3) with ESMTP id SAA73275 for ; Thu, 27 Jan 2000 18:53:42 -0700 (MST) (envelope-from davidc@lodge.guild.ab.ca) Date: Thu, 27 Jan 2000 18:53:42 -0700 (MST) From: Chad David To: freebsd-hackers@freebsd.org Subject: java -> ld-elf.so.1: assert failed: ... lockdflt.c:55 Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Since the ~Jan 25 I have been getting an error while running any java programs on 3.4-stable. I cvsup'd,and ran a make world this afternoon and it still fails. It doesn't always hit... about 50% of the time. The errors is: ld-elf.so.1: assert failed: /usr/src/libexec/rtld-elf/lockdflt.c:55 over and over and over... I can only kill the java process with -9. The process memory usage just climbs until it reaches about three times its normal size, and then it just freezes (no more assert failed messages) with 99% CPU util. The machine is: FreeBSD stronghold.guild.ab.ca 3.4-STABLE FreeBSD 3.4-STABLE #0: Thu Jan 27 17:04:43 MST 2000 root@stronghold.guild.ab.ca:/usr/src/sys/compile/STRONGHOLD i386 Copyright (c) 1992-1999 FreeBSD Inc. Copyright (c) 1982, 1986, 1989, 1991, 1993 The Regents of the University of California. All rights reserved. FreeBSD 3.4-STABLE #0: Thu Jan 27 17:04:43 MST 2000 root@stronghold.guild.ab.ca:/usr/src/sys/compile/STRONGHOLD Timecounter "i8254" frequency 1193182 Hz CPU: Pentium III (501.14-MHz 686-class CPU) Origin = "GenuineIntel" Id = 0x672 Stepping = 2 Features=0x387f9ff,MMX,FXSR,> real memory = 134217728 (131072K bytes) avail memory = 127115264 (124136K bytes) Preloaded elf kernel "kernel" at 0xc034b000. Pentium Pro MTRR support enabled I haven't submitted this to -java as I am not subscribed, and the error doesn't seem to be directly java related; that is, should any process cause an assertion to fail in ld? I am about to move to -current, and the problem does not exist on any of our current boxes (this is my only stable box left), so I don't really have a reason to spend much time on it, but I thought I would throw it out and see if anybody bit. If any other information would be helpful let me know; otherwise, I know what I will be doing tomorrow afternoon. Thanks Chad To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Fri Jan 28 10:27:35 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from wall.polstra.com (rtrwan160.accessone.com [206.213.115.74]) by hub.freebsd.org (Postfix) with ESMTP id 40FB014F6F for ; Fri, 28 Jan 2000 10:27:31 -0800 (PST) (envelope-from jdp@polstra.com) Received: from vashon.polstra.com (vashon.polstra.com [206.213.73.13]) by wall.polstra.com (8.9.3/8.9.3) with ESMTP id KAA05580; Fri, 28 Jan 2000 10:27:30 -0800 (PST) (envelope-from jdp@polstra.com) From: John Polstra Received: (from jdp@localhost) by vashon.polstra.com (8.9.3/8.9.1) id KAA05467; Fri, 28 Jan 2000 10:27:29 -0800 (PST) (envelope-from jdp@polstra.com) Date: Fri, 28 Jan 2000 10:27:29 -0800 (PST) Message-Id: <200001281827.KAA05467@vashon.polstra.com> To: davidc@guild.ab.ca Subject: Re: java -> ld-elf.so.1: assert failed: ... lockdflt.c:55 In-Reply-To: References: Organization: Polstra & Co., Seattle, WA Cc: hackers@freebsd.org Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG In article , Chad David wrote: > > Since the ~Jan 25 I have been getting an error while > running any java programs on 3.4-stable. I cvsup'd,and > ran a make world this afternoon and it still fails. It doesn't > always hit... about 50% of the time. > > The errors is: > > ld-elf.so.1: assert failed: /usr/src/libexec/rtld-elf/lockdflt.c:55 [...] > FreeBSD stronghold.guild.ab.ca 3.4-STABLE FreeBSD 3.4-STABLE #0: Thu Jan > 27 17:04:43 MST 2000 I believe I fixed this one in -current 3 days ago, but I haven't merged it into -stable yet. I would appreciate it if you would try the patch below and let me know whether it clears up the problem for you. John Index: lockdflt.c =================================================================== RCS file: /home/ncvs/src/libexec/rtld-elf/lockdflt.c,v retrieving revision 1.3.2.1 diff -u -r1.3.2.1 lockdflt.c --- lockdflt.c 2000/01/21 02:31:50 1.3.2.1 +++ lockdflt.c 2000/01/28 18:25:01 @@ -28,10 +28,9 @@ /* * Default thread locking implementation for the dynamic linker. It * is used until the client registers a different implementation with - * dllockinit(). The default implementation does mutual exclusion - * by blocking the SIGVTALRM, SIGPROF, and SIGALRM signals. This is - * based on the observation that most userland thread packages use one - * of these signals to support preemption. + * dllockinit(). The default implementation does mutual exclusion by + * blocking almost all signals. This is based on the observation that + * most userland thread packages use signals to support preemption. */ #include @@ -63,10 +62,13 @@ l = NEW(LockDflt); l->depth = 0; - sigemptyset(&l->lock_mask); - sigaddset(&l->lock_mask, SIGVTALRM); - sigaddset(&l->lock_mask, SIGPROF); - sigaddset(&l->lock_mask, SIGALRM); + sigfillset(&l->lock_mask); + sigdelset(&l->lock_mask, SIGTRAP); + sigdelset(&l->lock_mask, SIGABRT); + sigdelset(&l->lock_mask, SIGBUS); + sigdelset(&l->lock_mask, SIGSEGV); + sigdelset(&l->lock_mask, SIGKILL); + sigdelset(&l->lock_mask, SIGSTOP); return l; } To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Fri Jan 28 10:31:16 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from maybe.csap.af.mil (mudd.csap.af.mil [192.203.1.250]) by hub.freebsd.org (Postfix) with SMTP id 2E73D15559 for ; Fri, 28 Jan 2000 10:30:56 -0800 (PST) (envelope-from leopold@mailcenter.csap.af.mil) Received: from raider.csap.af.mil(really [192.168.70.17]) by maybe.csap.af.mil via sendmail with esmtp id for ; Fri, 28 Jan 2000 12:30:53 -0600 (CST) (Smail-3.2 1996-Jul-4 #5 built 1999-Sep-4) Content-Length: 1033 X-Mailer: XFMail 1.3.1 [p0] on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 Date: Fri, 28 Jan 2000 12:30:45 -0600 (CST) From: Corey Leopold To: hackers@freebsd.org Subject: SMP + Dual port Intel PRO/100+ Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG -----BEGIN PGP SIGNED MESSAGE----- I was wondering if anybody has had problems with the dual port Intel PRO/100+ cards with a multi-processor kernel. We are getting device timeouts when booted into a SMP kernel. Things we have tried.... The card works fine with a single processor kernel... Reboot to a kernel with only the SMP added and it doesn't work. Two single Intel PRO/100+ cards work fine with SMP and also without. If anyone can give me any ideas on how else to debug this it would be appreciated. Thanks Corey - ---------------------------------- Corey Leopold E-Mail: Corey Leopold Phone (210)-925-3459 - ---------------------------------- -----BEGIN PGP SIGNATURE----- Version: PGPfreeware 5.0i for non-commercial use Charset: noconv iQCVAwUBOJHSRT3+cS8MmLXZAQGL4gP/WLjinqUCxlWlDM+Wc17Va+WSseXQkPU3 zmUgsvoAIq4dlHc3/g/gr7jfAxshuh1Cqx7olrMp33nFodMyVK8VSfxbgLsdbdlL 56iUcIc1jAmGJLkjFv+SR2OLN0tOtkvPO4PXPl/fGSuethDcIUTje69zxvu57HOn oWXNdZKBWgU= =16wF -----END PGP SIGNATURE----- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Fri Jan 28 10:40:18 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from sasami.jurai.net (sasami.jurai.net [63.67.141.99]) by hub.freebsd.org (Postfix) with ESMTP id BDD0714D31 for ; Fri, 28 Jan 2000 10:40:14 -0800 (PST) (envelope-from winter@jurai.net) Received: from localhost (winter@localhost) by sasami.jurai.net (8.9.3/8.8.7) with ESMTP id NAA22840; Fri, 28 Jan 2000 13:40:12 -0500 (EST) Date: Fri, 28 Jan 2000 13:40:11 -0500 (EST) From: "Matthew N. Dodd" To: Corey Leopold Cc: hackers@FreeBSD.ORG Subject: Re: SMP + Dual port Intel PRO/100+ In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Fri, 28 Jan 2000, Corey Leopold wrote: > I was wondering if anybody has had problems with the dual port Intel > PRO/100+ cards with a multi-processor kernel. We are getting device > timeouts when booted into a SMP kernel. Programming 24 pins in IOAPIC #0 FreeBSD/SMP: Multiprocessor motherboard cpu0 (BSP): apic id: 0, version: 0x00030010, at 0xfee00000 cpu1 (AP): apic id: 1, version: 0x00030010, at 0xfee00000 io0 (APIC): apic id: 2, version: 0x00170011, at 0xfec00000 ... fxp0: rev 0x05 int a irq 19 on pci2.4.0 fxp0: Ethernet address 00:08:c7:45:f4:e3 fxp1: rev 0x05 int a irq 16 on pci2.5.0 fxp1: Ethernet address 00:08:c7:45:f4:e4 ... FreeBSD sasami.jurai.net 3.4-STABLE FreeBSD 3.4-STABLE #3: Tue Jan 4 16:43:36 EST 2000 winter@sasami.jurai.net:/usr/src/sys/compile/SASAMI i386 Sounds like your system isn't setting up the PCI-PCI bridge correctly when its in MP mode. Is there an MP version setting in the BIOS you can change? Are you running the latest BIOS? What board are you using? Processors? What is the exact error message? -- | Matthew N. Dodd | '78 Datsun 280Z | '75 Volvo 164E | FreeBSD/NetBSD | | winter@jurai.net | 2 x '84 Volvo 245DL | ix86,sparc,pmax | | http://www.jurai.net/~winter | This Space For Rent | ISO8802.5 4ever | To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Fri Jan 28 11:20:11 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from lodge.guild.ab.ca (lodge.guild.ab.ca [209.91.118.66]) by hub.freebsd.org (Postfix) with ESMTP id 26A5515A47 for ; Fri, 28 Jan 2000 11:20:08 -0800 (PST) (envelope-from davidc@lodge.guild.ab.ca) Received: from localhost (davidc@localhost) by lodge.guild.ab.ca (8.9.3/8.9.3) with ESMTP id MAA75462; Fri, 28 Jan 2000 12:20:27 -0700 (MST) (envelope-from davidc@lodge.guild.ab.ca) Date: Fri, 28 Jan 2000 12:20:26 -0700 (MST) From: Chad David To: John Polstra Cc: hackers@freebsd.org Subject: Re: java -> ld-elf.so.1: assert failed: ... lockdflt.c:55 In-Reply-To: <200001281827.KAA05467@vashon.polstra.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Yes this fixed it. Thanks. Chad On Fri, 28 Jan 2000, John Polstra wrote: > In article , > Chad David wrote: > > > > Since the ~Jan 25 I have been getting an error while > > running any java programs on 3.4-stable. I cvsup'd,and > > ran a make world this afternoon and it still fails. It doesn't > > always hit... about 50% of the time. > > > > The errors is: > > > > ld-elf.so.1: assert failed: /usr/src/libexec/rtld-elf/lockdflt.c:55 > [...] > > FreeBSD stronghold.guild.ab.ca 3.4-STABLE FreeBSD 3.4-STABLE #0: Thu Jan > > 27 17:04:43 MST 2000 > > I believe I fixed this one in -current 3 days ago, but I haven't > merged it into -stable yet. I would appreciate it if you would try > the patch below and let me know whether it clears up the problem for > you. > > John > > Index: lockdflt.c > =================================================================== > RCS file: /home/ncvs/src/libexec/rtld-elf/lockdflt.c,v > retrieving revision 1.3.2.1 > diff -u -r1.3.2.1 lockdflt.c > --- lockdflt.c 2000/01/21 02:31:50 1.3.2.1 > +++ lockdflt.c 2000/01/28 18:25:01 > @@ -28,10 +28,9 @@ > /* > * Default thread locking implementation for the dynamic linker. It > * is used until the client registers a different implementation with > - * dllockinit(). The default implementation does mutual exclusion > - * by blocking the SIGVTALRM, SIGPROF, and SIGALRM signals. This is > - * based on the observation that most userland thread packages use one > - * of these signals to support preemption. > + * dllockinit(). The default implementation does mutual exclusion by > + * blocking almost all signals. This is based on the observation that > + * most userland thread packages use signals to support preemption. > */ > > #include > @@ -63,10 +62,13 @@ > > l = NEW(LockDflt); > l->depth = 0; > - sigemptyset(&l->lock_mask); > - sigaddset(&l->lock_mask, SIGVTALRM); > - sigaddset(&l->lock_mask, SIGPROF); > - sigaddset(&l->lock_mask, SIGALRM); > + sigfillset(&l->lock_mask); > + sigdelset(&l->lock_mask, SIGTRAP); > + sigdelset(&l->lock_mask, SIGABRT); > + sigdelset(&l->lock_mask, SIGBUS); > + sigdelset(&l->lock_mask, SIGSEGV); > + sigdelset(&l->lock_mask, SIGKILL); > + sigdelset(&l->lock_mask, SIGSTOP); > return l; > } > > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Fri Jan 28 11:29:28 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from wall.polstra.com (rtrwan160.accessone.com [206.213.115.74]) by hub.freebsd.org (Postfix) with ESMTP id AF19D15B82 for ; Fri, 28 Jan 2000 11:29:25 -0800 (PST) (envelope-from jdp@polstra.com) Received: from vashon.polstra.com (vashon.polstra.com [206.213.73.13]) by wall.polstra.com (8.9.3/8.9.3) with ESMTP id LAA05776; Fri, 28 Jan 2000 11:29:24 -0800 (PST) (envelope-from jdp@polstra.com) From: John Polstra Received: (from jdp@localhost) by vashon.polstra.com (8.9.3/8.9.1) id LAA05765; Fri, 28 Jan 2000 11:29:24 -0800 (PST) (envelope-from jdp@polstra.com) Date: Fri, 28 Jan 2000 11:29:24 -0800 (PST) Message-Id: <200001281929.LAA05765@vashon.polstra.com> To: davidc@guild.ab.ca Subject: Re: java -> ld-elf.so.1: assert failed: ... lockdflt.c:55 In-Reply-To: References: Organization: Polstra & Co., Seattle, WA Cc: hackers@freebsd.org Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG In article , Chad David wrote: > > Yes this fixed it. Thanks. Thanks for testing it. I have merged the fix into -stable now. John -- John Polstra jdp@polstra.com John D. Polstra & Co., Inc. Seattle, Washington USA "Disappointment is a good sign of basic intelligence." -- Chögyam Trungpa To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Fri Jan 28 11:39:44 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from fw.wintelcom.net (ns1.wintelcom.net [209.1.153.20]) by hub.freebsd.org (Postfix) with ESMTP id 8025115CFA for ; Fri, 28 Jan 2000 11:39:29 -0800 (PST) (envelope-from bright@fw.wintelcom.net) Received: (from bright@localhost) by fw.wintelcom.net (8.9.3/8.9.3) id MAA28291; Fri, 28 Jan 2000 12:04:10 -0800 (PST) Date: Fri, 28 Jan 2000 12:04:10 -0800 From: Alfred Perlstein To: Jack Rusher Cc: hackers@FreeBSD.ORG Subject: Re: downed IP addresses/redundancy Message-ID: <20000128120410.G7157@fw.wintelcom.net> References: <20000128045440.F7157@fw.wintelcom.net> <3891B307.620A684F@rci.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0.1i In-Reply-To: <3891B307.620A684F@rci.net>; from jar@rci.net on Fri, Jan 28, 2000 at 10:17:27AM -0500 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG * Jack Rusher [000128 07:42] wrote: > Alfred Perlstein wrote: > > > > Does anyone particularly like/hate this idea? Just wanted to > > share, and possibly get better suggestions. > > I usually do that like this: > > HostA -> Address1, Alias1 > HostB -> Address2 > > ...where Host A and Host B talk to each other through the pair of > "real" addresses, while the service network uses the address referred > to above as "alias 1". When Host A goes away, Host B does an > ifconfig alias to bring up the service net address on > Host B. > > We just completed a full n-way local and wide area application > level failover product that runs under FreeBSD 3.x. It does a lot of > this for you, including maintaining heartbeat links, starting and > stopping services, and the rest of the stuff you would expect from > such a beast. Oh, and it runs cross platform; you can fail an Apache > (or whatever) instance between Solaris, Linux and FreeBSD. Go check > out the press release at the URL below. Definetly a cool product, still the problem is that if you tell a daemon to bind to a particular IP address, let's take this scenario: You have multiple customers on two boxes, each customer gets 2 IP address and you lolad balance between the two. Some customers may wish to run thier own sql servers, they should only bind to the IP address on each machine that they own. Once you tell an application to bind to a particular IP address I'm pretty sure most don't have an option to bind another listen socket. The customer can't fail over properly because even when the alias for the box that dies comes up, thier daemon won't get requests on the added IP. -- -Alfred Perlstein - [bright@wintelcom.net|alfred@freebsd.org] To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Fri Jan 28 12:15:49 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from maybe.csap.af.mil (mudd.csap.af.mil [192.203.1.250]) by hub.freebsd.org (Postfix) with SMTP id BCD4415BF4 for ; Fri, 28 Jan 2000 12:15:19 -0800 (PST) (envelope-from leopold@mailcenter.csap.af.mil) Received: from raider.csap.af.mil(really [192.168.70.17]) by maybe.csap.af.mil via sendmail with esmtp id for ; Fri, 28 Jan 2000 14:15:14 -0600 (CST) (Smail-3.2 1996-Jul-4 #5 built 1999-Sep-4) Message-Id: Content-Length: 1991 X-Mailer: XFMail 1.3.1 [p0] on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: Date: Fri, 28 Jan 2000 14:15:06 -0600 (CST) From: Corey Leopold To: "Matthew N. Dodd" Subject: Re: SMP + Dual port Intel PRO/100+ Cc: hackers@FreeBSD.ORG Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG -----BEGIN PGP SIGNED MESSAGE----- On 28-Jan-00 Matthew N. Dodd wrote: > ... > > FreeBSD sasami.jurai.net 3.4-STABLE FreeBSD 3.4-STABLE #3: Tue Jan 4 > 16:43:36 EST 2000 winter@sasami.jurai.net:/usr/src/sys/compile/SASAMI > i386 > > Sounds like your system isn't setting up the PCI-PCI bridge correctly when > its in MP mode. Is there an MP version setting in the BIOS you can > change? Are you running the latest BIOS? Couldn't find any such setting, Just upgraded to the latest bios no change... System stats Dell Precision Workstation 610 Processors 2 X 550Mhz ZEON Ram 256Meg Bios ver A09 (just changed from A08) Service Tag 5CLDU I'm not sure who dell had make the motherboard. Programming 24 pins in IOAPIC #0 FreeBSD/SMP: Multiprocessor motherboard cpu0 (BSP): apic id: 0, version: 0x00040011, at 0xfee00000 cpu1 (AP): apic id: 1, version: 0x00040011, at 0xfee00000 io0 (APIC): apic id: 2, version: 0x00170011, at 0xfec00000 Probing for devices on PCI bus 2: fxp0: rev 0x05 int a irq 11 on pci2.4.0 fxp0: Ethernet address 00:90:27:f0:9d:96 fxp1: rev 0x05 int a irq 15 on pci2.5.0 fxp1: Ethernet address 00:90:27:f0:9d:97 FreeBSD abs 3.4-RELEASE FreeBSD 3.4-RELEASE #2: Thu Jan 27 15:22:25 CST 2000 root@abs:/usr/src/sys/compile/ABS i386 And finally the error fxp0: device timeout With no response from the network. Thanks again Corey - ---------------------------------- Corey Leopold E-Mail: Corey Leopold Phone (210)-925-3459 - ---------------------------------- -----BEGIN PGP SIGNATURE----- Version: PGPfreeware 5.0i for non-commercial use Charset: noconv iQCVAwUBOJHquj3+cS8MmLXZAQGwmAP+IuAwNUZTUQ4KCAxhbk5aC/Mqn8l2dhkL V0cjQ4Rs6AAzR+p1B9x/JZ5sfVum60T/26sFGYQFk+OL4NAb2Go0raSf7pQMVRu2 YgGMvZbRUr7Rrf1E6AJItdMgC9toMcjjjS6ge5LLmbc6+Fjx7nfLMXl0h6sJVjFQ Rarcf3Vfmfc= =W4lR -----END PGP SIGNATURE----- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Fri Jan 28 12:23:55 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from sasami.jurai.net (sasami.jurai.net [63.67.141.99]) by hub.freebsd.org (Postfix) with ESMTP id 807B015A47 for ; Fri, 28 Jan 2000 12:23:51 -0800 (PST) (envelope-from winter@jurai.net) Received: from localhost (winter@localhost) by sasami.jurai.net (8.9.3/8.8.7) with ESMTP id PAA24599; Fri, 28 Jan 2000 15:23:46 -0500 (EST) Date: Fri, 28 Jan 2000 15:23:46 -0500 (EST) From: "Matthew N. Dodd" To: Corey Leopold Cc: hackers@FreeBSD.ORG Subject: Re: SMP + Dual port Intel PRO/100+ In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Fri, 28 Jan 2000, Corey Leopold wrote: ... > FreeBSD abs 3.4-RELEASE FreeBSD 3.4-RELEASE #2: Thu Jan 27 15:22:25 CST 2000 > root@abs:/usr/src/sys/compile/ABS i386 > > And finally the error > > fxp0: device timeout > > With no response from the network. What is the board connected to? Hub? Switch? Can you specify media settings manually? -- | Matthew N. Dodd | '78 Datsun 280Z | '75 Volvo 164E | FreeBSD/NetBSD | | winter@jurai.net | 2 x '84 Volvo 245DL | ix86,sparc,pmax | | http://www.jurai.net/~winter | This Space For Rent | ISO8802.5 4ever | To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Fri Jan 28 13: 7:18 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from maybe.csap.af.mil (mudd.csap.af.mil [192.203.1.250]) by hub.freebsd.org (Postfix) with SMTP id 0129014D08 for ; Fri, 28 Jan 2000 13:07:04 -0800 (PST) (envelope-from leopold@mailcenter.csap.af.mil) Received: from raider.csap.af.mil(really [192.168.70.17]) by maybe.csap.af.mil via sendmail with esmtp id for ; Fri, 28 Jan 2000 15:07:02 -0600 (CST) (Smail-3.2 1996-Jul-4 #5 built 1999-Sep-4) Message-Id: Content-Length: 1288 X-Mailer: XFMail 1.3.1 [p0] on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: Date: Fri, 28 Jan 2000 15:06:54 -0600 (CST) From: Corey Leopold To: "Matthew N. Dodd" Subject: Re: SMP + Dual port Intel PRO/100+ Cc: hackers@FreeBSD.ORG Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG -----BEGIN PGP SIGNED MESSAGE----- On 28-Jan-00 Matthew N. Dodd wrote: > On Fri, 28 Jan 2000, Corey Leopold wrote: > ... > > What is the board connected to? Hub? Switch? Can you specify media > settings manually? > I've had it on a cross-over cable with a 100MB sparc on the other end, and also a 100MB Cisco Hub. Specifing the media settings doesn't change things. Also autoselect selects right (eg. 100baseTX full-duplex with the cross-over, and 100baseTX half-duplex with the hub.) I also tried 10baseT/UTP settings these don't work either. If I run tcpdump I can see arp traffic going out from the machine but I never see any other traffic. If I couldn't just boot into a single processor kernel and it worked, I would suspect that it is a bad cable. Thanks Corey - ---------------------------------- Corey Leopold E-Mail: Corey Leopold Phone (210)-925-3459 - ---------------------------------- -----BEGIN PGP SIGNATURE----- Version: PGPfreeware 5.0i for non-commercial use Charset: noconv iQCVAwUBOJH23T3+cS8MmLXZAQEqDAP/cZAGVvXX5Jh5l6mPcXceGRmLu0P9vQvH 623nNV3LDwAZwCwxNqfQyI6AGg6D7yeNZqY5SAa67jc35PONViiRbf55aVo0LFj/ /7ltw14uxAwcemnY+d+OzgaXf+fsOzw97AddhAzM8D1u+WZJA4va2lJgzcLhc42b qSqkYNtrt8U= =B2JB -----END PGP SIGNATURE----- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Fri Jan 28 13:10:45 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from sasami.jurai.net (sasami.jurai.net [63.67.141.99]) by hub.freebsd.org (Postfix) with ESMTP id EBD9714DC0 for ; Fri, 28 Jan 2000 13:10:41 -0800 (PST) (envelope-from winter@jurai.net) Received: from localhost (winter@localhost) by sasami.jurai.net (8.9.3/8.8.7) with ESMTP id QAA25194; Fri, 28 Jan 2000 16:10:39 -0500 (EST) Date: Fri, 28 Jan 2000 16:10:39 -0500 (EST) From: "Matthew N. Dodd" To: Corey Leopold Cc: hackers@FreeBSD.ORG Subject: Re: SMP + Dual port Intel PRO/100+ In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Fri, 28 Jan 2000, Corey Leopold wrote: > If I couldn't just boot into a single processor kernel and it worked, I would > suspect that it is a bad cable. You might want to take the output of 'mptable' to -smp and ask there. Something isn't being setup correctly with regard to the PCI-PCI bridge on that card. -- | Matthew N. Dodd | '78 Datsun 280Z | '75 Volvo 164E | FreeBSD/NetBSD | | winter@jurai.net | 2 x '84 Volvo 245DL | ix86,sparc,pmax | | http://www.jurai.net/~winter | This Space For Rent | ISO8802.5 4ever | To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Fri Jan 28 14:36:16 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from hurricane.columbus.rr.com (m5.columbus.rr.com [204.210.252.249]) by hub.freebsd.org (Postfix) with ESMTP id 8CADD15CE5; Fri, 28 Jan 2000 14:36:12 -0800 (PST) (envelope-from caa@columbus.rr.com) Received: from columbus.rr.com ([24.95.60.151]) by hurricane.columbus.rr.com (Post.Office MTA v3.5.3 release 223 ID# 0-53939U80000L80000S0V35) with ESMTP id com; Fri, 28 Jan 2000 17:36:09 -0500 Received: (from caa@localhost) by columbus.rr.com (8.9.3/8.9.3) id RAA57497; Fri, 28 Jan 2000 17:36:08 -0500 (EST) (envelope-from caa) Date: Fri, 28 Jan 2000 17:36:08 -0500 From: "Charles Anderson" To: Gene Harris Cc: freebsd-hackers@FreeBSD.ORG, FreeBSD Emulation ML Subject: Re: Compiling under the linux emulator Message-ID: <20000128173608.B98463@midgard.dhs.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0i In-Reply-To: ; from zeus@tetronsoftware.com on Thu, Jan 27, 2000 at 05:24:46PM -0600 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG I was looking for this same info a while back, didn't find it in my search of the archives, please let me know if you have any success. thanks, -Charlie (compiled but not linked) On Thu, Jan 27, 2000 at 05:24:46PM -0600, Gene Harris wrote: > I need to compile a program under the freebsd linux > emulator. How do I set up an environment where make, > cc, etcetera point to the emulator binaries? > > I am attempting to recompile the xfstt port under the linux > emulator to test some stability issues. -- Charles Anderson caa@columbus.rr.com No quote, no nothin' To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Fri Jan 28 14:41:10 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from primary.rci.net (mail.rci.net [209.251.132.252]) by hub.freebsd.org (Postfix) with ESMTP id 5458C15C63 for ; Fri, 28 Jan 2000 14:39:56 -0800 (PST) (envelope-from jar@rci.net) Received: from rci.net (168.p1.dialup.gru.net [198.190.223.168]) by primary.rci.net (8.9.3/8.9.3) with ESMTP id RAA19637; Fri, 28 Jan 2000 17:39:32 -0500 (EST) (envelope-from jar@rci.net) Message-ID: <38921AA3.E4E9A3B3@rci.net> Date: Fri, 28 Jan 2000 17:39:31 -0500 From: Jack Rusher Organization: Integratus, Inc. X-Mailer: Mozilla 4.7 [en] (X11; I; Linux 2.0.36 i386) X-Accept-Language: en MIME-Version: 1.0 To: Alfred Perlstein Cc: hackers@FreeBSD.ORG Subject: Re: downed IP addresses/redundancy References: <20000128045440.F7157@fw.wintelcom.net> <3891B307.620A684F@rci.net> <20000128120410.G7157@fw.wintelcom.net> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Alfred Perlstein wrote: > > You have multiple customers on two boxes, each customer gets 2 > IP address and you lolad balance between the two. Ah! I see your difficulty. I was thinking about availability; you were thinking about load balancing. > Some customers may wish to run thier own sql servers, they should > only bind to the IP address on each machine that they own. > > The customer can't fail over properly because even when the alias > for the box that dies comes up, thier daemon won't get requests on > the added IP. You have worse trouble than that. If you are running an order/entry database, you don't want the service to fail over to the second machine without remote synchronization of the data. Otherwise, you end up with two databases that have entries that compete for the same serial numbers. No one likes hand merging orders. :-) This also makes it important that the database only ever run on one machine at a time. You would want to start the database on the machine that holds the service net address, right after you do the ifconfig to bring up that address on the secondary's interface. Can you give me some more complete scenarios? I am interested in your problem. Yours, -- Jack Rusher, Chief Engineer | mailto:jar@integratus.com Integratus, Inc. | http://www.integratus.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Fri Jan 28 14:49:10 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from mail.cs.umn.edu (mail.cs.umn.edu [128.101.33.100]) by hub.freebsd.org (Postfix) with ESMTP id 8F1AD15D11 for ; Fri, 28 Jan 2000 14:49:07 -0800 (PST) (envelope-from beyer@cs.umn.edu) Received: from julius.cs.umn.edu (beyer@julius.cs.umn.edu [128.101.34.75]) by mail.cs.umn.edu (8.9.3/8.9.3) with ESMTP id QAA05137 for ; Fri, 28 Jan 2000 16:48:57 -0600 (CST) Received: from localhost (beyer@localhost) by julius.cs.umn.edu (8.9.1/8.9.0) with ESMTP id QAA09975 for ; Fri, 28 Jan 2000 16:48:56 -0600 (CST) X-Authentication-Warning: julius.cs.umn.edu: beyer owned process doing -bs Date: Fri, 28 Jan 2000 16:48:55 -0600 (CST) From: "James C. Beyer" To: hackers@FreeBSD.ORG Subject: 3.4 cdroms and xdm Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG A few questions: Am I insane or is my FreeBSD 3.4 install disk from Walnut Creek bad? I can not get it to boot and boot disks created with it do not work. Will boot disks created from the web source work? I seem to vaguely remember something about this but can not remember where or what was said. Also, I managed to get xdm to go active at boot time on my 3.3 machine but it would not let anyone in. I used the line in the ttys file and just changed the off to on. Is this problem covered somewhere? I have not found anything and would really like to avoid command line startx for my users. Any help will be greatly appreciated. james To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Fri Jan 28 14:57:32 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from bootp.sls.usu.edu (bootp.sls.usu.edu [129.123.82.251]) by hub.freebsd.org (Postfix) with ESMTP id 5C40414E1A for ; Fri, 28 Jan 2000 14:57:31 -0800 (PST) (envelope-from kurto@bootp.sls.usu.edu) Received: (from kurto@localhost) by bootp.sls.usu.edu (8.9.3/8.9.3) id PAA93554; Fri, 28 Jan 2000 15:58:55 -0700 (MST) (envelope-from kurto) Date: Fri, 28 Jan 2000 15:58:55 -0700 (MST) From: Kurt Olsen Message-Id: <200001282258.PAA93554@bootp.sls.usu.edu> To: beyer@cs.umn.edu, hackers@FreeBSD.ORG Subject: Re: 3.4 cdroms and xdm In-Reply-To: Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Re: XDM problem. Make sure that each users' .xsession file is set as executable for the owner. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Fri Jan 28 15:31:48 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from fw.wintelcom.net (ns1.wintelcom.net [209.1.153.20]) by hub.freebsd.org (Postfix) with ESMTP id 43C0E15088 for ; Fri, 28 Jan 2000 15:31:46 -0800 (PST) (envelope-from bright@fw.wintelcom.net) Received: (from bright@localhost) by fw.wintelcom.net (8.9.3/8.9.3) id PAA04427; Fri, 28 Jan 2000 15:56:38 -0800 (PST) Date: Fri, 28 Jan 2000 15:56:38 -0800 From: Alfred Perlstein To: Jack Rusher Cc: hackers@FreeBSD.ORG Subject: Re: downed IP addresses/redundancy Message-ID: <20000128155637.K7157@fw.wintelcom.net> References: <20000128045440.F7157@fw.wintelcom.net> <3891B307.620A684F@rci.net> <20000128120410.G7157@fw.wintelcom.net> <38921AA3.E4E9A3B3@rci.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0.1i In-Reply-To: <38921AA3.E4E9A3B3@rci.net>; from jar@rci.net on Fri, Jan 28, 2000 at 05:39:31PM -0500 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG * Jack Rusher [000128 15:04] wrote: > Alfred Perlstein wrote: > > > > You have multiple customers on two boxes, each customer gets 2 > > IP address and you lolad balance between the two. > > Ah! I see your difficulty. I was thinking about availability; you > were thinking about load balancing. > > > Some customers may wish to run thier own sql servers, they should > > only bind to the IP address on each machine that they own. > > > > The customer can't fail over properly because even when the alias > > for the box that dies comes up, thier daemon won't get requests on > > the added IP. > > You have worse trouble than that. If you are running an order/entry > database, you don't want the service to fail over to the second > machine without remote synchronization of the data. Otherwise, you > end up with two databases that have entries that compete for the same > serial numbers. No one likes hand merging orders. :-) This also > makes it important that the database only ever run on one machine at > a time. You would want to start the database on the machine that > holds the service net address, right after you do the ifconfig to > bring up that address on the secondary's interface. > > Can you give me some more complete scenarios? I am interested in > your problem. Consider phk's Jail code, giving each user a true virtual server of some sort, there's no way for it suddenly bind to another specific IP address without a restart. I think this issue should be addressed by the application designers as well, you _should_ be able to tell... let's say bind to grab another interface at runtime. maybe ndc allows this i'll have to look. -Alfred To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Fri Jan 28 15:35:26 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from rover.village.org (rover.village.org [204.144.255.49]) by hub.freebsd.org (Postfix) with ESMTP id 3BF1215088 for ; Fri, 28 Jan 2000 15:35:21 -0800 (PST) (envelope-from imp@harmony.village.org) Received: from harmony.village.org (harmony.village.org [10.0.0.6]) by rover.village.org (8.9.3/8.9.3) with ESMTP id QAA13135; Fri, 28 Jan 2000 16:35:19 -0700 (MST) (envelope-from imp@harmony.village.org) Received: from harmony.village.org (localhost.village.org [127.0.0.1]) by harmony.village.org (8.9.3/8.8.3) with ESMTP id QAA65386; Fri, 28 Jan 2000 16:35:37 -0700 (MST) Message-Id: <200001282335.QAA65386@harmony.village.org> To: Doug Rabson Subject: Re: how to allocate an alined address for a device? Cc: YAMAMOTO Shigeru , freebsd-hackers@FreeBSD.ORG In-reply-to: Your message of "Fri, 28 Jan 2000 10:28:44 GMT." References: Date: Fri, 28 Jan 2000 16:35:37 -0700 From: Warner Losh Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG In message Doug Rabson writes: : I'm uneasy about using the flags for this since I'm vaguely reserving the : upper 16 bits of flags for bus-specific purposes (although I haven't : formalised this). : : For allocating aligned regions with pnp, I simply looped in the caller : trying each specific range until one was free (see isa_find_port() in : isa_common.c). This is ugly but it does work. : : In the long run, I think we need either an extra parameter to : rman_reserve_resource() or a new api rman_reserve_resource_aligned(). : This also implies changing the method BUS_ALLOC_RESOURCE() or adding : BUS_ALLOC_RESOURCE_ALIGNED(). Well, with just 6 bits one could handle any alignment requirement up to 2^(2^6). We have 6 bits left. If this were the alignment requirement, a value of 0 would mean 2^0 or 1, which is the current behavior. More restrictive alignment requirements could be encoded easily. No ABI or API change needed. #define RF_ALIGNMENT_MASK 0xfc00 #define RF_ALIGNMENT_SHIFT 10 #define RF_ALIGNMENT_LOG2(x) (x << RF_ALIGNMENT_SHIFT) Warner To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Fri Jan 28 15:37:26 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from tetron02.tetronsoftware.com (ftp.tetronsoftware.com [208.236.46.106]) by hub.freebsd.org (Postfix) with ESMTP id 8C84915031; Fri, 28 Jan 2000 15:37:16 -0800 (PST) (envelope-from zeus@tetronsoftware.com) Received: from tetron02.tetronsoftware.com (tetron02.tetronsoftware.com [208.236.46.106]) by tetron02.tetronsoftware.com (8.9.3/8.9.3) with ESMTP id RAA36973; Fri, 28 Jan 2000 17:40:52 -0600 (CST) (envelope-from zeus@tetronsoftware.com) Date: Fri, 28 Jan 2000 17:40:52 -0600 (CST) From: Gene Harris To: Charles Anderson Cc: freebsd-hackers@FreeBSD.ORG, FreeBSD Emulation ML Subject: Re: Compiling under the linux emulator In-Reply-To: <20000128173608.B98463@midgard.dhs.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG All you need to do is modify your path to include whatever linux subdirs you need referenced first, such as PATH=/usr/compat/linux/bin:$PATH;export PATH. You may need to add other subdirs as well, according to any errors you might receive. That is all it takes. And, it works! *==============================================* *Gene Harris http://www.tetronsoftware.com* *FreeBSD Novice * *All ORBS.org SMTP connections are denied! * *==============================================* On Fri, 28 Jan 2000, Charles Anderson wrote: > I was looking for this same info a while back, didn't find it in my > search of the archives, please let me know if you have any success. > > thanks, > -Charlie (compiled but not linked) > > On Thu, Jan 27, 2000 at 05:24:46PM -0600, Gene Harris wrote: > > I need to compile a program under the freebsd linux > > emulator. How do I set up an environment where make, > > cc, etcetera point to the emulator binaries? > > > > I am attempting to recompile the xfstt port under the linux > > emulator to test some stability issues. > -- > Charles Anderson caa@columbus.rr.com > > No quote, no nothin' > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-hackers" in the body of the message > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Fri Jan 28 17:20: 0 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from internal.mail.demon.net (internal.mail.demon.net [193.195.224.3]) by hub.freebsd.org (Postfix) with ESMTP id 87DB614BF1 for ; Fri, 28 Jan 2000 17:19:56 -0800 (PST) (envelope-from fanf@demon.net) Received: from fanf.eng.demon.net (fanf.eng.demon.net [195.11.55.89]) by internal.mail.demon.net with ESMTP id BAA20637; Sat, 29 Jan 2000 01:19:55 GMT Received: from fanf by fanf.eng.demon.net with local (Exim 3.12 #3) id 12EMYL-000Bzo-00; Sat, 29 Jan 2000 01:19:53 +0000 To: bright@wintelcom.net From: Tony Finch Cc: freebsd-hackers@freebsd.org Subject: Re: downed IP addresses/redundancy In-Reply-To: <20000128120410.G7157@fw.wintelcom.net> References: <20000128045440.F7157@fw.wintelcom.net> <3891B307.620A684F@rci.net> <3891B307.620A684F@rci.net> Message-Id: Date: Sat, 29 Jan 2000 01:19:53 +0000 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Alfred Perlstein wrote: > >Once you tell an application to bind to a particular IP address >I'm pretty sure most don't have an option to bind another listen >socket. > >The customer can't fail over properly because even when the alias >for the box that dies comes up, thier daemon won't get requests on >the added IP. What would be cool is if FreeBSD could do VRRP. This is usually used for providing a default route handled by two physical boxen, but if you turn it around and provide a route to a service IP address that may be handled by two boxen that deal with fail-over using VRRP then this solves the problem discussed in this thread. I'd be interested to know of a free implementation of VRRP for the BSD network stack. Tony. -- dot it thus To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Fri Jan 28 17:36:18 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from ind.alcatel.com (postal.xylan.com [208.8.0.248]) by hub.freebsd.org (Postfix) with ESMTP id 62FE214C3C for ; Fri, 28 Jan 2000 17:36:15 -0800 (PST) (envelope-from wes@softweyr.com) Received: from mailhub.xylan.com (mailhub [198.206.181.70]) by ind.alcatel.com (8.9.3+Sun/8.9.1 (ind.alcatel.com 3.0 [OUT])) with SMTP id RAA07406; Fri, 28 Jan 2000 17:35:09 -0800 (PST) X-Origination-Site: Received: from omni.xylan.com by mailhub.xylan.com (SMI-8.6/SMI-SVR4 (mailhub 2.1 [HUB])) id RAA18970; Fri, 28 Jan 2000 17:35:08 -0800 Received: from softweyr.com (dyn0.utah.xylan.com [198.206.184.236]) by omni.xylan.com (8.9.3+Sun/8.9.1 (Xylan engr [SPOOL])) with ESMTP id RAA24167; Fri, 28 Jan 2000 17:35:06 -0800 (PST) Message-ID: <389244F7.85AA2018@softweyr.com> Date: Fri, 28 Jan 2000 18:40:07 -0700 From: Wes Peters Organization: Softweyr LLC X-Mailer: Mozilla 4.7 [en] (X11; U; FreeBSD 3.3-RELEASE i386) X-Accept-Language: en MIME-Version: 1.0 To: Kurt Olsen Cc: beyer@cs.umn.edu, hackers@freebsd.org Subject: Re: 3.4 cdroms and xdm References: <200001282258.PAA93554@bootp.sls.usu.edu> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Kurt Olsen wrote: > > Re: XDM problem. > > Make sure that each users' .xsession file is set as executable for the > owner. And, for any user who cannot login via XDM, login over the network and read the .xsession-errors file created in their home directory. -- "Where am I, and what am I doing in this handbasket?" Wes Peters Softweyr LLC wes@softweyr.com http://softweyr.com/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Fri Jan 28 19:59: 5 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from bootp.sls.usu.edu (bootp.sls.usu.edu [129.123.82.251]) by hub.freebsd.org (Postfix) with ESMTP id E09EA151BC for ; Fri, 28 Jan 2000 19:58:59 -0800 (PST) (envelope-from kurto@bootp.sls.usu.edu) Received: (from kurto@localhost) by bootp.sls.usu.edu (8.9.3/8.9.3) id VAA96998; Fri, 28 Jan 2000 21:00:34 -0700 (MST) (envelope-from kurto) Date: Fri, 28 Jan 2000 21:00:34 -0700 (MST) From: Kurt Olsen Message-Id: <200001290400.VAA96998@bootp.sls.usu.edu> To: kurto@bootp.sls.usu.edu, wes@softweyr.com Subject: Re: 3.4 cdroms and xdm Cc: beyer@cs.umn.edu, hackers@FreeBSD.ORG In-Reply-To: <389244F7.85AA2018@softweyr.com> Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG >And, for any user who cannot login via XDM, login over the network and >read the .xsession-errors file created in their home directory. Additionally, if you don't have a network you can hit Ctrl-F1 to get back to a text terminal. Or just enter the username, hit Enter, enter the passwordd and hit F1 which will log you in in failsafe mode. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Fri Jan 28 23:33:35 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from modgud.nordicrecords.com (h21-168-107.nordicdms.com [207.21.168.107]) by hub.freebsd.org (Postfix) with SMTP id 2E9A314C2C for ; Fri, 28 Jan 2000 23:33:33 -0800 (PST) (envelope-from dwalton@acm.org) Received: (qmail 10303 invoked by alias); 29 Jan 2000 07:33:32 -0000 Message-ID: <20000129073332.10302.qmail@modgud.nordicrecords.com> Received: (qmail 10296 invoked from network); 29 Jan 2000 07:33:31 -0000 Received: from unknown (HELO walton) (207.21.168.137) by mail.nordicdms.com with SMTP; 29 Jan 2000 07:33:31 -0000 From: "Dave Walton" To: freebsd-hackers@freebsd.org Date: Fri, 28 Jan 2000 23:30:30 -0800 MIME-Version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Subject: using pipes Reply-To: dwalton@acm.org X-mailer: Pegasus Mail for Win32 (v3.12a) Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG I'm working on a project where one process will be working with a stream of data from a series of separate processes. We currently have an architecture where process A (the controller) starts up process B (the source). The output from B is directed into a named pipe (created earlier with mkfifo). Meanwhile, process C (the sink) is reading from the named pipe. After B exits, A will start up a new one, and so one. [Side note: We have little control of process B. It is a program from another source that simply outputs to stdout. We redirect its stdout to the named pipe.] This system works, but has occasional glitches where the output stream from C is momentarily interrupted. They appear to be due to the 4K capacity of the pipe, combined with the fact that new data from B is not appearing in the pipe until after the pipe is completely empty. As C reads, the size of the pipe decreases until it reaches 0, at which point it suddenly jumps back to 4096. Occasionally, C will read the pipe again after it has been emptied, but before B has finished filled it again. When that happens, there is a momentary break in C's output, which is undesirable. One thought I've had to try to resolve the problem is to use a regular pipe instead of a named pipe. Process A would create a pipe, then fork off C which would keep its end of the pipe open for the duration of its run (days, weeks, months... this ain't NT! :) Then A would fork off the series of B processes, one at a time, with their stdout mapped to the input of the pipe. What I'm wondering is if there might be any problem with having a whole series of processes outputting to the same pipe, which is held open by a long-lived process at the other end of the pipe. Or would this arrangement be likely to have the same problem as the current one? For that matter, does anyone have better suggestions how to proceed? Thanks for your insight, and please CC: me on replies. Dave ---------------------------------------------------------------------- Dave Walton dwalton@acm.org ---------------------------------------------------------------------- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Fri Jan 28 23:49:21 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from resnet.uoregon.edu (resnet.uoregon.edu [128.223.144.32]) by hub.freebsd.org (Postfix) with ESMTP id ADC191586C for ; Fri, 28 Jan 2000 23:49:18 -0800 (PST) (envelope-from dwhite@resnet.uoregon.edu) Received: from localhost (dwhite@localhost) by resnet.uoregon.edu (8.9.3/8.9.3) with ESMTP id XAA75611; Fri, 28 Jan 2000 23:49:14 -0800 (PST) (envelope-from dwhite@resnet.uoregon.edu) Date: Fri, 28 Jan 2000 23:49:14 -0800 (PST) From: Doug White To: Bosko Milekic Cc: Kris Kirby , hackers@FreeBSD.ORG Subject: Re: Acceptable MBUF levels? In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Wed, 26 Jan 2000, Bosko Milekic wrote: > > On Wed, 26 Jan 2000, Doug White wrote: > > >When people refer to mbufs, they refer to mbuf clusters, of which there's > >a fixed number. The kernel will allocate more mbufs as necessary. > > Uhm, actually, mbufs are also allocated from mb_map. Thus, they are > also capped. (Unless I'm missing something big again... :-) ) That would be correct, at least looking at the appropriate code in /sys/kern/uipc_mbuf.c. The read-only sysctls kern.ipc.nmbclusters and kern.ipc.nmbufs hold the max mbuf clusters and the max mbufs, respecively. kern.ipc.nmbufs is bound to an nmbufs value in there, but I can't figure out to what value it's initialized to. > >The usual rule of thumb is that the peak should never exceed 75% of the > >max mbufs in the system to allow for sufficient overhead in extreme > >situations. In this case you're at 80%, so you should probably recompile > >your kernel and bump maxusers. > > Actually, for mbufs and mbuf clusters, you should increase > NMBCLUSTERS, which will serve as an indication of allocate-able clusters > as well as, ultimately, mbufs. Increasing maxusers has the side effect of increasing NMBCLUSTERS according to this formula (from /sys/conf/param.c): #ifndef NMBCLUSTERS #define NMBCLUSTERS (512 + MAXUSERS * 16) #endif You only have to override NMBCLUSTERS by hand if you want a truly gigantic (i.e. > 10,000) number of nmbclusters. Just be VERY CAREFUL doing so since you can *reduce* the number, and that's not good! From personal experience, 512 maxusers and 16384 nmbclusters is more than enough for just about anything -- just make sure you can handle a 17MB kernel. :-) Doug White | FreeBSD: The Power to Serve dwhite@resnet.uoregon.edu | www.FreeBSD.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sat Jan 29 3: 7:13 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from anchor-post-34.mail.demon.net (anchor-post-34.mail.demon.net [194.217.242.92]) by hub.freebsd.org (Postfix) with ESMTP id 9044F14F88 for ; Sat, 29 Jan 2000 03:07:09 -0800 (PST) (envelope-from dfr@nlsystems.com) Received: from nlsys.demon.co.uk ([158.152.125.33] helo=herring.nlsystems.com) by anchor-post-34.mail.demon.net with esmtp (Exim 2.12 #1) id 12EVid-000Ke3-0Y; Sat, 29 Jan 2000 11:07:08 +0000 Received: from salmon.nlsystems.com (salmon.nlsystems.com [10.0.0.3]) by herring.nlsystems.com (8.9.3/8.8.8) with ESMTP id LAA79209; Sat, 29 Jan 2000 11:10:09 GMT (envelope-from dfr@nlsystems.com) Date: Sat, 29 Jan 2000 11:05:47 +0000 (GMT) From: Doug Rabson To: Warner Losh Cc: YAMAMOTO Shigeru , freebsd-hackers@FreeBSD.ORG Subject: Re: how to allocate an alined address for a device? In-Reply-To: <200001282335.QAA65386@harmony.village.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Fri, 28 Jan 2000, Warner Losh wrote: > In message Doug Rabson writes: > : I'm uneasy about using the flags for this since I'm vaguely reserving the > : upper 16 bits of flags for bus-specific purposes (although I haven't > : formalised this). > : > : For allocating aligned regions with pnp, I simply looped in the caller > : trying each specific range until one was free (see isa_find_port() in > : isa_common.c). This is ugly but it does work. > : > : In the long run, I think we need either an extra parameter to > : rman_reserve_resource() or a new api rman_reserve_resource_aligned(). > : This also implies changing the method BUS_ALLOC_RESOURCE() or adding > : BUS_ALLOC_RESOURCE_ALIGNED(). > > Well, with just 6 bits one could handle any alignment requirement up > to 2^(2^6). > > We have 6 bits left. If this were the alignment requirement, a value > of 0 would mean 2^0 or 1, which is the current behavior. More > restrictive alignment requirements could be encoded easily. No ABI or > API change needed. > > #define RF_ALIGNMENT_MASK 0xfc00 > #define RF_ALIGNMENT_SHIFT 10 > #define RF_ALIGNMENT_LOG2(x) (x << RF_ALIGNMENT_SHIFT) That seems reasonable. We should implement this right after 4.0 is done. -- Doug Rabson Mail: dfr@nlsystems.com Nonlinear Systems Ltd. Phone: +44 181 442 9037 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sat Jan 29 3:39:23 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from tardis.patho.gen.nz (tardis.patho.gen.nz [203.97.2.226]) by hub.freebsd.org (Postfix) with ESMTP id C87BF14D51 for ; Sat, 29 Jan 2000 03:39:17 -0800 (PST) (envelope-from jabley@tardis.patho.gen.nz) Received: (from jabley@localhost) by tardis.patho.gen.nz (8.9.3/8.9.3) id AAA06563; Sun, 30 Jan 2000 00:38:55 +1300 (NZDT) Date: Sun, 30 Jan 2000 00:38:54 +1300 From: Joe Abley To: Tony Finch Cc: bright@wintelcom.net, freebsd-hackers@FreeBSD.ORG Subject: Re: downed IP addresses/redundancy Message-ID: <20000130003852.A24392@patho.gen.nz> References: <20000128045440.F7157@fw.wintelcom.net> <3891B307.620A684F@rci.net> <3891B307.620A684F@rci.net> <20000128120410.G7157@fw.wintelcom.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0i In-Reply-To: ; from dot@dotat.at on Sat, Jan 29, 2000 at 01:19:53AM +0000 X-Files: the Truth is Out There Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Sat, Jan 29, 2000 at 01:19:53AM +0000, Tony Finch wrote: > I'd be interested to know of a free implementation of VRRP for the BSD > network stack. I started to look at this a while back, but started to flounder when I looked for an existing interface to allow me to source frames on a local ethernet with a userland-specified MAC address. Actually, I think I looked on OpenBSD, and can't remember whether I looked on FreeBSD too. If anybody has a good idea about how to send and receive frames on a local ethernet interface using one of several possible local MAC addresses (most user-specified) I can probably resurrect the code. Joe To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sat Jan 29 5:29:38 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from mgo.iij.ad.jp (mgo.iij.ad.jp [202.232.15.6]) by hub.freebsd.org (Postfix) with ESMTP id 42D0916223 for ; Sat, 29 Jan 2000 05:25:31 -0800 (PST) (envelope-from shigeru@iij.ad.jp) Received: from ns.iij.ad.jp (root@ns.iij.ad.jp [192.168.2.8]) by mgo.iij.ad.jp (8.8.8/MGO1.0) with ESMTP id WAA05443; Sat, 29 Jan 2000 22:24:58 +0900 (JST) Received: from fs.iij.ad.jp (root@fs.iij.ad.jp [192.168.2.9]) by ns.iij.ad.jp (8.8.5/3.5Wpl7) with ESMTP id WAA16945; Sat, 29 Jan 2000 22:24:57 +0900 (JST) Received: from mercury.iij.ad.jp (mercury.iij.ad.jp [192.168.4.89]) by fs.iij.ad.jp (8.8.5/3.5Wpl7) with ESMTP id WAA22947; Sat, 29 Jan 2000 22:24:56 +0900 (JST) Received: from localhost (localhost [127.0.0.1]) by mercury.iij.ad.jp (8.9.3/3.5W) with ESMTP id WAA21069; Sat, 29 Jan 2000 22:24:55 +0900 (JST) To: dfr@nlsystems.com Cc: imp@village.org, freebsd-hackers@FreeBSD.ORG Subject: Re: how to allocate an alined address for a device? In-Reply-To: Your message of "Sat, 29 Jan 2000 11:05:47 +0000 (GMT)" References: X-Mailer: Mew version 1.93b38 on XEmacs 21.2 (Shinjuku) Mime-Version: 1.0 Content-Type: Multipart/Mixed; boundary="--Next_Part(Sat_Jan_29_22:21:14_2000_914)--" Content-Transfer-Encoding: 7bit Message-Id: <20000129222454T.shigeru@iij.ad.jp> Date: Sat, 29 Jan 2000 22:24:54 +0900 From: YAMAMOTO Shigeru X-Dispatcher: imput version 991025(IM133) Lines: 101 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG ----Next_Part(Sat_Jan_29_22:21:14_2000_914)-- Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit >>>>> "Doug" == Doug Rabson writes: >> Well, with just 6 bits one could handle any alignment requirement up to >> 2^(2^6). >> >> We have 6 bits left. If this were the alignment requirement, a value of >> 0 would mean 2^0 or 1, which is the current behavior. More restrictive >> alignment requirements could be encoded easily. No ABI or API change >> needed. >> >> #define RF_ALIGNMENT_MASK 0xfc00 >> #define RF_ALIGNMENT_SHIFT 10 >> #define RF_ALIGNMENT_LOG2(x) (x << RF_ALIGNMENT_SHIFT) Doug> That seems reasonable. We should implement this right after 4.0 is Doug> done. I re-write a code using Warner's idea. Thanks, ------- YAMAMOTO Shigeru Internet Initiative Japan Inc. Network Engineering Div. ----Next_Part(Sat_Jan_29_22:21:14_2000_914)-- Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=align2.diff --- kern/subr_rman.c.org Tue Nov 16 08:28:57 1999 +++ kern/subr_rman.c Sat Jan 29 03:40:36 2000 @@ -227,7 +227,19 @@ continue; } rstart = max(s->r_start, start); - rend = min(s->r_end, max(start + count, end)); + if (flags & RF_ALIGNMENT_MASK) { + /* need to align an address */ + u_long aligned_rstart; + u_long alignment_size; + + alignment_size = (1u << ((flags & RF_ALIGNMENT_MASK) >> RF_ALIGNMENT_SHIFT)); + aligned_rstart = (rstart & (~alignment_size + 1u)); + if ((rstart & (~(~alignment_size + 1u))) != 0) { + aligned_rstart += alignment_size; + } + rstart = aligned_rstart; + } + rend = min(s->r_end, max(max(start + count, end), rstart + count)); #ifdef RMAN_DEBUG printf("truncated region: [%#lx, %#lx]; size %#lx (requested %#lx)\n", rstart, rend, (rend - rstart + 1), count); @@ -608,4 +620,19 @@ rv = int_rman_release_resource(rm, r); simple_unlock(rm->rm_slock); return (rv); +} + +u_int32_t +rman_make_alignment_flags(int size) { + int i; + + for (i = 0; i < 32 && size > 0x01; i ++) { + size = (size >> 1); + } + + if (i > 31) { + i = 0; + } + + return(RF_ALIGNMENT_LOG2(i)); } --- sys/rman.h.org Mon Jan 10 08:48:52 2000 +++ sys/rman.h Sat Jan 29 03:44:40 2000 @@ -64,7 +64,11 @@ #define RF_WANTED 0x0010 /* somebody is waiting for this resource */ #define RF_FIRSTSHARE 0x0020 /* first in sharing list */ -#define RF_PCCARD_ATTR 0x10000 /* PCCARD attribute memory */ +#define RF_PCCARD_ATTR 0x10000 /* PCCARD attribute memory */ + +#define RF_ALIGNMENT_SHIFT 10 /* alignment size bit starts bit 10 */ +#define RF_ALIGNMENT_MASK (0x003F << RF_ALIGNMENT_SHIFT) /* resource address alignemnt size bit mask */ +#define RF_ALIGNMENT_LOG2(x) ((x) << RF_ALIGNMENT_SHIFT) enum rman_type { RMAN_UNINIT = 0, RMAN_GAUGE, RMAN_ARRAY }; @@ -91,6 +95,8 @@ struct resource *rman_reserve_resource(struct rman *rm, u_long start, u_long end, u_long count, u_int flags, struct device *dev); + +extern u_int32_t rman_make_alignment_flags __P((int size)); #define rman_get_start(r) ((r)->r_start) #define rman_get_end(r) ((r)->r_end) ----Next_Part(Sat_Jan_29_22:21:14_2000_914)---- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sat Jan 29 10: 2:32 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from oracle.dsuper.net (oracle.dsuper.net [205.205.255.1]) by hub.freebsd.org (Postfix) with ESMTP id 69B8F1505C for ; Sat, 29 Jan 2000 10:02:20 -0800 (PST) (envelope-from bmilekic@dsuper.net) Received: from oracle.dsuper.net (oracle.dsuper.net [205.205.255.1]) by oracle.dsuper.net (8.9.3/8.9.3) with ESMTP id NAA13951; Sat, 29 Jan 2000 13:02:15 -0500 (EST) Date: Sat, 29 Jan 2000 13:02:15 -0500 (EST) From: Bosko Milekic To: Doug White Cc: Kris Kirby , hackers@FreeBSD.ORG Subject: Re: Acceptable MBUF levels? In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Fri, 28 Jan 2000, Doug White wrote: >That would be correct, at least looking at the appropriate code in >/sys/kern/uipc_mbuf.c. The read-only sysctls kern.ipc.nmbclusters and >kern.ipc.nmbufs hold the max mbuf clusters and the max mbufs, respecively. >kern.ipc.nmbufs is bound to an nmbufs value in there, but I can't figure >out to what value it's initialized to. `nmbufs' is actually NMBCLUSTERS * 4, unless a value is fetched from the environment (see `loader'). A similar initialization is done for `nmbclusters,' only nmbclusters defaults to NMBCLUSTERS unless something else is provided through the getenv() call (see `TUNABLE_INT_DECL'). >Increasing maxusers has the side effect of increasing NMBCLUSTERS >according to this formula (from /sys/conf/param.c): > >#ifndef NMBCLUSTERS >#define NMBCLUSTERS (512 + MAXUSERS * 16) >#endif > >You only have to override NMBCLUSTERS by hand if you want a truly gigantic >(i.e. > 10,000) number of nmbclusters. Just be VERY CAREFUL doing so >since you can *reduce* the number, and that's not good! > >>From personal experience, 512 maxusers and 16384 nmbclusters is more than >enough for just about anything -- just make sure you can handle a 17MB >kernel. :-) Yes, that's exactly right. Good thing you pointed it out too. :-) However, increasing MAXUSERS also ends up increasing other global parameters in the kernel, so you could end up with a rather large kernel when all you really want to do is increase NMBCLUSTERS, and nothing else. But yeah, your point is very valid. Cheers, Bosko. ------------------------------------------------------------------------- | Bosko Milekic | Coffee vector: 1.0i+1.0j+1.0k | | Email: bmilekic@dsuper.net | Sleep vector: -1.0i-1.0j-1.0k | | WWW: http://pages.infinit.net/bmilekic/ | Resulting life: 0i+0j+0k (DNE)| ------------------------------------------------------------------------- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sat Jan 29 10: 6:21 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from rover.village.org (rover.village.org [204.144.255.49]) by hub.freebsd.org (Postfix) with ESMTP id 70C0A14C39 for ; Sat, 29 Jan 2000 10:06:15 -0800 (PST) (envelope-from imp@harmony.village.org) Received: from harmony.village.org (harmony.village.org [10.0.0.6]) by rover.village.org (8.9.3/8.9.3) with ESMTP id LAA18192; Sat, 29 Jan 2000 11:06:13 -0700 (MST) (envelope-from imp@harmony.village.org) Received: from harmony.village.org (localhost.village.org [127.0.0.1]) by harmony.village.org (8.9.3/8.8.3) with ESMTP id LAA07899; Sat, 29 Jan 2000 11:06:16 -0700 (MST) Message-Id: <200001291806.LAA07899@harmony.village.org> To: YAMAMOTO Shigeru Subject: Re: how to allocate an alined address for a device? Cc: dfr@nlsystems.com, freebsd-hackers@FreeBSD.ORG In-reply-to: Your message of "Sat, 29 Jan 2000 22:24:54 +0900." <20000129222454T.shigeru@iij.ad.jp> References: <20000129222454T.shigeru@iij.ad.jp> Date: Sat, 29 Jan 2000 11:06:15 -0700 From: Warner Losh Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG In message <20000129222454T.shigeru@iij.ad.jp> YAMAMOTO Shigeru writes: : + alignment_size = (1u << ((flags & RF_ALIGNMENT_MASK) >> RF_ALIGNMENT_SHIFT)); alignment_size = (1u << (RF_ALIGNMENT(flags))); : + aligned_rstart = (rstart & (~alignment_size + 1u)); : + if ((rstart & (~(~alignment_size + 1u))) != 0) { : + aligned_rstart += alignment_size; : + } : + rstart = aligned_rstart; : + } : + rend = min(s->r_end, max(max(start + count, end), rstart + count)); : #ifdef RMAN_DEBUG : printf("truncated region: [%#lx, %#lx]; size %#lx (requested %#lx)\n", : rstart, rend, (rend - rstart + 1), count); : @@ -608,4 +620,19 @@ : rv = int_rman_release_resource(rm, r); : simple_unlock(rm->rm_slock); : return (rv); : +} I believe that this looks good. : +u_int32_t : +rman_make_alignment_flags(int size) { : + int i; : + : + for (i = 0; i < 32 && size > 0x01; i ++) { : + size = (size >> 1); : + } : + : + if (i > 31) { : + i = 0; : + } : + : + return(RF_ALIGNMENT_LOG2(i)); : } This could more simply be stated as RF_ALIGNMENT_LOG2(ffs(size)). I don't think that it is really needed. : +#define RF_PCCARD_ATTR 0x10000 /* PCCARD attribute memory */ Please leave this in. It doesn't have anything to do with the changes you are making. Actually, I should remove it in an independent commit. I'll do it a different way for the WaveGear Avaitor driver I'm porting from NetBSD. Also for the XE driver. : +#define RF_ALIGNMENT_SHIFT 10 /* alignment size bit starts bit 10 */ : +#define RF_ALIGNMENT_MASK (0x003F << RF_ALIGNMENT_SHIFT) /* resource address alignemnt size bit mask */ : +#define RF_ALIGNMENT_LOG2(x) ((x) << RF_ALIGNMENT_SHIFT) You might want to add: #define RF_ALIGNMENT(x) (((x) & RF_ALIGNMENT_MASK) >> RF_ALIGNMENT_SHIFT) Warner To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sat Jan 29 11:24:22 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from mimer.webgiro.com (mimer.webgiro.com [212.209.29.5]) by hub.freebsd.org (Postfix) with ESMTP id AEAAF1513D for ; Sat, 29 Jan 2000 11:24:19 -0800 (PST) (envelope-from abial@webgiro.com) Received: by mimer.webgiro.com (Postfix, from userid 66) id 4444B2DC0A; Sat, 29 Jan 2000 20:23:55 +0100 (CET) Received: by mx.webgiro.com (Postfix, from userid 1001) id 712877811; Sat, 29 Jan 2000 20:24:20 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by mx.webgiro.com (Postfix) with ESMTP id 6C33710E10; Sat, 29 Jan 2000 20:24:20 +0100 (CET) Date: Sat, 29 Jan 2000 20:24:20 +0100 (CET) From: Andrzej Bialecki To: Joe Abley Cc: Tony Finch , bright@wintelcom.net, freebsd-hackers@FreeBSD.ORG Subject: Re: downed IP addresses/redundancy In-Reply-To: <20000130003852.A24392@patho.gen.nz> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Sun, 30 Jan 2000, Joe Abley wrote: > On Sat, Jan 29, 2000 at 01:19:53AM +0000, Tony Finch wrote: > > I'd be interested to know of a free implementation of VRRP for the BSD > > network stack. > > I started to look at this a while back, but started to flounder when > I looked for an existing interface to allow me to source frames on > a local ethernet with a userland-specified MAC address. > > Actually, I think I looked on OpenBSD, and can't remember whether I > looked on FreeBSD too. If anybody has a good idea about how to send > and receive frames on a local ethernet interface using one of several > possible local MAC addresses (most user-specified) I can probably > resurrect the code. Mhmmm... I'm using the code developed by Bill Paul, to change MAC address via special ioctl. It works just fine for me. http://www.freebsd.org/~wpaul/setmac.tar.gz Andrzej Bialecki // WebGiro AB, Sweden (http://www.webgiro.com) // ------------------------------------------------------------------- // ------ FreeBSD: The Power to Serve. http://www.freebsd.org -------- // --- Small & Embedded FreeBSD: http://www.freebsd.org/~picobsd/ ---- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sat Jan 29 12:56: 7 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from nets5.rz.rwth-aachen.de (nets5.rz.RWTH-Aachen.DE [137.226.144.13]) by hub.freebsd.org (Postfix) with ESMTP id 3A45A14DA8 for ; Sat, 29 Jan 2000 12:55:56 -0800 (PST) (envelope-from kuku@gilberto.physik.RWTH-Aachen.DE) Received: from campino.informatik.rwth-aachen.de (campino.Informatik.RWTH-Aachen.DE [137.226.116.240]) by nets5.rz.rwth-aachen.de (8.9.1a/8.9.1/10) with ESMTP id VAA02751 for ; Sat, 29 Jan 2000 21:55:50 +0100 (MET) Received: from gil.physik.rwth-aachen.de (gilberto.physik.rwth-aachen.de [137.226.30.2]) by campino.informatik.rwth-aachen.de (8.9.1a/8.9.1/3) with ESMTP id VAA26689 for ; Sat, 29 Jan 2000 21:56:13 +0100 (MET) Received: (from kuku@localhost) by gil.physik.rwth-aachen.de (8.9.3/8.6.9) id VAA31117 for hackers@freebsd.org; Sat, 29 Jan 2000 21:55:57 +0100 (CET) Date: Sat, 29 Jan 2000 21:55:57 +0100 (CET) From: Christoph Kukulies Message-Id: <200001292055.VAA31117@gil.physik.rwth-aachen.de> To: hackers@freebsd.org Subject: scsiformat Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG I have a block on a SCSI disk (Fujitsu M2954S-512 ) which I cannot write to - fsck hangs eternally. Besides from trying the SCSICNTL utility from Adaptec (which I had to boot off of a DOS floppy) is there a way of formatting a drive from being booted under FreeBSD? E.g. by sending a sequence of approriate commands to the scsi bus? -- Chris Christoph P. U. Kukulies kuku@gil.physik.rwth-aachen.de To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sat Jan 29 13:18:20 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from panzer.kdm.org (panzer.kdm.org [216.160.178.169]) by hub.freebsd.org (Postfix) with ESMTP id 61A62150F2 for ; Sat, 29 Jan 2000 13:18:17 -0800 (PST) (envelope-from ken@panzer.kdm.org) Received: (from ken@localhost) by panzer.kdm.org (8.9.3/8.9.1) id OAA07903; Sat, 29 Jan 2000 14:17:34 -0700 (MST) (envelope-from ken) Date: Sat, 29 Jan 2000 14:17:34 -0700 From: "Kenneth D. Merry" To: Christoph Kukulies Cc: hackers@FreeBSD.ORG Subject: Re: scsiformat Message-ID: <20000129141734.A7865@panzer.kdm.org> References: <200001292055.VAA31117@gil.physik.rwth-aachen.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0i In-Reply-To: <200001292055.VAA31117@gil.physik.rwth-aachen.de>; from kuku@gilberto.physik.RWTH-Aachen.DE on Sat, Jan 29, 2000 at 09:55:57PM +0100 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Sat, Jan 29, 2000 at 21:55:57 +0100, Christoph Kukulies wrote: > > I have a block on a SCSI disk (Fujitsu M2954S-512 ) > which I cannot write to - fsck hangs eternally. > > Besides from trying the SCSICNTL utility from Adaptec > (which I had to boot off of a DOS floppy) is > there a way of formatting a drive from being > booted under FreeBSD? E.g. by sending a sequence of > approriate commands to the scsi bus? You can do it with camcontrol(8), see the examples section in the man page for the command. I've also written code to implement 'camcontrol format', but I have gotten very little feedback on it in 8 months or so. Would you like to test it? It is located here: http://www.FreeBSD.org/~ken/camcontrol.format.20000116 Ken -- Kenneth Merry ken@kdm.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sat Jan 29 16:27:34 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from smtp02.teb1.iconnet.net (smtp02.teb1.iconnet.net [209.3.218.43]) by hub.freebsd.org (Postfix) with ESMTP id E90FB1530F for ; Sat, 29 Jan 2000 16:27:31 -0800 (PST) (envelope-from babkin@bellatlantic.net) Received: from bellatlantic.net (client-117-158.bellatlantic.net [151.198.117.158]) by smtp02.teb1.iconnet.net (8.9.1/8.9.1) with ESMTP id TAA25854; Sat, 29 Jan 2000 19:27:26 -0500 (EST) Message-ID: <38938729.5B30B5BF@bellatlantic.net> Date: Sat, 29 Jan 2000 19:34:49 -0500 From: Sergey Babkin X-Mailer: Mozilla 4.7 [en] (X11; U; FreeBSD 4.0-19990626-CURRENT i386) X-Accept-Language: ru, en MIME-Version: 1.0 To: Christoph Kukulies Cc: hackers@FreeBSD.ORG Subject: Re: scsiformat References: <200001292055.VAA31117@gil.physik.rwth-aachen.de> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Christoph Kukulies wrote: > > I have a block on a SCSI disk (Fujitsu M2954S-512 ) > which I cannot write to - fsck hangs eternally. > > Besides from trying the SCSICNTL utility from Adaptec > (which I had to boot off of a DOS floppy) is > there a way of formatting a drive from being > booted under FreeBSD? E.g. by sending a sequence of > approriate commands to the scsi bus? Yes, you can send the SCSI format command to the disk. The document describing the SCSI commands probably still can be found at the Symbios ftp site (or ask me, I can send you a copy I made from there - should be about 300K compressed). -SB To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sat Jan 29 16:59: 1 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from mtiwmhc01.worldnet.att.net (mtiwmhc01.worldnet.att.net [204.127.131.36]) by hub.freebsd.org (Postfix) with ESMTP id 506FC14F6A for ; Sat, 29 Jan 2000 16:58:58 -0800 (PST) (envelope-from hspio@worldnet.att.net) Received: from default ([12.70.6.148]) by mtiwmhc01.worldnet.att.net (InterMail v03.02.07.07 118-134) with ESMTP id <20000130005846.PYMU5516@default>; Sun, 30 Jan 2000 00:58:46 +0000 From: hspio@worldnet.att.net To: cypherpunks@toad.com, hackers@FreeBSD.ORG, linux-admin@vger.rutgers.edu, lyris-confirm@lyris.lockergnome.com, risks@csl.sri.com Date: Sat, 29 Jan 2000 19:59:24 -0500 MIME-Version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Subject: WebPage X-mailer: Pegasus Mail for Win32 (v3.12b) Message-Id: <20000130005846.PYMU5516@default> Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG hey can any one direct me to the best website server with the most megs Thanks To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message