From owner-freebsd-hackers Sun Sep 30 0:53:21 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from earth.backplane.com (earth-nat-cw.backplane.com [208.161.114.67]) by hub.freebsd.org (Postfix) with ESMTP id C693237B406 for ; Sun, 30 Sep 2001 00:53:19 -0700 (PDT) Received: (from dillon@localhost) by earth.backplane.com (8.11.6/8.11.2) id f8U7qsj41649; Sun, 30 Sep 2001 00:52:54 -0700 (PDT) (envelope-from dillon) Date: Sun, 30 Sep 2001 00:52:54 -0700 (PDT) From: Matt Dillon Message-Id: <200109300752.f8U7qsj41649@earth.backplane.com> To: Vladimir Dozen Cc: Wilko Bulte , Alfred Perlstein , hackers@FreeBSD.ORG Subject: Re: VM: dynamic swap remapping (patch) References: <20010929155941.A291@eix.do-labs.spb.ru> <20010929071024.Q59854@elvis.mu.org> <20010929141349.A80876@freebie.xs4all.nl> <200109291653.f8TGrRR37689@earth.backplane.com> <20010929232953.B341@eix.do-labs.spb.ru> Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG : Second, application not always grows to 1G, most of the time it keeps : as small as 500M ;). Why should we precommit 1G for 500M data? Doing : multi-mmap memory management is additional pain. Why not? Disk space is cheap. For a problem like this I would simply throw in two 30G+ hard drives and partition them with 16G of swap each, giving me 32G of swap for the machine. If you needed to do it cheaply you could even use IDE, though personally I would use SCSI for reliability. Depending on the amount of real memory in the machine you might have to tweek a few kernel options (like matching NSWAP to the actual number of swap devices), but basically it should just work. Even using file-backed memory is fairly trivial. You don't need to do multi-mmap memory management or do any kernel tweaking. Just reserve 1G and use a single mmap() and file per process. -Matt To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sun Sep 30 1: 2:13 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from milliways.chance.ru (milliways.chance.ru [195.190.107.35]) by hub.freebsd.org (Postfix) with ESMTP id 816E537B40F for ; Sun, 30 Sep 2001 01:02:08 -0700 (PDT) Received: from do-labs.spb.ru (ppp-6.chance.ru [195.190.107.9]) by milliways.chance.ru (8.9.0/8.9.0) with SMTP id MAA02230 for ; Sun, 30 Sep 2001 12:01:56 +0400 (MSD) Received: (qmail 735 invoked by uid 1000); 30 Sep 2001 12:03:28 -0000 Date: Sun, 30 Sep 2001 12:03:28 +0000 From: Vladimir Dozen To: Alfred Perlstein Cc: Vladimir Dozen , Matt Dillon , Wilko Bulte , hackers@FreeBSD.ORG Subject: Re: VM: dynamic swap remapping (patch) Message-ID: <20010930120328.A534@eix.do-labs.spb.ru> References: <20010929155941.A291@eix.do-labs.spb.ru> <20010929071024.Q59854@elvis.mu.org> <20010929141349.A80876@freebie.xs4all.nl> <200109291653.f8TGrRR37689@earth.backplane.com> <20010929232953.B341@eix.do-labs.spb.ru> <20010929175653.Z59854@elvis.mu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.4i In-Reply-To: <20010929175653.Z59854@elvis.mu.org>; from bright@mu.org on Sat, Sep 29, 2001 at 05:56:53PM -0500 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG ehlo. > My suggestion, (but not my final say, i'm still open to ideas): > > Implement a memory status signal to notify processes of changes > in the relative amount of system memory. > > When memory reaches a low or high watermark, the signal is > broadcast to all running processes. > > The default disposition will be to ignore the signal. > > The signal will be named SIGMEMINFO. (SIGXfoo means > 'process has exceeded resource foo') Agreed. As for SIG_IGN, can anyone tell me -- can I force existing application to use my signal handler? For example, by preallocating some shared library? If so, there are no contras for ignoring signal by default. > The signal will pass via the siginfo struct information > such that the process can determine if the system has > just exceeded the low watermark (danger) or has reclaimed > down to the high watermark (enough free memory). Passing more info is always better. Agreed. > a) over allocate swap a bit and set the low watermark carefully. > b) do the following enhancement: > > Provide a system whereby you can swap to the filesystem without > additional upcalls/syscalls from userspace, basically, provide > some means of paging to the filesystem automatically. > > then, set your lowwater mark to the size of your swap partition, > now your system will alert your processes and automatically swap > _anyone_ to the filesystem. > > I really think that this would be more flexible and still allow > you to achieve what you want... What do you think? I can't say anything until I'll got detail. Sorry, English is neither my native nor used often, so I may easely miss important details, but here is my random comments: Initally, I was trying the same (I think) approach, but there was some problems. Some kernel function refused to work with VM objects of processes differing from curproc. I.e., it could be hard to work with bigproc inside swap daemon; and swap daemon is the only place where we can detect OOM condition; that's why I used signal to transfer control to user space, and then back into kernel -- already in another process. Another reason to do it -- to make all limits and quota work automatically. Also, I did not wanted to make swap daemon busy too long. Also, what means "over allocate swap a bit"? How to compute the value of that bit? At what moment should we preallocate? Should we repeat preallocation after getting SIGMEMINFO (himark)? Also, you cannot set low mark to size of swap partition. To create file-based swap you need some memory (file operations requires it). So, low mark should be a bit lower (that's why I raised value of nswap_lowat). Finally, if you want to over allocate swap for every process in system, the whole swap can wind up consisting of only preallocations. Resource management is the role of kernel. Any hard reservation interfere with that. -- dozen @ home To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sun Sep 30 1: 9:25 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from elvis.mu.org (elvis.mu.org [216.33.66.196]) by hub.freebsd.org (Postfix) with ESMTP id B9D6C37B40C for ; Sun, 30 Sep 2001 01:09:22 -0700 (PDT) Received: by elvis.mu.org (Postfix, from userid 1192) id 8214581D01; Sun, 30 Sep 2001 03:09:22 -0500 (CDT) Date: Sun, 30 Sep 2001 03:09:22 -0500 From: Alfred Perlstein To: Matt Dillon Cc: Vladimir Dozen , Wilko Bulte , hackers@FreeBSD.ORG Subject: Re: VM: dynamic swap remapping (patch) Message-ID: <20010930030922.F59854@elvis.mu.org> References: <20010929155941.A291@eix.do-labs.spb.ru> <20010929071024.Q59854@elvis.mu.org> <20010929141349.A80876@freebie.xs4all.nl> <200109291653.f8TGrRR37689@earth.backplane.com> <20010929232953.B341@eix.do-labs.spb.ru> <200109300752.f8U7qsj41649@earth.backplane.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <200109300752.f8U7qsj41649@earth.backplane.com>; from dillon@earth.backplane.com on Sun, Sep 30, 2001 at 12:52:54AM -0700 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG * Matt Dillon [010930 02:53] wrote: > > : Second, application not always grows to 1G, most of the time it keeps > : as small as 500M ;). Why should we precommit 1G for 500M data? Doing > : multi-mmap memory management is additional pain. > > Why not? Disk space is cheap. For a problem like this I would simply > throw in two 30G+ hard drives and partition them with 16G of swap each, > giving me 32G of swap for the machine. If you needed to do it cheaply > you could even use IDE, though personally I would use SCSI for > reliability. Depending on the amount of real memory in the machine > you might have to tweek a few kernel options (like matching NSWAP to > the actual number of swap devices), but basically it should just work. > > Even using file-backed memory is fairly trivial. You don't need to > do multi-mmap memory management or do any kernel tweaking. Just > reserve 1G and use a single mmap() and file per process. What he needs is a system to inform him that things aren't looking so good, check my email for what I think is a pretty good solution. -- -Alfred Perlstein [alfred@freebsd.org] 'Instead of asking why a piece of software is using "1970s technology," start asking why software is ignoring 30 years of accumulated wisdom.' To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sun Sep 30 1:11:57 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from ms3.hinet.net (ms3.hinet.net [168.95.4.30]) by hub.freebsd.org (Postfix) with ESMTP id 2AFDA37B41B; Sun, 30 Sep 2001 01:11:09 -0700 (PDT) Received: from localhost (61-216-109-39.HINET-IP.hinet.net [61.216.109.39]) by ms3.hinet.net (8.8.8/8.8.8) with SMTP id QAA15725; Sun, 30 Sep 2001 16:08:48 +0800 (CST) Date: Sun, 30 Sep 2001 16:08:48 +0800 (CST) From: vadwgrhunb@ms12.hinet.net Message-Id: <200109300808.QAA15725@ms3.hinet.net> To: able@freebsd.org Subject: uvcx ¥ß§YÀ°±zºô¸ô¶}©±Àç·~!! lxlu MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Novasoft_Sagittarius_Professional_" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Novasoft Sagittarius Professional Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG This is a multi-part message in MIME format. ------=_Novasoft_Sagittarius_Professional_ Content-Type: text/html; charset="big5" Content-Transfer-Encoding: 7bit dnjymxjjocxnu ¥ß§YÀ°±zºô¸ô¶}©±Àç·~°µ¥Í·N!!
 


¥ß§YÀ°±zºô¸ô¶}©±Àç·~°µ¥Í·N!!

2¤p®É§Ö³tºô­¶»s§@¤Î­×§ï!!

        ºô­¶»s§@¶W§C»ù¥u­nNT800¤¸. §K¶Oºô§}!!

ºô¯¸¤º®e¥i¤À:
¤½¥q²¤¶. ²£«~¤¶²Ð. ²£«~¬Û¤ù. «È¤á¯d¨¥ªO. ©wÁʪí³æ. ±m¦â°Êµeµ¥µ¥
¦³·NªÌÅwªï¬¢½Í
!!

         ¥»³B´£¨Ñ°Ó®a¹ê¨Ò§@«~®i¥Ü: ½Ð¨Ómail¯Á¨ú!!  §¹¦¨ºô­¶»s§@. ¥ß§Yª¾·|±zªº§K¶Oºô§}. ¦p http://98.to/±zªº©R¦W(¤¤­^¤Î¼Æ¦r¬Ò¥i)

¡@ºô­¶»s§@©Î­×§ï¯d¨¥

Ápµ¸©m¦W

Ápµ¸¹q¸Ü
¤½¥q¦WºÙ

¹q¤l«H½c

¹w¦ôºô­¶¼Æ¶q 5­¶¥H¤U 5­¶-10­¶ 10­¶¥H¤W ¤£ª¾¹D

¥Ø«eºô§}
µL  ¦³

·PÁ±zªº¯d¨¥!!§Ú­Ì·|¾¨§Ö»P±zÁpµ¸!!

kyehnbecoxqnc ------=_Novasoft_Sagittarius_Professional_ Content-Type: text/html; Content-Transfer-Encoding: quoted-printable ------=_Novasoft_Sagittarius_Professional_ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sun Sep 30 1:49:32 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from critter.freebsd.dk (critter.freebsd.dk [212.242.86.163]) by hub.freebsd.org (Postfix) with ESMTP id 3104837B40D for ; Sun, 30 Sep 2001 01:49:30 -0700 (PDT) Received: from critter (localhost [127.0.0.1]) by critter.freebsd.dk (8.11.4/8.11.4) with ESMTP id f8U8mvv00911; Sun, 30 Sep 2001 10:48:57 +0200 (CEST) (envelope-from phk@critter.freebsd.dk) To: Matt Dillon Cc: Vladimir Dozen , Wilko Bulte , Alfred Perlstein , hackers@FreeBSD.ORG Subject: Re: VM: dynamic swap remapping (patch) In-Reply-To: Your message of "Sun, 30 Sep 2001 00:52:54 PDT." <200109300752.f8U7qsj41649@earth.backplane.com> Date: Sun, 30 Sep 2001 10:48:57 +0200 Message-ID: <909.1001839737@critter> From: Poul-Henning Kamp Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG In message <200109300752.f8U7qsj41649@earth.backplane.com>, Matt Dillon writes: >: Second, application not always grows to 1G, most of the time it keeps >: as small as 500M ;). Why should we precommit 1G for 500M data? Doing >: multi-mmap memory management is additional pain. > > Even using file-backed memory is fairly trivial. You don't need to > do multi-mmap memory management or do any kernel tweaking. Just > reserve 1G and use a single mmap() and file per process. I once had a patch to phkmalloc() which backed all malloc'ed VM with hidden files in the users homedir. It was written to put the VM usage under QUOTA control, but it had many useful side effects as well. I can't seem to find it right now, but it is trivial to do: just replace the sbrk(2) with mmap(). Only downside is the needed filedescriptor which some shells don't like. -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sun Sep 30 1:55:39 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from elvis.mu.org (elvis.mu.org [216.33.66.196]) by hub.freebsd.org (Postfix) with ESMTP id 444E137B40E for ; Sun, 30 Sep 2001 01:55:29 -0700 (PDT) Received: by elvis.mu.org (Postfix, from userid 1192) id 4608681D01; Sun, 30 Sep 2001 03:55:29 -0500 (CDT) Date: Sun, 30 Sep 2001 03:55:29 -0500 From: Alfred Perlstein To: Vladimir Dozen Cc: Matt Dillon , Wilko Bulte , hackers@FreeBSD.ORG Subject: Re: VM: dynamic swap remapping (patch) Message-ID: <20010930035529.G59854@elvis.mu.org> References: <20010929155941.A291@eix.do-labs.spb.ru> <20010929071024.Q59854@elvis.mu.org> <20010929141349.A80876@freebie.xs4all.nl> <200109291653.f8TGrRR37689@earth.backplane.com> <20010929232953.B341@eix.do-labs.spb.ru> <20010929175653.Z59854@elvis.mu.org> <20010930120328.A534@eix.do-labs.spb.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20010930120328.A534@eix.do-labs.spb.ru>; from vladimir-dozen@mail.ru on Sun, Sep 30, 2001 at 12:03:28PM +0000 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG * Vladimir Dozen [010930 03:02] wrote: > ehlo. > > > My suggestion, (but not my final say, i'm still open to ideas): > > > > Implement a memory status signal to notify processes of changes > > in the relative amount of system memory. > > > > When memory reaches a low or high watermark, the signal is > > broadcast to all running processes. > > > > The default disposition will be to ignore the signal. > > > > The signal will be named SIGMEMINFO. (SIGXfoo means > > 'process has exceeded resource foo') > > Agreed. As for SIG_IGN, can anyone tell me -- can I force > existing application to use my signal handler? For example, > by preallocating some shared library? If so, there are no > contras for ignoring signal by default. Yes, it's kind of evil, but you need to do this: make a .c file that has your signal handler and a function called _init that enables it. You also might want to export if we're in the low watermark via sysctl variable so that at startup you can set a variable to do things like make a malloc wrapper fail... compile it like so: gcc -shared -fpic -fPIC -o t2.So -c t2.c ; ld t2.So -shared -o t2.so then install it someplace, then set this in the environment: LD_PRELOAD=/path/to/where/you/put/it/t2.so All non-setuid and non-setgid programs will respect this. Now just because I told you that, doesn't mean you should run off now and use your solution, I hope you take the time to consider what I've got to say here. :) > > The signal will pass via the siginfo struct information > > such that the process can determine if the system has > > just exceeded the low watermark (danger) or has reclaimed > > down to the high watermark (enough free memory). > > Passing more info is always better. Agreed. It's just a trick so you only need one signal instead of a signal for both SIGMEMLOW (signal memory low) and SIGMEMOK (signal memory is ok, or enough is free). > > a) over allocate swap a bit and set the low watermark carefully. > > b) do the following enhancement: > > > > Provide a system whereby you can swap to the filesystem without > > additional upcalls/syscalls from userspace, basically, provide > > some means of paging to the filesystem automatically. > > > > then, set your lowwater mark to the size of your swap partition, > > now your system will alert your processes and automatically swap > > _anyone_ to the filesystem. > > > > I really think that this would be more flexible and still allow > > you to achieve what you want... What do you think? > > I can't say anything until I'll got detail. Sorry, English is neither > my native nor used often, so I may easely miss important details, but > here is my random comments: > > Initally, I was trying the same (I think) approach, but there was > some problems. Some kernel function refused to work with VM objects > of processes differing from curproc. I.e., it could be hard to work > with bigproc inside swap daemon; and swap daemon is the only place > where we can detect OOM condition; that's why I used signal to transfer > control to user space, and then back into kernel -- already in another > process. Another reason to do it -- to make all limits and quota work > automatically. Also, I did not wanted to make swap daemon busy too long. Well you can simply grab curproc to do this and steal the context, most likely you'll be in the context of a process that has faulted, the only trick you need to do is to write the file instead of directly to the device. The idea is to cause the next fault by any program to give you a 'curproc' to do filesystem operations. You could also wakeup() the swapper and set a flag to tell it to allocate some filesystem space, the problem (as you've stated) is that you can tie swapper up too long doing this. > Also, what means "over allocate swap a bit"? How to compute the value > of that bit? At what moment should we preallocate? Should we repeat > preallocation after getting SIGMEMINFO (himark)? You're still thinking of the combined solution, just think of a system where all you have right now is the signals I mentioned. Now remeber, your solution depends on spare space in the filesystem... Your spare space is most likely not known. Instead of depending on possibly non-existant spare space, just make your swap a little bigger and set your low watermark a bit lower. Now you have more time to do something when memory is low. > Also, you cannot set low mark to size of swap partition. To create > file-based swap you need some memory (file operations requires it). > So, low mark should be a bit lower (that's why I raised value of > nswap_lowat). Yes, you're right, I didn't consider this. You can start swapping to the filesystem at an earlier point then. > Finally, if you want to over allocate swap for every process in > system, the whole swap can wind up consisting of only preallocations. > Resource management is the role of kernel. Any hard reservation > interfere with that. I'm not argueing for pre-allocation, I'm just saying that at a certain point you're going to run out of swap. If that swap is in your filesystem you can still run out of filesystem space (if you even have any at that point). That's why you over allocate and set your low watermark appropriately. So instead of having 1gig of swap, and depending on having N blocks free in the filesystem, you allocate 1gig+N blocks of swap and watch for the signal to start freeing resources. Just think what happens if your filesystems are full and you run out of swap... -- -Alfred Perlstein [alfred@freebsd.org] 'Instead of asking why a piece of software is using "1970s technology," start asking why software is ignoring 30 years of accumulated wisdom.' To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sun Sep 30 2:12:34 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from netbank.com.br (garrincha.netbank.com.br [200.203.199.88]) by hub.freebsd.org (Postfix) with ESMTP id E1C5237B40D for ; Sun, 30 Sep 2001 02:12:24 -0700 (PDT) Received: from 1-011.ctame701-1.telepar.net.br (1-011.ctame701-1.telepar.net.br [200.181.137.11]) by netbank.com.br (Postfix) with ESMTP id 5D41F46818; Sun, 30 Sep 2001 06:07:16 -0300 (BRST) Received: (from localhost user: 'riel', uid#500) by imladris.surriel.com with ESMTP id ; Sun, 30 Sep 2001 06:11:49 -0300 Date: Sun, 30 Sep 2001 06:11:49 -0300 (BRST) From: Rik van Riel X-X-Sender: To: Alfred Perlstein Cc: Vladimir Dozen , Matt Dillon , Wilko Bulte , Subject: Re: VM: dynamic swap remapping (patch) In-Reply-To: <20010929175653.Z59854@elvis.mu.org> Message-ID: X-spambait: aardvark@kernelnewbies.org X-spammeplease: aardvark@nl.linux.org MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Sat, 29 Sep 2001, Alfred Perlstein wrote: > * Vladimir Dozen [010929 14:38] wrote: > > > P.S. Anyway, I do NOT insist my solution is better, and even that it > > is good for anything at all. It was fun for me to hack in BSD kernel, > > and it was interesting challenge, and I feel need to share results > > with others. At worst, I will recommend our customer to setup > > processing farm under FreeBSD with applied patch. > > I'm really impressed with the work you put into this, but it seems > that you've tried to tackle two problems at the same time, Indeed, the whole idea of swapping tasks to the filesystem in nice, but having the task do this all by itself isn't a good option for many people... > My suggestion, (but not my final say, i'm still open to ideas): > > Implement a memory status signal to notify processes of changes > in the relative amount of system memory. > > When memory reaches a low or high watermark, the signal is > broadcast to all running processes. > > The default disposition will be to ignore the signal. > > The signal will be named SIGMEMINFO. (SIGXfoo means > 'process has exceeded resource foo') That'd be SIGDANGER, right ? > b) do the following enhancement: > > Provide a system whereby you can swap to the filesystem without > additional upcalls/syscalls from userspace, basically, provide > some means of paging to the filesystem automatically. Sounds like a winner, when swap runs out a process gets suspended onto the filesystem automatically and SIGDANGER is sent out to give others a chance to clean themselves up. If enough space is freed, the suspended process can get back into the system. This should also preserve leaky applications while at the same time leaving the system intact... regards, Rik -- IA64: a worthy successor to i860. http://www.surriel.com/ http://distro.conectiva.com/ Send all your spam to aardvark@nl.linux.org (spam digging piggy) To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sun Sep 30 2:15:45 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from milliways.chance.ru (milliways.chance.ru [195.190.107.35]) by hub.freebsd.org (Postfix) with ESMTP id 5444E37B40C for ; Sun, 30 Sep 2001 02:15:41 -0700 (PDT) Received: from do-labs.spb.ru (ppp-1.chance.ru [195.190.107.4]) by milliways.chance.ru (8.9.0/8.9.0) with SMTP id NAA02822 for ; Sun, 30 Sep 2001 13:15:37 +0400 (MSD) Received: (qmail 403 invoked by uid 1000); 30 Sep 2001 13:18:40 -0000 Date: Sun, 30 Sep 2001 13:18:40 +0000 From: Vladimir Dozen To: Matt Dillon Cc: Vladimir Dozen , Wilko Bulte , Alfred Perlstein , hackers@FreeBSD.ORG Subject: Re: VM: dynamic swap remapping (patch) Message-ID: <20010930131839.A284@eix.do-labs.spb.ru> References: <20010929155941.A291@eix.do-labs.spb.ru> <20010929071024.Q59854@elvis.mu.org> <20010929141349.A80876@freebie.xs4all.nl> <200109291653.f8TGrRR37689@earth.backplane.com> <20010929232953.B341@eix.do-labs.spb.ru> <200109300752.f8U7qsj41649@earth.backplane.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.4i In-Reply-To: <200109300752.f8U7qsj41649@earth.backplane.com>; from dillon@earth.backplane.com on Sun, Sep 30, 2001 at 12:52:54AM -0700 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG ehlo. > : Second, application not always grows to 1G, most of the time it keeps > : as small as 500M ;). Why should we precommit 1G for 500M data? Doing > : multi-mmap memory management is additional pain. > > Why not? Disk space is cheap. Developer time is expensive. Someone already wrote good allocation routines, and they are inside libc. Reinventing bycicle in every new large-scale application doesn't sounds good for me. > For a problem like this I would simply > throw in two 30G+ hard drives and partition them with 16G of swap each, > giving me 32G of swap for the machine. As it was said here before, there are actually two problems: notification (avoiding silently kills) and getting more paging space. The second can be solved by adding swap space. The first -- cannot. As developer, I'm more interested in first. Current solution with killproc() is not acceptable. Just imagine any OS documentation which say: "the OS may terminate process at any point with no warning or notification". Would you like to use it? But this is exactly what FreeBSD does at OOM. > Even using file-backed memory is fairly trivial. You don't need to > do multi-mmap memory management or do any kernel tweaking. Just > reserve 1G and use a single mmap() and file per process. As I already said, it is not trivial. It involves writing/adopting some allocation stuff. It means time & human resources -> money. -- dozen @ home To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sun Sep 30 2:22:45 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from elvis.mu.org (elvis.mu.org [216.33.66.196]) by hub.freebsd.org (Postfix) with ESMTP id A0D5937B40D for ; Sun, 30 Sep 2001 02:22:41 -0700 (PDT) Received: by elvis.mu.org (Postfix, from userid 1192) id 2D45981D01; Sun, 30 Sep 2001 04:22:36 -0500 (CDT) Date: Sun, 30 Sep 2001 04:22:36 -0500 From: Alfred Perlstein To: Rik van Riel Cc: Vladimir Dozen , Matt Dillon , Wilko Bulte , hackers@FreeBSD.ORG Subject: Re: VM: dynamic swap remapping (patch) Message-ID: <20010930042236.H59854@elvis.mu.org> References: <20010929175653.Z59854@elvis.mu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: ; from riel@conectiva.com.br on Sun, Sep 30, 2001 at 06:11:49AM -0300 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG * Rik van Riel [010930 04:12] wrote: > On Sat, 29 Sep 2001, Alfred Perlstein wrote: > > * Vladimir Dozen [010929 14:38] wrote: > > > > > P.S. Anyway, I do NOT insist my solution is better, and even that it > > > is good for anything at all. It was fun for me to hack in BSD kernel, > > > and it was interesting challenge, and I feel need to share results > > > with others. At worst, I will recommend our customer to setup > > > processing farm under FreeBSD with applied patch. > > > > I'm really impressed with the work you put into this, but it seems > > that you've tried to tackle two problems at the same time, > > Indeed, the whole idea of swapping tasks to the filesystem > in nice, but having the task do this all by itself isn't a > good option for many people... > > > My suggestion, (but not my final say, i'm still open to ideas): > > > > Implement a memory status signal to notify processes of changes > > in the relative amount of system memory. > > > > When memory reaches a low or high watermark, the signal is > > broadcast to all running processes. > > > > The default disposition will be to ignore the signal. > > > > The signal will be named SIGMEMINFO. (SIGXfoo means > > 'process has exceeded resource foo') > > That'd be SIGDANGER, right ? Sort of. > > > b) do the following enhancement: > > > > Provide a system whereby you can swap to the filesystem without > > additional upcalls/syscalls from userspace, basically, provide > > some means of paging to the filesystem automatically. > > Sounds like a winner, when swap runs out a process gets > suspended onto the filesystem automatically and SIGDANGER > is sent out to give others a chance to clean themselves > up. Well, no, the idea is to have a low and high watermark so that flip-flopping on the boundry doesn't generate a lot of signals. SIGDANGER is ok for a name, but slightly misleading because I wanted to piggyback some info in the siginfo to tell processes when the danger has passed. Well ok, the name is ok, but I do want an upcall when the situation is alleviated. Let me also state that it may be wise to add huristics to the system to not SIGDANGER anything that is completely swapped out or hasn't run in a long time, this would avoid a spike in thrashing at the time of the broadcast. > If enough space is freed, the suspended process can get > back into the system. > > This should also preserve leaky applications while at the > same time leaving the system intact... Hopefully, also having a SIGDANGER handler may be an indication to the kernel to give you a second chance before shooting at you, I know it could be used to subvert behavior to have another niave program killed, however that could be a tunable to give those trying to do the right thing a second chance. -- -Alfred Perlstein [alfred@freebsd.org] 'Instead of asking why a piece of software is using "1970s technology," start asking why software is ignoring 30 years of accumulated wisdom.' To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sun Sep 30 2:41:41 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from milliways.chance.ru (milliways.chance.ru [195.190.107.35]) by hub.freebsd.org (Postfix) with ESMTP id 1CD2E37B40C for ; Sun, 30 Sep 2001 02:41:38 -0700 (PDT) Received: from do-labs.spb.ru (ppp-7.chance.ru [195.190.107.10]) by milliways.chance.ru (8.9.0/8.9.0) with SMTP id NAA03089 for ; Sun, 30 Sep 2001 13:41:34 +0400 (MSD) Received: (qmail 570 invoked by uid 1000); 30 Sep 2001 13:44:37 -0000 Date: Sun, 30 Sep 2001 13:44:37 +0000 From: Vladimir Dozen To: Alfred Perlstein Cc: Vladimir Dozen , Matt Dillon , Wilko Bulte , hackers@FreeBSD.ORG Subject: Re: VM: dynamic swap remapping (patch) Message-ID: <20010930134437.B284@eix.do-labs.spb.ru> References: <20010929155941.A291@eix.do-labs.spb.ru> <20010929071024.Q59854@elvis.mu.org> <20010929141349.A80876@freebie.xs4all.nl> <200109291653.f8TGrRR37689@earth.backplane.com> <20010929232953.B341@eix.do-labs.spb.ru> <20010929175653.Z59854@elvis.mu.org> <20010930120328.A534@eix.do-labs.spb.ru> <20010930035529.G59854@elvis.mu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.4i In-Reply-To: <20010930035529.G59854@elvis.mu.org>; from bright@mu.org on Sun, Sep 30, 2001 at 03:55:29AM -0500 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG ehlo. > You're still thinking of the combined solution, just think of a > system where all you have right now is the signals I mentioned. Yah, now I think I got it. Well, actually, signal(s) is all I need. The remapping was just a bonus. To be more precise, I need the only signal -- at low mark passed. Some other application might be interested in second -- hi mark -- signal, but my doesn't. SIGDANGER is the signal from Irix, AFAIR? So, how about to accept this name (just to not increase entropy of the Universe) and send it to all processes when nswap_lowat reached? The only point -- I prefer to have ability to set nswap_lowat via sysctl since I cannot predict what amount of memory can be consumed while freeing memory ;) (e.g., throwing exception in C++ may eat memory due to creating exception object; logging may eat memory also). > Just think what happens if your filesystems are full and you run > out of swap... The same that happens today -- killproc() will kill me. The situation doesn't becomes worse with remapping, it just ... mmm... prolonges. -- dozen @ home To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sun Sep 30 2:44:15 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from elvis.mu.org (elvis.mu.org [216.33.66.196]) by hub.freebsd.org (Postfix) with ESMTP id 7F4EA37B40C for ; Sun, 30 Sep 2001 02:44:11 -0700 (PDT) Received: by elvis.mu.org (Postfix, from userid 1192) id 70C0A81D06; Sun, 30 Sep 2001 04:44:11 -0500 (CDT) Date: Sun, 30 Sep 2001 04:44:11 -0500 From: Alfred Perlstein To: Vladimir Dozen Cc: Matt Dillon , Wilko Bulte , hackers@FreeBSD.ORG Subject: Re: VM: dynamic swap remapping (patch) Message-ID: <20010930044411.I59854@elvis.mu.org> References: <20010929155941.A291@eix.do-labs.spb.ru> <20010929071024.Q59854@elvis.mu.org> <20010929141349.A80876@freebie.xs4all.nl> <200109291653.f8TGrRR37689@earth.backplane.com> <20010929232953.B341@eix.do-labs.spb.ru> <20010929175653.Z59854@elvis.mu.org> <20010930120328.A534@eix.do-labs.spb.ru> <20010930035529.G59854@elvis.mu.org> <20010930134437.B284@eix.do-labs.spb.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20010930134437.B284@eix.do-labs.spb.ru>; from vladimir-dozen@mail.ru on Sun, Sep 30, 2001 at 01:44:37PM +0000 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG * Vladimir Dozen [010930 04:41] wrote: > ehlo. > > > You're still thinking of the combined solution, just think of a > > system where all you have right now is the signals I mentioned. > > Yah, now I think I got it. Well, actually, signal(s) is all > I need. The remapping was just a bonus. To be more precise, > I need the only signal -- at low mark passed. Some other > application might be interested in second -- hi mark -- > signal, but my doesn't. > > SIGDANGER is the signal from Irix, AFAIR? > > So, how about to accept this name (just to not increase entropy > of the Universe) and send it to all processes when nswap_lowat > reached? > > The only point -- I prefer to have ability to set nswap_lowat > via sysctl since I cannot predict what amount of memory can > be consumed while freeing memory ;) (e.g., throwing exception > in C++ may eat memory due to creating exception object; logging > may eat memory also). You want to submit a patch? If not I can take a look at it, but it's been a bit since I've looked at the vm system. > > > Just think what happens if your filesystems are full and you run > > out of swap... > > The same that happens today -- killproc() will kill me. > The situation doesn't becomes worse with remapping, it just > ... mmm... prolonges. > > -- > dozen @ home -- -Alfred Perlstein [alfred@freebsd.org] 'Instead of asking why a piece of software is using "1970s technology," start asking why software is ignoring 30 years of accumulated wisdom.' To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sun Sep 30 3:57:40 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from milliways.chance.ru (milliways.chance.ru [195.190.107.35]) by hub.freebsd.org (Postfix) with ESMTP id 2B10B37B408 for ; Sun, 30 Sep 2001 03:57:32 -0700 (PDT) Received: from do-labs.spb.ru (ppp-7.chance.ru [195.190.107.10]) by milliways.chance.ru (8.9.0/8.9.0) with SMTP id OAA03968 for ; Sun, 30 Sep 2001 14:57:28 +0400 (MSD) Received: (qmail 3905 invoked by uid 1000); 30 Sep 2001 15:00:31 -0000 Date: Sun, 30 Sep 2001 15:00:31 +0000 From: Vladimir Dozen To: Alfred Perlstein Cc: Vladimir Dozen , Matt Dillon , Wilko Bulte , hackers@FreeBSD.ORG Subject: Re: VM: dynamic swap remapping (patch) Message-ID: <20010930150031.C284@eix.do-labs.spb.ru> References: <20010929155941.A291@eix.do-labs.spb.ru> <20010929071024.Q59854@elvis.mu.org> <20010929141349.A80876@freebie.xs4all.nl> <200109291653.f8TGrRR37689@earth.backplane.com> <20010929232953.B341@eix.do-labs.spb.ru> <20010929175653.Z59854@elvis.mu.org> <20010930120328.A534@eix.do-labs.spb.ru> <20010930035529.G59854@elvis.mu.org> <20010930134437.B284@eix.do-labs.spb.ru> <20010930044411.I59854@elvis.mu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.4i In-Reply-To: <20010930044411.I59854@elvis.mu.org>; from bright@mu.org on Sun, Sep 30, 2001 at 04:44:11AM -0500 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG ehlo. > You want to submit a patch? If not I can take a look at it, > but it's been a bit since I've looked at the vm system. except for sysctl, the patch is quite simple due to the fact that histeresis is already implemented in swap_pager.c, something like: ============================================ diff vm/swap_pager.c vm.new/swap_pager.c 217a218,219 > struct proc* p; > 218a221,225 > /* warn all processes */ > for( p = allproc.lh_first; p != 0; p = p->p_list.le_next ) > { > psignal(p,SIGDANGER); > } ============================================ ============================================ diff sys/signal.h sys.new/signal.h 105a106,109 > #ifndef _POSIX_SOURCE > #define SIGDANGER 32 /* close to out-of-memory */ > #endif > ============================================ ============================================ diff kern/kern_sig.c kern.new/kern_sig.c 165a166 > SA_IGNORE /* SIGDANGER */ ============================================ -- dozen @ home To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sun Sep 30 4:16:22 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from milliways.chance.ru (milliways.chance.ru [195.190.107.35]) by hub.freebsd.org (Postfix) with ESMTP id 15F7D37B40D for ; Sun, 30 Sep 2001 04:16:17 -0700 (PDT) Received: from do-labs.spb.ru (ppp-5.chance.ru [195.190.107.8]) by milliways.chance.ru (8.9.0/8.9.0) with SMTP id PAA04171 for ; Sun, 30 Sep 2001 15:16:14 +0400 (MSD) Received: (qmail 7493 invoked by uid 1000); 30 Sep 2001 15:19:17 -0000 Date: Sun, 30 Sep 2001 15:19:17 +0000 From: Vladimir Dozen To: Vladimir Dozen Cc: Alfred Perlstein , Matt Dillon , Wilko Bulte , hackers@FreeBSD.ORG Subject: Re: VM: dynamic swap remapping (patch) Message-ID: <20010930151917.A7479@eix.do-labs.spb.ru> References: <20010929071024.Q59854@elvis.mu.org> <20010929141349.A80876@freebie.xs4all.nl> <200109291653.f8TGrRR37689@earth.backplane.com> <20010929232953.B341@eix.do-labs.spb.ru> <20010929175653.Z59854@elvis.mu.org> <20010930120328.A534@eix.do-labs.spb.ru> <20010930035529.G59854@elvis.mu.org> <20010930134437.B284@eix.do-labs.spb.ru> <20010930044411.I59854@elvis.mu.org> <20010930150031.C284@eix.do-labs.spb.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.4i In-Reply-To: <20010930150031.C284@eix.do-labs.spb.ru>; from vladimir-dozen@mail.ru on Sun, Sep 30, 2001 at 03:00:31PM +0000 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG ehlo. > ============================================ > diff vm/swap_pager.c vm.new/swap_pager.c > 217a218,219 > > struct proc* p; > > > 218a221,225 > > /* warn all processes */ > > for( p = allproc.lh_first; p != 0; p = p->p_list.le_next ) > > { > > psignal(p,SIGDANGER); > > } > ============================================ Oops, it doesn't work. All processes died. Why? Something should be changed in libc? -- dozen @ home To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sun Sep 30 4:18:55 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from elvis.mu.org (elvis.mu.org [216.33.66.196]) by hub.freebsd.org (Postfix) with ESMTP id AE72037B411 for ; Sun, 30 Sep 2001 04:18:49 -0700 (PDT) Received: by elvis.mu.org (Postfix, from userid 1192) id 1BE6881D01; Sun, 30 Sep 2001 06:18:44 -0500 (CDT) Date: Sun, 30 Sep 2001 06:18:44 -0500 From: Alfred Perlstein To: Vladimir Dozen Cc: Matt Dillon , Wilko Bulte , hackers@FreeBSD.ORG Subject: Re: VM: dynamic swap remapping (patch) Message-ID: <20010930061844.J59854@elvis.mu.org> References: <20010929141349.A80876@freebie.xs4all.nl> <200109291653.f8TGrRR37689@earth.backplane.com> <20010929232953.B341@eix.do-labs.spb.ru> <20010929175653.Z59854@elvis.mu.org> <20010930120328.A534@eix.do-labs.spb.ru> <20010930035529.G59854@elvis.mu.org> <20010930134437.B284@eix.do-labs.spb.ru> <20010930044411.I59854@elvis.mu.org> <20010930150031.C284@eix.do-labs.spb.ru> <20010930151917.A7479@eix.do-labs.spb.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20010930151917.A7479@eix.do-labs.spb.ru>; from vladimir-dozen@mail.ru on Sun, Sep 30, 2001 at 03:19:17PM +0000 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG * Vladimir Dozen [010930 06:16] wrote: > ehlo. > > > ============================================ > > diff vm/swap_pager.c vm.new/swap_pager.c > > 217a218,219 > > > struct proc* p; > > > > > 218a221,225 > > > /* warn all processes */ > > > for( p = allproc.lh_first; p != 0; p = p->p_list.le_next ) > > > { > > > psignal(p,SIGDANGER); > > > } > > ============================================ > > Oops, it doesn't work. All processes died. Why? > Something should be changed in libc? I'll take a look at implementing it sometime this week. I want to do the siginfo thing if possible. -- -Alfred Perlstein [alfred@freebsd.org] 'Instead of asking why a piece of software is using "1970s technology," start asking why software is ignoring 30 years of accumulated wisdom.' To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sun Sep 30 8: 9: 4 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from mail.shell-server.com (24-109-11-245.ivideon.com [24.109.11.245]) by hub.freebsd.org (Postfix) with SMTP id CDD8F37B40A for ; Sun, 30 Sep 2001 08:08:53 -0700 (PDT) Received: (qmail 12861 invoked from network); 30 Sep 2001 15:08:53 -0000 Received: from betsy.shell-server.com (HELO there) (192.168.3.2) by erin-rl0.shell-server.com with SMTP; 30 Sep 2001 15:08:53 -0000 Content-Type: text/plain; charset="iso-8859-1" From: Bart Kus Message-Id: <200109301003.06903@EO> To: hackers@freebsd.org Subject: sio modification Date: Sun, 30 Sep 2001 10:10:04 -0500 X-Mailer: KMail [version 1.3] MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Hello, I'm wondering about a seemingly simple sio.c modification. The problem stems from me wanting to use this dang remote control receiver, which manipulates the CD line of the serial port it plugs into. Afaik, the UART itself is capable of generating an interrupt whenever CD changes. The problem is, sio.c doesn't support this feature. I'm stuck with polling the status register to find out the state of CD. Not a very good solution for a daemon that's supposed to run in the background all the time, especially since the CD line will be toggled at about 40kHz (I think that's the remote control frequency standard). Perhaps I'm wrong about the 40kHz figure. Anyways, who is in charge of sio.c? Any change I make to it would result in the interface to sio changing, so I think I should collaborate with someone who knows what they're talking about when it comes to sio. --Bart To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sun Sep 30 8:17: 5 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from mail.shell-server.com (24-109-11-245.ivideon.com [24.109.11.245]) by hub.freebsd.org (Postfix) with SMTP id 1C01B37B40D for ; Sun, 30 Sep 2001 08:16:51 -0700 (PDT) Received: (qmail 12894 invoked from network); 30 Sep 2001 15:16:50 -0000 Received: from betsy.shell-server.com (HELO there) (192.168.3.2) by erin-rl0.shell-server.com with SMTP; 30 Sep 2001 15:16:50 -0000 Content-Type: text/plain; charset="iso-8859-1" From: Bart Kus Message-Id: <200109301010.07784@EO> To: hackers@freebsd.org Subject: precise timing Date: Sun, 30 Sep 2001 10:18:01 -0500 X-Mailer: KMail [version 1.3] MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On a totally unrelated subject to my sio.c message, I have a second problem. I've built a computer-controlled drill, that is controlled via the parallel port. This drill uses stepper motors, at 1/2 step. My driver software implements a maximum-acceleration control algorithm that ensures that at any point in time, any axis will not experience more than X m/s/s of acceleration. This keeps the drill from self-destructing. :) Unfortunately, it means I need access to a very precise timing source to issue the step instructions to the motor control board. Right now, I use for() as a timing loop. I calibrate it on program start and can then get very precise timing. There are, of course, the intermittent interruptions of the multitasker. So this solution is not ideal by any means. In fact, the for() loop approach is really meant for the DOS port of this software. I'm wondering if there is any way I can access a more precise interrupt-driven (or blocking) timing source. I know I can do a select() with supposedly microsecond accuracy, but I doubt that it is in fact that accurate in practice (doesn't the kernel only use a 100Hz clock or something?). Is there any way to get at the system timers on the motherboard? Those can provide precise timing, no? --Bart To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sun Sep 30 8:38:30 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from critter.freebsd.dk (critter.freebsd.dk [212.242.86.163]) by hub.freebsd.org (Postfix) with ESMTP id 2C73C37B409 for ; Sun, 30 Sep 2001 08:38:26 -0700 (PDT) Received: from critter (localhost [127.0.0.1]) by critter.freebsd.dk (8.11.4/8.11.4) with ESMTP id f8UFcLv03804; Sun, 30 Sep 2001 17:38:21 +0200 (CEST) (envelope-from phk@critter.freebsd.dk) To: Bart Kus Cc: hackers@FreeBSD.ORG Subject: Re: sio modification In-Reply-To: Your message of "Sun, 30 Sep 2001 10:10:04 CDT." <200109301003.06903@EO> Date: Sun, 30 Sep 2001 17:38:21 +0200 Message-ID: <3802.1001864301@critter> From: Poul-Henning Kamp Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG In message <200109301003.06903@EO>, Bart Kus writes: > Hello, I'm wondering about a seemingly simple sio.c modification. The >problem stems from me wanting to use this dang remote control receiver, which >manipulates the CD line of the serial port it plugs into. Afaik, the UART >itself is capable of generating an interrupt whenever CD changes. The >problem is, sio.c doesn't support this feature. I'm stuck with polling the >status register to find out the state of CD. Not a very good solution for a >daemon that's supposed to run in the background all the time, especially >since the CD line will be toggled at about 40kHz (I think that's the remote >control frequency standard). Perhaps I'm wrong about the 40kHz figure. Your machine will not work too well if it is 40kHz. The PPS-API allows you to timestamp edges on DCD, if the frequency is more reasonable, that would work for you. Find RFC27xx for more info about PPS-API. -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sun Sep 30 9: 2:41 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from srv1.cosmo-project.de (srv1.cosmo-project.de [213.83.6.106]) by hub.freebsd.org (Postfix) with ESMTP id 5F8BB37B409 for ; Sun, 30 Sep 2001 09:02:37 -0700 (PDT) Received: from mail.cicely.de (cicely20 [10.1.1.22]) by srv1.cosmo-project.de (8.11.0/8.11.0) with ESMTP id f8UG2Q634051; Sun, 30 Sep 2001 18:02:28 +0200 (CEST) Received: (from ticso@localhost) by mail.cicely.de (8.11.0/8.11.0) id f8UG33P19657; Sun, 30 Sep 2001 18:03:03 +0200 (CEST) Date: Sun, 30 Sep 2001 18:03:02 +0200 From: Bernd Walter To: Bart Kus Cc: hackers@FreeBSD.ORG Subject: Re: precise timing Message-ID: <20010930180302.A19621@cicely20.cicely.de> References: <200109301010.07784@EO> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <200109301010.07784@EO>; from bsd@shell-server.com on Sun, Sep 30, 2001 at 10:18:01AM -0500 X-Operating-System: NetBSD cicely20.cicely.de 1.5 sparc Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Sun, Sep 30, 2001 at 10:18:01AM -0500, Bart Kus wrote: > On a totally unrelated subject to my sio.c message, I have a second problem. > I've built a computer-controlled drill, that is controlled via the parallel > port. This drill uses stepper motors, at 1/2 step. My driver software > implements a maximum-acceleration control algorithm that ensures that at any > point in time, any axis will not experience more than X m/s/s of > acceleration. This keeps the drill from self-destructing. :) Unfortunately, > it means I need access to a very precise timing source to issue the step > instructions to the motor control board. > > Right now, I use for() as a timing loop. I calibrate it on program start > and can then get very precise timing. There are, of course, the intermittent > interruptions of the multitasker. So this solution is not ideal by any > means. In fact, the for() loop approach is really meant for the DOS port of > this software. I'm wondering if there is any way I can access a more precise > interrupt-driven (or blocking) timing source. I know I can do a select() > with supposedly microsecond accuracy, but I doubt that it is in fact that > accurate in practice (doesn't the kernel only use a 100Hz clock or > something?). Is there any way to get at the system timers on the > motherboard? Those can provide precise timing, no? Controlling steppers via lpt is what I explained and showed last tuesday on the cosmo-project meeting. We used nanosleep() which worked fine for the demonstration and playing. As long as you don't have troubles with longer than requested periods this would fit your needs. Nevertheless in my opinion it's a job for a dedicated CPU/controller. Think about using an 68HC11 or something like that. If you can enshure not only minimum but also maximum step times you can even get the motor faster - well not with lowered drill of course. You can shorten the steps while the motor is rotating which you can't do at once. -- B.Walter COSMO-Project http://www.cosmo-project.de ticso@cicely.de Usergroup info@cosmo-project.de To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sun Sep 30 10:30:25 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from thunderer.cnchost.com (thunderer.concentric.net [207.155.252.72]) by hub.freebsd.org (Postfix) with ESMTP id 3886737B403 for ; Sun, 30 Sep 2001 10:30:21 -0700 (PDT) Received: from bitblocks.com (adsl-209-204-185-216.sonic.net [209.204.185.216]) by thunderer.cnchost.com id NAA29134; Sun, 30 Sep 2001 13:30:34 -0400 (EDT) [ConcentricHost SMTP Relay 1.14] Message-ID: <200109301730.NAA29134@thunderer.cnchost.com> To: Bart Kus Cc: hackers@freebsd.org Subject: Re: precise timing In-reply-to: Your message of "Sun, 30 Sep 2001 10:18:01 CDT." <200109301010.07784@EO> Date: Sun, 30 Sep 2001 10:30:15 -0700 From: Bakul Shah Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG > On a totally unrelated subject to my sio.c message, I have a second problem. > I've built a computer-controlled drill, that is controlled via the parallel > port. This drill uses stepper motors, at 1/2 step. My driver software > implements a maximum-acceleration control algorithm that ensures that at any > point in time, any axis will not experience more than X m/s/s of > acceleration. This keeps the drill from self-destructing. :) Unfortunately, > it means I need access to a very precise timing source to issue the step > instructions to the motor control board. Are you controlling the rotation speed of the drill or the x,y,z position? I'd guess the latter. Don't you also need guaranteed real time response (which FreeBSD won't provide you)? I suppose if you are controlling the position (and not the velocity) RT response won't be too critical. At any rate you are better off writing a device driver which can run timing critical code while blocking out all other interrupts. Or else between the time you measure time and supply the next pulse a higher prio interrupt handler else may sneak in. As was suggested you may want to consider a dedicated cpu based controller. Thre are a number of solutions for hobbyists (such as the handyboard, see www.handyboard.com). Is this a totally homebrew drill or something from a kit? I'd be interested in details (probably better offline since the interection of freebsd s/w hackers & h/w hackers is tiny). To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sun Sep 30 10:49:34 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from bogslab.ucdavis.edu (bogslab.ucdavis.edu [169.237.68.34]) by hub.freebsd.org (Postfix) with ESMTP id 931D837B408 for ; Sun, 30 Sep 2001 10:49:31 -0700 (PDT) Received: from thistle.bogs.org (thistle.bogs.org [198.137.203.61]) by bogslab.ucdavis.edu (8.9.3/8.9.3) with ESMTP id KAA81837 for ; Sun, 30 Sep 2001 10:49:23 -0700 (PDT) (envelope-from greg@bogslab.ucdavis.edu) Received: from thistle.bogs.org (localhost [127.0.0.1]) by thistle.bogs.org (8.11.3/8.11.3) with ESMTP id f8UHlsA35003 for ; Sun, 30 Sep 2001 10:47:55 -0700 (PDT) (envelope-from greg@thistle.bogs.org) Message-Id: <200109301747.f8UHlsA35003@thistle.bogs.org> To: hackers@FreeBSD.ORG X-To: Bart Kus X-Sender: owner-freebsd-hackers@FreeBSD.ORG Subject: Re: precise timing In-reply-to: Your message of "Sun, 30 Sep 2001 10:18:01 CDT." <200109301010.07784@EO> Reply-To: gkshenaut@ucdavis.edu Date: Sun, 30 Sep 2001 10:47:53 -0700 From: Greg Shenaut Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG In message <200109301010.07784@EO>, Bart Kus cleopede: > On a totally unrelated subject to my sio.c message, I have a second problem. > I've built a computer-controlled drill, that is controlled via the parallel >port. This drill uses stepper motors, at 1/2 step. My driver software >implements a maximum-acceleration control algorithm that ensures that at any >point in time, any axis will not experience more than X m/s/s of >acceleration. This keeps the drill from self-destructing. :) Unfortunately, >it means I need access to a very precise timing source to issue the step >instructions to the motor control board. > > Right now, I use for() as a timing loop. I calibrate it on program start >and can then get very precise timing. There are, of course, the intermittent >interruptions of the multitasker. So this solution is not ideal by any >means. In fact, the for() loop approach is really meant for the DOS port of >this software. I'm wondering if there is any way I can access a more precise >interrupt-driven (or blocking) timing source. I know I can do a select() >with supposedly microsecond accuracy, but I doubt that it is in fact that >accurate in practice (doesn't the kernel only use a 100Hz clock or >something?). Well, setitimer has a maximum rate of 100 Hz, with a slop factor sometimes much greater than 10 ms. This was the result of some recent testing on a lightly-loaded standard 4.3 system. >Is there any way to get at the system timers on the >motherboard? Those can provide precise timing, no? But not necessarily realtime response if you are generating the stepper pulses yourself. How many stepper motors are you driving? If it's only one at a time, then maybe the speaker port on the motherboard (a programmable counter-timer) would be more reliable. Another idea is to use a fifo'ed UART's data out line and fiddle with the baud rate to vary the speed of the pulses. And one final idea is to use a (possibly port-powered) MCU as an independent timer generator. Greg Shenaut To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sun Sep 30 10:55:13 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from w250.z064001178.sjc-ca.dsl.cnc.net (w250.z064001178.sjc-ca.dsl.cnc.net [64.1.178.250]) by hub.freebsd.org (Postfix) with SMTP id 2EF0A37B401 for ; Sun, 30 Sep 2001 10:55:10 -0700 (PDT) Received: (qmail 6418 invoked by uid 1000); 30 Sep 2001 17:55:31 -0000 Date: Sun, 30 Sep 2001 10:55:09 -0700 From: Jos Backus To: hackers@FreeBSD.ORG Subject: Re: VM: dynamic swap remapping (patch) Message-ID: <20010930105509.B2220@lizzy.bugworks.com> Reply-To: Jos Backus Mail-Followup-To: hackers@FreeBSD.ORG References: <20010929155941.A291@eix.do-labs.spb.ru> <20010929071024.Q59854@elvis.mu.org> <20010929141349.A80876@freebie.xs4all.nl> <200109291653.f8TGrRR37689@earth.backplane.com> <20010929232953.B341@eix.do-labs.spb.ru> <20010929175653.Z59854@elvis.mu.org> <20010930120328.A534@eix.do-labs.spb.ru> <20010930035529.G59854@elvis.mu.org> <20010930134437.B284@eix.do-labs.spb.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20010930134437.B284@eix.do-labs.spb.ru> User-Agent: Mutt/1.3.22.1i Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Sun, Sep 30, 2001 at 01:44:37PM +0000, Vladimir Dozen wrote: > SIGDANGER is the signal from Irix, AFAIR? AIX has SIGDANGER. -- Jos Backus _/ _/_/_/ Santa Clara, CA _/ _/ _/ _/ _/_/_/ _/ _/ _/ _/ josb@cncdsl.com _/_/ _/_/_/ use Std::Disclaimer; To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sun Sep 30 11:18:41 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from critter.freebsd.dk (critter.freebsd.dk [212.242.86.163]) by hub.freebsd.org (Postfix) with ESMTP id 7B9A637B40B for ; Sun, 30 Sep 2001 11:18:31 -0700 (PDT) Received: from critter (localhost [127.0.0.1]) by critter.freebsd.dk (8.11.4/8.11.4) with ESMTP id f8UIIGv05137; Sun, 30 Sep 2001 20:18:20 +0200 (CEST) (envelope-from phk@critter.freebsd.dk) To: Bart Kus Cc: hackers@freebsd.org Subject: Re: sio modification In-Reply-To: Your message of "Sun, 30 Sep 2001 12:56:02 CDT." <200109301226.0779@EO> Date: Sun, 30 Sep 2001 20:18:16 +0200 Message-ID: <5135.1001873896@critter> From: Poul-Henning Kamp Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG In message <200109301226.0779@EO>, Bart Kus writes: >On Sunday 30 September 2001 10:38, you wrote: >> Your machine will not work too well if it is 40kHz. >> >> The PPS-API allows you to timestamp edges on DCD, if the frequency is >> more reasonable, that would work for you. Find RFC27xx for more info >> about PPS-API. > > Oh really. I was actually reading pps.c, and it looked like it was for the >parallel port interrupt pin only. I'd rather avoid cutting up this connector >if I can. Is the DCD edge timestamp (which would be PERFECT) already >implemented, or is this a spec for me to write for when modifying sio.c? It's in sio.c already. -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sun Sep 30 11:22:47 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from smtp.bmi.net (smtp.bmi.net [204.57.191.31]) by hub.freebsd.org (Postfix) with ESMTP id 73C6937B417 for ; Sun, 30 Sep 2001 11:22:35 -0700 (PDT) Received: from johncoop.MSHOME (drumheller-router.bmi.net [206.63.201.3] (may be forged)) by smtp.bmi.net (Pro-8.9.3/Pro-8.9.3) with ESMTP id SAA10158 for ; Sun, 30 Sep 2001 18:29:33 -0700 Date: Sun, 30 Sep 2001 11:22:24 -0700 From: John Merryweather Cooper To: freebsd-hackers@freebsd.org Subject: Looking for testers for PR ports/30821 Message-ID: <20010930112224.A25818@johncoop.MSHOME> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Mailer: Balsa 1.2.0 Lines: 21 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Rexx-IMC doesn't build on -CURRENT at the moment (so says Bento). This PR contains a patch, but I'm -CURRENT-less. Could someone build things and let me know? In addition to the sample scripts in the examples directory tree (which have all been modified to run from a commandline just like any other script), doing: rexx -s 'say sqrt(2)' will verify that the math extensions work. Thanks. -- jmc MacroHard -- the perfection of form over substance, marketing over performance, and greed over design . . . To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sun Sep 30 11:36:20 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from mail.shell-server.com (24-109-11-245.ivideon.com [24.109.11.245]) by hub.freebsd.org (Postfix) with SMTP id 987A337B401 for ; Sun, 30 Sep 2001 11:36:13 -0700 (PDT) Received: (qmail 13631 invoked from network); 30 Sep 2001 18:09:30 -0000 Received: from betsy.shell-server.com (HELO there) (192.168.3.2) by erin-rl0.shell-server.com with SMTP; 30 Sep 2001 18:09:30 -0000 Content-Type: text/plain; charset="iso-8859-1" From: Bart Kus Message-Id: <200109301303.08611@EO> To: Bernd Walter Subject: Re: precise timing Date: Sun, 30 Sep 2001 13:10:35 -0500 X-Mailer: KMail [version 1.3] Cc: hackers@FreeBSD.ORG References: <200109301010.07784@EO> <20010930180302.A19621@cicely20.cicely.de> In-Reply-To: <20010930180302.A19621@cicely20.cicely.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Sunday 30 September 2001 11:03, Bernd Walter wrote: > Controlling steppers via lpt is what I explained and showed last > tuesday on the cosmo-project meeting. > We used nanosleep() which worked fine for the demonstration and > playing. > As long as you don't have troubles with longer than requested periods > this would fit your needs. Is there a record of your explanation somewhere? As for the longer-than-requested timing periods, yes that is a problem. If maximum velocity of the drill is 30cm/s, a sudden stop would not be good. I can of course change the MAX_V, but I'm still hoping for a non-kludgy solution. > Nevertheless in my opinion it's a job for a dedicated CPU/controller. > Think about using an 68HC11 or something like that. > If you can enshure not only minimum but also maximum step times you > can even get the motor faster - well not with lowered drill of course. I agree. This does need a dedicated MCU. However, I only had 1 PCB layer to work with, so simplicity was key here. > You can shorten the steps while the motor is rotating which you can't > do at once. What do you mean here? I already do use variable timing for the steps BTW. Remember, the motors perform constant-acceleration operations...it means they slowly approach MAX_V. It's pretty neat to listen to. :) --Bart To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sun Sep 30 11:43:36 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from mail.shell-server.com (24-109-11-245.ivideon.com [24.109.11.245]) by hub.freebsd.org (Postfix) with SMTP id C491F37B401 for ; Sun, 30 Sep 2001 11:43:30 -0700 (PDT) Received: (qmail 13658 invoked from network); 30 Sep 2001 18:16:49 -0000 Received: from betsy.shell-server.com (HELO there) (192.168.3.2) by erin-rl0.shell-server.com with SMTP; 30 Sep 2001 18:16:49 -0000 Content-Type: text/plain; charset="iso-8859-1" From: Bart Kus Message-Id: <200109301311.5635@EO> To: Bakul Shah Subject: Re: precise timing Date: Sun, 30 Sep 2001 13:17:52 -0500 X-Mailer: KMail [version 1.3] Cc: hackers@freebsd.org References: <200109301730.NAA29134@thunderer.cnchost.com> In-Reply-To: <200109301730.NAA29134@thunderer.cnchost.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Sunday 30 September 2001 12:30, Bakul Shah wrote: > Are you controlling the rotation speed of the drill or the > x,y,z position? I'd guess the latter. Don't you also need I am controlling XYZ. > guaranteed real time response (which FreeBSD won't provide > you)? I suppose if you are controlling the position (and not > the velocity) RT response won't be too critical. At any rate Hrm, I was planning on investigating the RT capabilities of fbsd after I got myself a decent timer mechanism. I was hoping they would be enough to get close to RT. I have an SMP system I can use, so 1 CPU can be dedicated to the task. > you are better off writing a device driver which can run > timing critical code while blocking out all other interrupts. Not an option. It would stall the whole system during the (possibly 20 minute) drilling operation. Maybe it'll be possible with SMPng, but not now. > Or else between the time you measure time and supply the next > pulse a higher prio interrupt handler else may sneak in. As I'm hoping higher-priority interrupts will be quick about their work. A few microseconds or 10s or possibly 100s hopefully won't upset the drill too much. > was suggested you may want to consider a dedicated cpu based > controller. Thre are a number of solutions for hobbyists > (such as the handyboard, see www.handyboard.com). Unfortunately, money is a big factor. So that's not an option. :/ > Is this a totally homebrew drill or something from a kit? > I'd be interested in details (probably better offline since > the interection of freebsd s/w hackers & h/w hackers is > tiny). It's home brew, I'll forward you more details in personal email. --Bart To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sun Sep 30 11:48:57 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from mail.shell-server.com (24-109-11-245.ivideon.com [24.109.11.245]) by hub.freebsd.org (Postfix) with SMTP id 7FF9337B415 for ; Sun, 30 Sep 2001 11:48:49 -0700 (PDT) Received: (qmail 13687 invoked from network); 30 Sep 2001 18:22:06 -0000 Received: from betsy.shell-server.com (HELO there) (192.168.3.2) by erin-rl0.shell-server.com with SMTP; 30 Sep 2001 18:22:06 -0000 Content-Type: text/plain; charset="iso-8859-1" From: Bart Kus Message-Id: <200109301318.44290@EO> To: gkshenaut@ucdavis.edu, Greg Shenaut , hackers@FreeBSD.ORG Subject: Re: precise timing Date: Sun, 30 Sep 2001 13:23:08 -0500 X-Mailer: KMail [version 1.3] References: <200109301747.f8UHlsA35003@thistle.bogs.org> In-Reply-To: <200109301747.f8UHlsA35003@thistle.bogs.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Sunday 30 September 2001 12:47, Greg Shenaut wrote: > Well, setitimer has a maximum rate of 100 Hz, with a slop factor > sometimes much greater than 10 ms. This was the result of some > recent testing on a lightly-loaded standard 4.3 system. That's not good enough. :/ > How many stepper motors are you driving? If it's only one at a time, then > maybe the speaker port on the motherboard (a programmable counter-timer) > would be more reliable. I like the speaker port idea. Can one program the speaker port to generate an int/signal/un-block using bsd's kernel API? > Another idea is to use a fifo'ed UART's data out > line and fiddle with the baud rate to vary the speed of the pulses. I don't think this will provide the "smoothness" I want. Going from 2400->4800 steps/sec for example would be a huge jerk. Need SMOOTH transition (constant-acceleration). But the speaker port idea sounds great. --Bart To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sun Sep 30 11:55: 5 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from mail.shell-server.com (24-109-11-245.ivideon.com [24.109.11.245]) by hub.freebsd.org (Postfix) with SMTP id 7632C37B401 for ; Sun, 30 Sep 2001 11:55:00 -0700 (PDT) Received: (qmail 13528 invoked from network); 30 Sep 2001 17:54:58 -0000 Received: from betsy.shell-server.com (HELO there) (192.168.3.2) by erin-rl0.shell-server.com with SMTP; 30 Sep 2001 17:54:58 -0000 Content-Type: text/plain; charset="iso-8859-1" From: Bart Kus Message-Id: <200109301226.0779@EO> To: Poul-Henning Kamp Subject: Re: sio modification Date: Sun, 30 Sep 2001 12:56:02 -0500 X-Mailer: KMail [version 1.3] References: <3802.1001864301@critter> In-Reply-To: <3802.1001864301@critter> Cc: hackers@freebsd.org MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Sunday 30 September 2001 10:38, you wrote: > Your machine will not work too well if it is 40kHz. > > The PPS-API allows you to timestamp edges on DCD, if the frequency is > more reasonable, that would work for you. Find RFC27xx for more info > about PPS-API. Oh really. I was actually reading pps.c, and it looked like it was for the parallel port interrupt pin only. I'd rather avoid cutting up this connector if I can. Is the DCD edge timestamp (which would be PERFECT) already implemented, or is this a spec for me to write for when modifying sio.c? If I do have to write something, for my work to be included anywhere, I should be writing for the -CURRENT kernel, right? I presently run -STABLE, so that would obviously be the more comfortable kernel to write for...but it is *STABLE* after all. --Bart PS: That's RFC2783 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sun Sep 30 11:58:50 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from srv1.cosmo-project.de (srv1.cosmo-project.de [213.83.6.106]) by hub.freebsd.org (Postfix) with ESMTP id 588DD37B405 for ; Sun, 30 Sep 2001 11:58:44 -0700 (PDT) Received: from mail.cicely.de (cicely20 [10.1.1.22]) by srv1.cosmo-project.de (8.11.0/8.11.0) with ESMTP id f8UIwY634939; Sun, 30 Sep 2001 20:58:36 +0200 (CEST) Received: (from ticso@localhost) by mail.cicely.de (8.11.0/8.11.0) id f8UIx0K20023; Sun, 30 Sep 2001 20:59:00 +0200 (CEST) Date: Sun, 30 Sep 2001 20:58:59 +0200 From: Bernd Walter To: Bart Kus Cc: Bernd Walter , hackers@FreeBSD.ORG Subject: Re: precise timing Message-ID: <20010930205859.A19910@cicely20.cicely.de> References: <200109301010.07784@EO> <20010930180302.A19621@cicely20.cicely.de> <200109301303.08611@EO> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <200109301303.08611@EO>; from bsd@shell-server.com on Sun, Sep 30, 2001 at 01:10:35PM -0500 X-Operating-System: NetBSD cicely20.cicely.de 1.5 sparc Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Sun, Sep 30, 2001 at 01:10:35PM -0500, Bart Kus wrote: > On Sunday 30 September 2001 11:03, Bernd Walter wrote: > > Controlling steppers via lpt is what I explained and showed last > > tuesday on the cosmo-project meeting. > > We used nanosleep() which worked fine for the demonstration and > > playing. > > As long as you don't have troubles with longer than requested periods > > this would fit your needs. > > Is there a record of your explanation somewhere? As for the > longer-than-requested timing periods, yes that is a problem. If maximum > velocity of the drill is 30cm/s, a sudden stop would not be good. I can of > course change the MAX_V, but I'm still hoping for a non-kludgy solution. > > > Nevertheless in my opinion it's a job for a dedicated CPU/controller. > > Think about using an 68HC11 or something like that. > > If you can enshure not only minimum but also maximum step times you > > can even get the motor faster - well not with lowered drill of course. > > I agree. This does need a dedicated MCU. However, I only had 1 PCB layer > to work with, so simplicity was key here. It's possible to build a single layer PCB with an MCU. Well it can be tricky sometimes. > > You can shorten the steps while the motor is rotating which you can't > > do at once. > > What do you mean here? I already do use variable timing for the steps BTW. > Remember, the motors perform constant-acceleration operations...it means they > slowly approach MAX_V. It's pretty neat to listen to. :) Yes - that's want I mean and that's what gets you in trouble with the longer-than-requested thing so you are stuck with the initial speed. The problem here is that nanosleep returns no earlier than the given time unless a signal is received, in which case the exceeded time is returned and you can recall with the remaining. So you can garantie a minimal time. But with a multitasking OS you can't enshure that you will have the CPU at a special given time - other tasks including ints may have priority. At worst your process may need to wait for a disk... You might be able to do in the kernel (ab)using the clock interrupts, so you realy know when you own the CPU. See hardclock() function in src/sys/kern/kern_clock.c Don't forget that the rate can be modified via sysctl. With an MCU you would also use a timer interrupt. -- B.Walter COSMO-Project http://www.cosmo-project.de ticso@cicely.de Usergroup info@cosmo-project.de To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sun Sep 30 12:23:28 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from elvis.mu.org (elvis.mu.org [216.33.66.196]) by hub.freebsd.org (Postfix) with ESMTP id B17C137B40E for ; Sun, 30 Sep 2001 12:23:26 -0700 (PDT) Received: by elvis.mu.org (Postfix, from userid 1192) id 923E781D01; Sun, 30 Sep 2001 14:23:26 -0500 (CDT) Date: Sun, 30 Sep 2001 14:23:26 -0500 From: Alfred Perlstein To: Jos Backus Cc: hackers@FreeBSD.ORG Subject: Re: VM: dynamic swap remapping (patch) Message-ID: <20010930142326.L59854@elvis.mu.org> References: <20010929155941.A291@eix.do-labs.spb.ru> <20010929071024.Q59854@elvis.mu.org> <20010929141349.A80876@freebie.xs4all.nl> <200109291653.f8TGrRR37689@earth.backplane.com> <20010929232953.B341@eix.do-labs.spb.ru> <20010929175653.Z59854@elvis.mu.org> <20010930120328.A534@eix.do-labs.spb.ru> <20010930035529.G59854@elvis.mu.org> <20010930134437.B284@eix.do-labs.spb.ru> <20010930105509.B2220@lizzy.bugworks.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20010930105509.B2220@lizzy.bugworks.com>; from josb@cncdsl.com on Sun, Sep 30, 2001 at 10:55:09AM -0700 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG * Jos Backus [010930 12:55] wrote: > On Sun, Sep 30, 2001 at 01:44:37PM +0000, Vladimir Dozen wrote: > > SIGDANGER is the signal from Irix, AFAIR? > > AIX has SIGDANGER. Anyone care to tell me how it works in AIX? If the interface is nice, cloning it would be kind of cool. -- -Alfred Perlstein [alfred@freebsd.org] 'Instead of asking why a piece of software is using "1970s technology," start asking why software is ignoring 30 years of accumulated wisdom.' To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sun Sep 30 12:30:22 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from guru.mired.org (okc-94-248-46.mmcable.com [24.94.248.46]) by hub.freebsd.org (Postfix) with SMTP id C0E5F37B40A for ; Sun, 30 Sep 2001 12:30:19 -0700 (PDT) Received: (qmail 78239 invoked by uid 100); 30 Sep 2001 19:30:19 -0000 From: Mike Meyer MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15287.29386.998663.37631@guru.mired.org> Date: Sun, 30 Sep 2001 14:30:18 -0500 To: Bart Kus Cc: hackers@freebsd.org Subject: Re: sio modification In-Reply-To: <200109301003.06903@EO> References: <200109301003.06903@EO> X-Mailer: VM 6.90 under 21.1 (patch 14) "Cuyahoga Valley" XEmacs Lucid X-face: "5Mnwy%?j>IIV\)A=):rjWL~NB2aH[}Yq8Z=u~vJ`"(,&SiLvbbz2W`;h9L,Yg`+vb1>RG% *h+%X^n0EZd>TM8_IB;a8F?(Fb"lw'IgCoyM.[Lg#r\ Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Bart Kus types: > manipulates the CD line of the serial port it plugs into. Afaik, the UART > itself is capable of generating an interrupt whenever CD changes. The > problem is, sio.c doesn't support this feature. I'm stuck with polling the > status register to find out the state of CD. Not a very good solution for a > daemon that's supposed to run in the background all the time, especially > since the CD line will be toggled at about 40kHz (I think that's the remote > control frequency standard). Perhaps I'm wrong about the 40kHz figure. It looks like you've already got a solution to this problem, and this won't be very useful if the 40kHz figure is right, but I figured I might mention it anyway. Have you thought about using the feature of the callin device of the "open" call blocking until it gets CD? You should then get a SIGHUP when CD drops. http://www.mired.org/home/mwm/ Q: How do you make the gods laugh? A: Tell them your plans. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sun Sep 30 12:32:55 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from db.wireless.net (adsl-gte-la-216-86-194-70.mminternet.com [216.86.194.70]) by hub.freebsd.org (Postfix) with ESMTP id 00EF337B403 for ; Sun, 30 Sep 2001 12:32:51 -0700 (PDT) Received: (from dbutter@localhost) by db.wireless.net (8.11.1/8.11.1) id f8UJXQl74336; Sun, 30 Sep 2001 12:33:26 -0700 (PDT) (envelope-from dbutter) Message-Id: <200109301933.f8UJXQl74336@db.wireless.net> Content-Type: text/plain; charset="iso-8859-1" From: Devin Butterfield To: Bart Kus , Bakul Shah Subject: Re: precise timing Date: Sun, 30 Sep 2001 12:33:26 -0700 X-Mailer: KMail [version 1.3] Cc: hackers@FreeBSD.ORG References: <200109301730.NAA29134@thunderer.cnchost.com> <200109301311.5635@EO> In-Reply-To: <200109301311.5635@EO> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG [...] > > was suggested you may want to consider a dedicated cpu based > > controller. Thre are a number of solutions for hobbyists > > (such as the handyboard, see www.handyboard.com). > > Unfortunately, money is a big factor. So that's not an option. :/ > Atmel AVR microcontrollers are < $10 from distributors like Digikey (and Digikey usually has high prices). They're very slick and VERY FAST. You can do 12 MIPS with one of their chips. Of course you'd need to spend some time learning their instruction sets/learning how to code in C for them. There is a C compiler in the ports named avr-gcc to do just that. As for programmers, you can program these chips with a simple homebrew cable that plugs into your parallel port. Please see: http://www.bsdhome.com/avrprog Is that cheap enough? -- Regards, Devin. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sun Sep 30 12:34: 5 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from w250.z064001178.sjc-ca.dsl.cnc.net (w250.z064001178.sjc-ca.dsl.cnc.net [64.1.178.250]) by hub.freebsd.org (Postfix) with SMTP id DED4E37B406 for ; Sun, 30 Sep 2001 12:34:00 -0700 (PDT) Received: (qmail 18940 invoked by uid 1000); 30 Sep 2001 19:34:21 -0000 Date: Sun, 30 Sep 2001 12:33:59 -0701 From: Jos Backus To: hackers@FreeBSD.ORG Subject: Re: VM: dynamic swap remapping (patch) Message-ID: <20010930123359.A7241@lizzy.bugworks.com> Reply-To: Jos Backus Mail-Followup-To: hackers@FreeBSD.ORG References: <20010929071024.Q59854@elvis.mu.org> <20010929141349.A80876@freebie.xs4all.nl> <200109291653.f8TGrRR37689@earth.backplane.com> <20010929232953.B341@eix.do-labs.spb.ru> <20010929175653.Z59854@elvis.mu.org> <20010930120328.A534@eix.do-labs.spb.ru> <20010930035529.G59854@elvis.mu.org> <20010930134437.B284@eix.do-labs.spb.ru> <20010930105509.B2220@lizzy.bugworks.com> <20010930142326.L59854@elvis.mu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20010930142326.L59854@elvis.mu.org> User-Agent: Mutt/1.3.22.1i Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Sun, Sep 30, 2001 at 02:23:26PM -0500, Alfred Perlstein wrote: > * Jos Backus [010930 12:55] wrote: > > AIX has SIGDANGER. > > Anyone care to tell me how it works in AIX? If the interface is > nice, cloning it would be kind of cool. I don't currently have access to an AIX system, but http://as400bks.rochester.ibm.com/doc_link/en_US/a_doc_lib/aixbman/admnconc/pag_space_under.htm has some (useful) info. -- Jos Backus _/ _/_/_/ Santa Clara, CA _/ _/ _/ _/ _/_/_/ _/ _/ _/ _/ josb@cncdsl.com _/_/ _/_/_/ use Std::Disclaimer; To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sun Sep 30 12:56: 6 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from elvis.mu.org (elvis.mu.org [216.33.66.196]) by hub.freebsd.org (Postfix) with ESMTP id E677A37B408 for ; Sun, 30 Sep 2001 12:56:03 -0700 (PDT) Received: by elvis.mu.org (Postfix, from userid 1192) id EB43881D01; Sun, 30 Sep 2001 14:55:58 -0500 (CDT) Date: Sun, 30 Sep 2001 14:55:58 -0500 From: Alfred Perlstein To: Jos Backus Cc: hackers@FreeBSD.ORG Subject: Re: VM: dynamic swap remapping (patch) Message-ID: <20010930145558.M59854@elvis.mu.org> References: <20010929141349.A80876@freebie.xs4all.nl> <200109291653.f8TGrRR37689@earth.backplane.com> <20010929232953.B341@eix.do-labs.spb.ru> <20010929175653.Z59854@elvis.mu.org> <20010930120328.A534@eix.do-labs.spb.ru> <20010930035529.G59854@elvis.mu.org> <20010930134437.B284@eix.do-labs.spb.ru> <20010930105509.B2220@lizzy.bugworks.com> <20010930142326.L59854@elvis.mu.org> <20010930123359.A7241@lizzy.bugworks.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20010930123359.A7241@lizzy.bugworks.com>; from josb@cncdsl.com on Sun, Sep 30, 2001 at 12:33:59PM -0701 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG * Jos Backus [010930 14:35] wrote: > On Sun, Sep 30, 2001 at 02:23:26PM -0500, Alfred Perlstein wrote: > > * Jos Backus [010930 12:55] wrote: > > > AIX has SIGDANGER. > > > > Anyone care to tell me how it works in AIX? If the interface is > > nice, cloning it would be kind of cool. > > I don't currently have access to an AIX system, but > > http://as400bks.rochester.ibm.com/doc_link/en_US/a_doc_lib/aixbman/admnconc/pag_space_under.htm > > has some (useful) info. It sure does! I think I'm going to make a proposal on -arch about this, to be perfectly honest, AIX has a good implementation, I haven't read it all yet, but it doesn't look like it gives the applications a notification when the danger is gone, we'll have to figure that out, or I'll have to read more into this. -- -Alfred Perlstein [alfred@freebsd.org] 'Instead of asking why a piece of software is using "1970s technology," start asking why software is ignoring 30 years of accumulated wisdom.' To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sun Sep 30 12:59:41 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from earth.backplane.com (earth-nat-cw.backplane.com [208.161.114.67]) by hub.freebsd.org (Postfix) with ESMTP id CC46137B40B for ; Sun, 30 Sep 2001 12:59:37 -0700 (PDT) Received: (from dillon@localhost) by earth.backplane.com (8.11.6/8.11.2) id f8UJxN544635; Sun, 30 Sep 2001 12:59:23 -0700 (PDT) (envelope-from dillon) Date: Sun, 30 Sep 2001 12:59:23 -0700 (PDT) From: Matt Dillon Message-Id: <200109301959.f8UJxN544635@earth.backplane.com> To: Poul-Henning Kamp Cc: Vladimir Dozen , Wilko Bulte , Alfred Perlstein , hackers@FreeBSD.ORG Subject: Re: VM: dynamic swap remapping (patch) References: <909.1001839737@critter> Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG : :In message <200109300752.f8U7qsj41649@earth.backplane.com>, Matt Dillon writes: :>: Second, application not always grows to 1G, most of the time it keeps :>: as small as 500M ;). Why should we precommit 1G for 500M data? Doing :>: multi-mmap memory management is additional pain. :> :> Even using file-backed memory is fairly trivial. You don't need to :> do multi-mmap memory management or do any kernel tweaking. Just :> reserve 1G and use a single mmap() and file per process. : :I once had a patch to phkmalloc() which backed all malloc'ed VM with :hidden files in the users homedir. It was written to put the VM :usage under QUOTA control, but it had many useful side effects as well. : :I can't seem to find it right now, but it is trivial to do: just :replace the sbrk(2) with mmap(). Only downside is the needed :filedescriptor which some shells don't like. : :-- :Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 :phk@FreeBSD.ORG | TCP/IP since RFC 956 I think the file descriptor problem can be solved easily... simply open the file, mmap() the entire 1G segment for this special application, and then close() the file. Then have sbrk() just eats out of the mapped segment. Alternatively sbrk() could open/mmap/close in large 1MB or 4MB segments, again leaving no file descriptors dangling. -Matt To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sun Sep 30 13: 6:29 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from elvis.mu.org (elvis.mu.org [216.33.66.196]) by hub.freebsd.org (Postfix) with ESMTP id 3C7F937B408 for ; Sun, 30 Sep 2001 13:06:26 -0700 (PDT) Received: by elvis.mu.org (Postfix, from userid 1192) id 0FEB281D01; Sun, 30 Sep 2001 15:06:26 -0500 (CDT) Date: Sun, 30 Sep 2001 15:06:26 -0500 From: Alfred Perlstein To: Matt Dillon Cc: Poul-Henning Kamp , Vladimir Dozen , Wilko Bulte , hackers@FreeBSD.ORG Subject: Re: VM: dynamic swap remapping (patch) Message-ID: <20010930150626.N59854@elvis.mu.org> References: <909.1001839737@critter> <200109301959.f8UJxN544635@earth.backplane.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <200109301959.f8UJxN544635@earth.backplane.com>; from dillon@earth.backplane.com on Sun, Sep 30, 2001 at 12:59:23PM -0700 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG * Matt Dillon [010930 14:59] wrote: > > : > :In message <200109300752.f8U7qsj41649@earth.backplane.com>, Matt Dillon writes: > :>: Second, application not always grows to 1G, most of the time it keeps > :>: as small as 500M ;). Why should we precommit 1G for 500M data? Doing > :>: multi-mmap memory management is additional pain. > :> > :> Even using file-backed memory is fairly trivial. You don't need to > :> do multi-mmap memory management or do any kernel tweaking. Just > :> reserve 1G and use a single mmap() and file per process. > : > :I once had a patch to phkmalloc() which backed all malloc'ed VM with > :hidden files in the users homedir. It was written to put the VM > :usage under QUOTA control, but it had many useful side effects as well. > : > :I can't seem to find it right now, but it is trivial to do: just > :replace the sbrk(2) with mmap(). Only downside is the needed > :filedescriptor which some shells don't like. > : > :-- > :Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 > :phk@FreeBSD.ORG | TCP/IP since RFC 956 > > I think the file descriptor problem can be solved easily... simply > open the file, mmap() the entire 1G segment for this special application, > and then close() the file. Then have sbrk() just eats out of the mapped > segment. Alternatively sbrk() could open/mmap/close in large 1MB or 4MB > segments, again leaving no file descriptors dangling. Won't that cause fragmentation? You're forgettng the need to ftruncate or pre-zero the file unless that's been fixed. -- -Alfred Perlstein [alfred@freebsd.org] 'Instead of asking why a piece of software is using "1970s technology," start asking why software is ignoring 30 years of accumulated wisdom.' To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sun Sep 30 13:17:29 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from day.anthologeek.net (day.anthologeek.net [212.43.217.20]) by hub.freebsd.org (Postfix) with ESMTP id 6195A37B40F for ; Sun, 30 Sep 2001 13:17:24 -0700 (PDT) Received: by day.anthologeek.net (Postfix, from userid 1000) id B3E1E171E7; Sun, 30 Sep 2001 22:16:36 +0200 (CEST) Date: Sun, 30 Sep 2001 22:16:36 +0200 From: Sameh Ghane To: John Merryweather Cooper Cc: freebsd-hackers@freebsd.org Subject: Re: Looking for testers for PR ports/30821 Message-ID: <20010930221636.A11897@anthologeek.net> References: <20010930112224.A25818@johncoop.MSHOME> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20010930112224.A25818@johncoop.MSHOME>; from john_m_cooper@yahoo.com on Sun, Sep 30, 2001 at 11:22:24AM -0700 X-PGP-Keys: 0x1289F00D: Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Le (On) Sun, Sep 30, 2001 at 11:22:24AM -0700, John Merryweather Cooper ecrivit (wrote): > Rexx-IMC doesn't build on -CURRENT at the moment (so says Bento). This > PR contains a patch, but I'm -CURRENT-less. Could someone build things > and let me know? It builds now. But your patch did not work well for the Make.new date change. Maybe because you patched a patch ? ;) Or maybe because I copy-pasted it from Netscape. > In addition to the sample scripts in the examples directory tree (which > have all been modified to run from a commandline just like any other > script), doing: > > rexx -s 'say sqrt(2)' > > will verify that the math extensions work. 1.41421356 looks like a reasonable value ;) Cheers, -- Sameh To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sun Sep 30 13:20:22 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from earth.backplane.com (earth-nat-cw.backplane.com [208.161.114.67]) by hub.freebsd.org (Postfix) with ESMTP id 8ACD037B40C for ; Sun, 30 Sep 2001 13:20:18 -0700 (PDT) Received: (from dillon@localhost) by earth.backplane.com (8.11.6/8.11.2) id f8UKJvg44890; Sun, 30 Sep 2001 13:19:57 -0700 (PDT) (envelope-from dillon) Date: Sun, 30 Sep 2001 13:19:57 -0700 (PDT) From: Matt Dillon Message-Id: <200109302019.f8UKJvg44890@earth.backplane.com> To: Bernd Walter Cc: Bart Kus , Bernd Walter , hackers@FreeBSD.ORG Subject: Re: precise timing References: <200109301010.07784@EO> <20010930180302.A19621@cicely20.cicely.de> <200109301303.08611@EO> <20010930205859.A19910@cicely20.cicely.de> Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG You definite need to use a microcontroller. Something like the 68HC11F1 is a good single-chip solution (though the F1 only has 512 bytes of E^2). I'm sure Motorola has newer chips with more on-board E^2. Stepper motors can be manipulated from a PC parallel port but you will never get smooth output and you can forget about momentum accelleration. There are also a huge number of Intel-derivative microcontrollers that are as self contained and in much smaller packages then typical motorola parts. I'm most familiar with the Motorola's... For a stepper or waveform output I've always liked the motorola MCUs because they have timer output compare registers that will automatically flip a bit for you on an output port, giving you timer resolution down to crystal / 4 and accuracy that is at the crystal accuracy. But the Intel derivatives are going to be much, much cheaper... $2 or $3 for an MCU that does what you want and extremely easy to program. Look at the MCS51 and MCS96 series. Note that there are dozens of manfacturers of Intel-style controllers. -Matt To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sun Sep 30 13:22:28 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from earth.backplane.com (earth-nat-cw.backplane.com [208.161.114.67]) by hub.freebsd.org (Postfix) with ESMTP id 4E91A37B409 for ; Sun, 30 Sep 2001 13:22:24 -0700 (PDT) Received: (from dillon@localhost) by earth.backplane.com (8.11.6/8.11.2) id f8UKMNi44948; Sun, 30 Sep 2001 13:22:23 -0700 (PDT) (envelope-from dillon) Date: Sun, 30 Sep 2001 13:22:23 -0700 (PDT) From: Matt Dillon Message-Id: <200109302022.f8UKMNi44948@earth.backplane.com> To: Alfred Perlstein Cc: Poul-Henning Kamp , Vladimir Dozen , Wilko Bulte , hackers@FreeBSD.ORG Subject: Re: VM: dynamic swap remapping (patch) References: <909.1001839737@critter> <200109301959.f8UJxN544635@earth.backplane.com> <20010930150626.N59854@elvis.mu.org> Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG :> :Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 :> :phk@FreeBSD.ORG | TCP/IP since RFC 956 :> :> I think the file descriptor problem can be solved easily... simply :> open the file, mmap() the entire 1G segment for this special application, :> and then close() the file. Then have sbrk() just eats out of the mapped :> segment. Alternatively sbrk() could open/mmap/close in large 1MB or 4MB :> segments, again leaving no file descriptors dangling. : :Won't that cause fragmentation? You're forgettng the need to :ftruncate or pre-zero the file unless that's been fixed. : :-- :-Alfred Perlstein [alfred@freebsd.org] You have to pre-zero the file. You can do it in reasonably-sized chunks (like 4M) without causing fragmentation. You *CANNOT* use ftruncate() to extend the file - that will virtually guarentee massive fragmentation. -Matt To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sun Sep 30 14: 3:56 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from mail.shell-server.com (24-109-11-245.ivideon.com [24.109.11.245]) by hub.freebsd.org (Postfix) with SMTP id A483737B417 for ; Sun, 30 Sep 2001 14:03:47 -0700 (PDT) Received: (qmail 14281 invoked from network); 30 Sep 2001 21:03:45 -0000 Received: from betsy.shell-server.com (HELO there) (192.168.3.2) by erin-rl0.shell-server.com with SMTP; 30 Sep 2001 21:03:45 -0000 Content-Type: text/plain; charset="iso-8859-1" From: Bart Kus Message-Id: <200109301600.21610@EO> To: Poul-Henning Kamp Subject: Re: sio modification Date: Sun, 30 Sep 2001 16:04:50 -0500 X-Mailer: KMail [version 1.3] References: <5135.1001873896@critter> In-Reply-To: <5135.1001873896@critter> Cc: hackers@freebsd.org MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Sunday 30 September 2001 13:18, you wrote: > It's in sio.c already. Sorry to bug you again, but it seems that the PPS driver for sio doesn't support PPS_CANWAIT. Am I correct in that assessment? Without blocking, I don't see any other mechanism for event-driven execution. The RFC seems to hint towards sampling at the Nyquist frequency in the case of a missing PPS_CANWAIT. Establishing an 80kHz loop is pretty much impossible given the 100Hz resolution of nanosleep() and friends. --Bart To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sun Sep 30 14:19:25 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from mail.shell-server.com (24-109-11-245.ivideon.com [24.109.11.245]) by hub.freebsd.org (Postfix) with SMTP id 25E4A37B406 for ; Sun, 30 Sep 2001 14:16:39 -0700 (PDT) Received: (qmail 14314 invoked from network); 30 Sep 2001 21:16:37 -0000 Received: from betsy.shell-server.com (HELO there) (192.168.3.2) by erin-rl0.shell-server.com with SMTP; 30 Sep 2001 21:16:37 -0000 Content-Type: text/plain; charset="iso-8859-1" From: Bart Kus Message-Id: <200109301616.26229@EO> To: Devin Butterfield , Bakul Shah Subject: Re: precise timing Date: Sun, 30 Sep 2001 16:17:44 -0500 X-Mailer: KMail [version 1.3] Cc: hackers@FreeBSD.ORG References: <200109301730.NAA29134@thunderer.cnchost.com> <200109301311.5635@EO> <200109301933.f8UJXQl74336@db.wireless.net> In-Reply-To: <200109301933.f8UJXQl74336@db.wireless.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Sunday 30 September 2001 14:33, Devin Butterfield wrote: > Atmel AVR microcontrollers are < $10 from distributors like Digikey (and > Digikey usually has high prices). They're very slick and VERY FAST. You can > do 12 MIPS with one of their chips. > > Of course you'd need to spend some time learning their instruction > sets/learning how to code in C for them. There is a C compiler in the ports > named avr-gcc to do just that. > > As for programmers, you can program these chips with a simple homebrew > cable that plugs into your parallel port. > > Please see: > > http://www.bsdhome.com/avrprog > > Is that cheap enough? Oh, very nice! Definate contender for "version 2" of this controller. I'd still like to get version 1 working though. Thanks for the info! --Bart To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sun Sep 30 14:22:39 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from critter.freebsd.dk (critter.freebsd.dk [212.242.86.163]) by hub.freebsd.org (Postfix) with ESMTP id 3EC7837B409 for ; Sun, 30 Sep 2001 14:18:32 -0700 (PDT) Received: from critter (localhost [127.0.0.1]) by critter.freebsd.dk (8.11.4/8.11.4) with ESMTP id f8ULIRv07492; Sun, 30 Sep 2001 23:18:31 +0200 (CEST) (envelope-from phk@critter.freebsd.dk) To: Bart Kus Cc: hackers@freebsd.org Subject: Re: sio modification In-Reply-To: Your message of "Sun, 30 Sep 2001 16:04:50 CDT." <200109301600.21610@EO> Date: Sun, 30 Sep 2001 23:18:27 +0200 Message-ID: <7490.1001884707@critter> From: Poul-Henning Kamp Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG In message <200109301600.21610@EO>, Bart Kus writes: >On Sunday 30 September 2001 13:18, you wrote: >> It's in sio.c already. > > Sorry to bug you again, but it seems that the PPS driver for sio doesn't >support PPS_CANWAIT. Am I correct in that assessment? Without blocking, I >don't see any other mechanism for event-driven execution. The RFC seems to Yes, you'll have to poll, sorry... >hint towards sampling at the Nyquist frequency in the case of a missing >PPS_CANWAIT. Establishing an 80kHz loop is pretty much impossible given the >100Hz resolution of nanosleep() and friends. > > --Bart > -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sun Sep 30 14:23:27 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from marlborough.cnchost.com (marlborough.concentric.net [207.155.248.14]) by hub.freebsd.org (Postfix) with ESMTP id 3A7C337B40D for ; Sun, 30 Sep 2001 14:19:43 -0700 (PDT) Received: from bitblocks.com (adsl-209-204-185-216.sonic.net [209.204.185.216]) by marlborough.cnchost.com id RAA02358; Sun, 30 Sep 2001 17:19:38 -0400 (EDT) [ConcentricHost SMTP Relay 1.14] Message-ID: <200109302119.RAA02358@marlborough.cnchost.com> To: Bart Kus Cc: hackers@freebsd.org Subject: Re: precise timing In-reply-to: Your message of "Sun, 30 Sep 2001 13:17:52 CDT." <200109301311.5635@EO> Date: Sun, 30 Sep 2001 14:19:37 -0700 From: Bakul Shah Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG > Hrm, I was planning on investigating the RT capabilities of fbsd after I got > myself a decent timer mechanism. I was hoping they would be enough to get > close to RT. I have an SMP system I can use, so 1 CPU can be dedicated to > the task. I doubt even an SMP system would help. > > you are better off writing a device driver which can run > > timing critical code while blocking out all other interrupts. > Not an option. It would stall the whole system during the (possibly 20 > minute) drilling operation. Maybe it'll be possible with SMPng, but not now. I meant blocking other interrupts only during critical periods. For instance, when your s/w gets control, you find out the current time and figure out what speed you want to set. Then you set timout for the next time you want to do this and return. Basically you are approximating a curve and while doing this at regular interval is easier, you can also approximate with an irregular interval (use Bresenham). But this is just a generic suggestion; I do not know enought details to do more than that. One other thing you can do is to increase clock tick rate to 1000 Hz from the default 100 Hz. > > was suggested you may want to consider a dedicated cpu based > > controller. Thre are a number of solutions for hobbyists > > (such as the handyboard, see www.handyboard.com). > > Unfortunately, money is a big factor. So that's not an option. :/ IIRC you can buy a kit (including a two sided PCB) for under $100. A few years ago I built the precursor to the Handy Board (called Miniboard) from a kit for a lot less. It had a 68hc11E2 (with a 2k EEPROM) + you can control upto 4 motors + a bunch of sensors and digitial output control pins. Someone may still be selling it. What I was thinking of was not a completely dedicated controller. You interface to something like the miniboard via a serial port and do all the fancy computation on your freebsd system and let the controller do the PWM by feeding it precomputed parameters (at time t0 velocity v0, at time t1 set it to v1 and so on). > It's home brew, I'll forward you more details in personal email. Thanks! To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sun Sep 30 15: 2:29 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from obsecurity.dyndns.org (adsl-63-207-60-153.dsl.lsan03.pacbell.net [63.207.60.153]) by hub.freebsd.org (Postfix) with ESMTP id B1B5A37B40E for ; Sun, 30 Sep 2001 15:02:25 -0700 (PDT) Received: by obsecurity.dyndns.org (Postfix, from userid 1000) id 30A9766D0E; Sun, 30 Sep 2001 15:02:25 -0700 (PDT) Date: Sun, 30 Sep 2001 15:02:25 -0700 From: Kris Kennaway To: Luigi Rizzo Cc: Glenn Gombert , hackers@FreeBSD.ORG Subject: Re: Problem(s) With FreeBSD-Current Message-ID: <20010930150224.A41591@xor.obsecurity.org> References: <20010929172053.XCRL16495.mta10.onebox.com@onebox.com> <200109300048.f8U0mbj98590@iguana.aciri.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-md5; protocol="application/pgp-signature"; boundary="fdj2RfSjLxBAspz7" Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <200109300048.f8U0mbj98590@iguana.aciri.org>; from rizzo@aciri.org on Sat, Sep 29, 2001 at 05:48:37PM -0700 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG --fdj2RfSjLxBAspz7 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Sep 29, 2001 at 05:48:37PM -0700, Luigi Rizzo wrote: > > Hello, > >=20 > > I have tried to compile FreeBSD Current (several times) over the last > > couple of days and get the following message when trying to run XFree86 > > and a number of other applications: > >=20 > > /user/lib/libpam.so.1 : Undefined symbol "__stdoutp"... > >=20 > > Does anyone else have the same problem ?? >=20 > same here (though cross-compilig CURRENT on 4.3), > for me the fix was to revert the sep.20 change on src/include/stdio.h >=20 > @@ -198,7 +198,7 @@ __END_DECLS > #endif > =20 > /* To be removed by 5.0-RELEASE */ > -#if (defined(__i386__) || defined(__alpha__)) && !defined(_FIXED_STDIO) > +#if (defined(__i386__) || defined(__alpha__)) && defined(_OLD_STDIO) > #define stdin (&__sF[0]) > #define stdout (&__sF[1]) > #define stderr (&__sF[2]) >=20 > Maybe it is the wrong fix, but it did work. Yes, it's the wrong fix. If you actually go and read your -current mailbox, you'll find it very hard to avoid tripping over an email containing the correct fix. Kris --fdj2RfSjLxBAspz7 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (FreeBSD) Comment: For info see http://www.gnupg.org iD8DBQE7t5ZwWry0BWjoQKURAi0LAKDPJuX6gYQjuB6Uf63WSihgWb+fDQCgrOs9 DpxxGt5uVKWy4YMCFmbScLk= =mVRP -----END PGP SIGNATURE----- --fdj2RfSjLxBAspz7-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sun Sep 30 16:27: 4 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from mail.webmonster.de (datasink.webmonster.de [194.162.162.209]) by hub.freebsd.org (Postfix) with SMTP id A7D9C37B410 for ; Sun, 30 Sep 2001 16:24:04 -0700 (PDT) Received: (qmail 75253 invoked by uid 1000); 30 Sep 2001 23:24:23 -0000 Date: Mon, 1 Oct 2001 01:24:23 +0200 From: "Karsten W. Rohrbach" To: Devin Butterfield Cc: Bart Kus , Bakul Shah , hackers@FreeBSD.ORG Subject: Re: precise timing Message-ID: <20011001012423.B74962@mail.webmonster.de> Mail-Followup-To: "Karsten W. Rohrbach" , Devin Butterfield , Bart Kus , Bakul Shah , hackers@FreeBSD.ORG References: <200109301730.NAA29134@thunderer.cnchost.com> <200109301311.5635@EO> <200109301933.f8UJXQl74336@db.wireless.net> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-md5; protocol="application/pgp-signature"; boundary="A6N2fC+uXW/VQSAv" Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <200109301933.f8UJXQl74336@db.wireless.net>; from dbutter@wireless.net on Sun, Sep 30, 2001 at 12:33:26PM -0700 X-Arbitrary-Number-Of-The-Day: 42 X-URL: http://www.webmonster.de/ X-Disclaimer: My opinions do not necessarily represent those of my employer X-Work-URL: http://www.ngenn.net/ X-Work-Address: nGENn GmbH, Schloss Kransberg, D-61250 Usingen-Kransberg, Germany X-Work-Phone: +49-6081-682-304 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG --A6N2fC+uXW/VQSAv Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Devin Butterfield(dbutter@wireless.net)@2001.09.30 12:33:26 +0000: > [...] > > > was suggested you may want to consider a dedicated cpu based > > > controller. Thre are a number of solutions for hobbyists > > > (such as the handyboard, see www.handyboard.com). > > > > Unfortunately, money is a big factor. So that's not an option. :/ > > >=20 > Atmel AVR microcontrollers are < $10 from distributors like Digikey (and= =20 > Digikey usually has high prices). They're very slick and VERY FAST. You c= an=20 > do 12 MIPS with one of their chips. i can second that. a good friend of mine is implementing particle accelerator control units on the avr series and is very content with features, performance and overall development/deployment cost. basically they seem to be standard 16bit arm thumb platforms, with=20 memory and interface configurations being the only varying features. > Of course you'd need to spend some time learning their instruction=20 > sets/learning how to code in C for them. There is a C compiler in the por= ts=20 > named avr-gcc to do just that. what i have seen from the development environment under win32 (yes, yes, i know...) the gcc generates code with a quite good quality and performance, some bugs included but well documented, and the in system programmer frontend 'pony prog' being pretty good as well. i also find it appealing that the avr series has onchip flash/eeprom and can be programmed via the isp bus even if one managed to screw up the boot code completely -- this reduces development costs and time dramatically ;-) /k --=20 > "Her figure described a set of parabolas that could cause cardiac arrest > in a yak." --Woody Allen KR433/KR11-RIPE -- WebMonster Community Founder -- nGENn GmbH Senior Techie http://www.webmonster.de/ -- ftp://ftp.webmonster.de/ -- http://www.ngenn.n= et/ karsten&rohrbach.de -- alpha&ngenn.net -- alpha&scene.org -- catch@spam.de GnuPG 0x2964BF46 2001-03-15 42F9 9FFF 50D4 2F38 DBEE DF22 3340 4F4E 2964 B= F46 Please do not remove my address from To: and Cc: fields in mailing lists. 1= 0x --A6N2fC+uXW/VQSAv Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (FreeBSD) Comment: For info see http://www.gnupg.org iD8DBQE7t6mnM0BPTilkv0YRAnywAJ9y5/gw5ZUzh+C69ohchimtyNahfwCgjs6c vgdFwheuUVKLsNwUxQDmLKQ= =PYPa -----END PGP SIGNATURE----- --A6N2fC+uXW/VQSAv-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sun Sep 30 16:29:38 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from mta5-rme.xtra.co.nz (mta5-rme.xtra.co.nz [203.96.92.17]) by hub.freebsd.org (Postfix) with ESMTP id 1C2A437B410 for ; Sun, 30 Sep 2001 16:29:28 -0700 (PDT) Received: from development.wgtn.csg.co.nz ([210.86.1.68]) by mta5-rme.xtra.co.nz with SMTP id <20010930232926.VIVM3082200.mta5-rme.xtra.co.nz@development.wgtn.csg.co.nz> for ; Mon, 1 Oct 2001 11:29:26 +1200 Content-Type: text/plain; charset="iso-8859-1" From: David Preece Reply-To: davep@afterswish.com To: freebsd-hackers@freebsd.org Subject: Problems with Davicom network chip under load. Date: Mon, 1 Oct 2001 11:28:38 +1200 X-Mailer: KMail [version 1.2] MIME-Version: 1.0 Message-Id: <01100111283800.00444@development.wgtn.csg.co.nz> Content-Transfer-Encoding: 8bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Hi, I was just attempting to move an iso image between two 4.3-Release machines, the server being a PPro180 with i82559 and the client being a P3-933 with a Davicom network chip. FTP'ing an image from server to client resulted in the client aparrently losing the plot at layer 3 - a ping running simultaneously stops responding at the same time. This proved to be extremely repeatable. Doing ifconfig dc0 down, then up again fixes the problem temporarily. There is nothing in either dmesg nor /var/log/messages about this, and netstat -m shows nothing abnormal. Is this a known problem? RTFM'ing a little I see a recent CVS commit (http://www.FreeBSD.org/cgi/cvsweb.cgi/src/sys/pci/if_dc.c), version 1.54 "Deal with the condition where we lose link in the middle of transmitting a bunch of frames."? Is this therefore fixed under 4.4? BTW, as a short term fix, the same machine has a realtek chipset so I swopped the configuration over and all is good. Must do the 4.4 upgrade (sigh). Cheers, Dave -------FYI, Configuration-------------- (a snipped dmesg) FreeBSD 4.3-RELEASE #4: Fri Sep 21 16:08:35 NZST 2001 CPU: Pentium III/Pentium III Xeon/Celeron (930.96-MHz 686-class CPU) Origin = "GenuineIntel" Id = 0x683 Stepping = 3 real memory = 134135808 (130992K bytes) avail memory = 127950848 (124952K bytes) Preloaded elf kernel "kernel" at 0xc02a4000. Preloaded elf module "agp.ko" at 0xc02a409c. Pentium Pro MTRR support enabled agp0: mem 0xe0000000-0xe7ffffff at device 0.0 on pci0pcib2: at device 1.0 on pci0 pci1: on pcib2 pci1: at 0.0 irq 11 rl0: port 0xa800-0xa8ff mem 0xdb800000-0xdb8000ff irq 5 at device 10.0 on pci0 rl0: Ethernet address: 00:50:bf:25:54:ce miibus0: on rl0 rlphy0: on miibus0 rlphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto dc0: port 0xa400-0xa4ff mem 0xdb000000-0xdb0000ff irq 10 at device 11.0 on pci0 dc0: Ethernet address: 00:80:ad:72:b6:cc miibus1: on dc0 ukphy0: on miibus1 ukphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sun Sep 30 16:47:24 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id C168237B40A; Sun, 30 Sep 2001 16:47:22 -0700 (PDT) Received: (from babkin@localhost) by freefall.freebsd.org (8.11.4/8.11.4) id f8UNlMn68050; Sun, 30 Sep 2001 16:47:22 -0700 (PDT) (envelope-from babkin) Date: Sun, 30 Sep 2001 16:47:22 -0700 (PDT) From: Message-Id: <200109302347.f8UNlMn68050@freefall.freebsd.org> To: dphoenix@bravenet.com, freebsd-hackers@freebsd.org Subject: Re: power supplies Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Dan wrote: > > I had the stangest situation today where a new nic card was put into a > machine and then the machine did not start up. Placed the old nic card > back in the box and it still did not start up. Switched power supplies > with an exactly equal box and both machine booted up fine. This has > happened twice since we started replacing nic cards today with ones with > more buffer space available on them out of about 8 machines now. > > Does this make any sense to anyone? I had almost exactly the same experience with a Tyan motherboard, excapt that it was not a network but video card in my case. Unplugging the power cord from the machine between removing one card and inserting another (or possibly the same) one has helped. Though I don't know why it happens. -SB To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sun Sep 30 17: 6: 9 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from smtp.bmi.net (smtp.bmi.net [204.57.191.31]) by hub.freebsd.org (Postfix) with ESMTP id 0BD2B37B40C for ; Sun, 30 Sep 2001 17:06:07 -0700 (PDT) Received: from johncoop.MSHOME (drumheller-router.bmi.net [206.63.201.3] (may be forged)) by smtp.bmi.net (Pro-8.9.3/Pro-8.9.3) with ESMTP id AAA14480 for ; Mon, 1 Oct 2001 00:13:04 -0700 Date: Sun, 30 Sep 2001 11:22:24 -0700 From: John Merryweather Cooper To: freebsd-hackers@freebsd.org Subject: Looking for testers for PR ports/30821 Message-ID: <20010930112224.A25818@johncoop.MSHOME> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Mailer: Balsa 1.2.0 Lines: 21 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Rexx-IMC doesn't build on -CURRENT at the moment (so says Bento). This PR contains a patch, but I'm -CURRENT-less. Could someone build things and let me know? In addition to the sample scripts in the examples directory tree (which have all been modified to run from a commandline just like any other script), doing: rexx -s 'say sqrt(2)' will verify that the math extensions work. Thanks. -- jmc MacroHard -- the perfection of form over substance, marketing over performance, and greed over design . . . To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sun Sep 30 17: 6:20 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from smtp.bmi.net (smtp.bmi.net [204.57.191.31]) by hub.freebsd.org (Postfix) with ESMTP id 6E2AE37B40E for ; Sun, 30 Sep 2001 17:06:15 -0700 (PDT) Received: from johncoop.MSHOME (drumheller-router.bmi.net [206.63.201.3] (may be forged)) by smtp.bmi.net (Pro-8.9.3/Pro-8.9.3) with ESMTP id AAA14483; Mon, 1 Oct 2001 00:13:05 -0700 Date: Sun, 30 Sep 2001 17:06:00 -0700 From: John Merryweather Cooper To: Sameh Ghane Cc: freebsd-hackers@freebsd.org Subject: Re: Looking for testers for PR ports/30821 Message-ID: <20010930170600.A773@johncoop.MSHOME> References: <20010930112224.A25818@johncoop.MSHOME> <20010930221636.A11897@anthologeek.net> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit In-Reply-To: <20010930221636.A11897@anthologeek.net>; from sw@anthologeek.net on Sun, Sep 30, 2001 at 13:16:36 -0700 X-Mailer: Balsa 1.2.0 Lines: 49 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On 2001.09.30 13:16 Sameh Ghane wrote: > Le (On) Sun, Sep 30, 2001 at 11:22:24AM -0700, John Merryweather > Cooper ecrivit (wrote): > > Rexx-IMC doesn't build on -CURRENT at the moment (so says Bento). > This > > PR contains a patch, but I'm -CURRENT-less. Could someone build > things > > and let me know? > > It builds now. But your patch did not work well for the Make.new date > change. > Maybe because you patched a patch ? ;) Or maybe because I copy-pasted > it from > Netscape. > Probably the latter . . . :) Most browsers hose tab/space alignment, etc. > > In addition to the sample scripts in the examples directory tree > (which > > have all been modified to run from a commandline just like any other > > script), doing: > > > > rexx -s 'say sqrt(2)' > > > > will verify that the math extensions work. > > 1.41421356 looks like a reasonable value ;) > > Cheers, > > -- > Sameh > Excellent! Thanks for taking the time to check things out for me. Rexx-IMC 1.7 (the previous version) wouldn't even give you an answer--the math libraries were hosed. -- jmc MacroHard -- the perfection of form over substance, marketing over performance, and greed over design . . . To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sun Sep 30 17:21: 7 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from InterJet.elischer.org (c421509-a.pinol1.sfba.home.com [24.7.86.9]) by hub.freebsd.org (Postfix) with ESMTP id 63B5D37B40E for ; Sun, 30 Sep 2001 17:20:56 -0700 (PDT) Received: from elischer.org (InterJet.elischer.org [192.168.1.1]) by InterJet.elischer.org (8.9.1a/8.9.1) with ESMTP id SAA82712; Sun, 30 Sep 2001 18:00:12 -0700 (PDT) Message-ID: <3BB7B224.FF428740@elischer.org> Date: Sun, 30 Sep 2001 17:00:36 -0700 From: Julian Elischer X-Mailer: Mozilla 4.7 [en] (X11; U; FreeBSD 5.0-CURRENT i386) X-Accept-Language: en, hu MIME-Version: 1.0 To: Glenn Gombert Cc: hackers@FreeBSD.ORG Subject: Re: KSE next steps... References: <20010930195319.PQDX19615.mta04.onebox.com@onebox.com> Content-Type: text/plain; charset=iso-8859-2 Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Glenn Gombert wrote: > > A couple of questions come to mind after reading what has been done > so far and what ( think has been committed into the the Free BSD Current > tree)and reading throught the present KSE write up.. > > How much of the KSE code is dependant upon the SMP support being fully > functional?? The new system call(s) sa_new(cpy_id), sa_pressmpt)...etc > seem to depend upon the new SMP support being functional in the 'Current' > tree...is this the case or call's like "sa_new(cpu_id) will just create > one KSE per avaiable CPU (one on a single cpu machine).. A single CPU machine will hav only one KSE (per kseg) but it will still have completely asynchronous syscalls, so it will still be able to schedule many threads at once without the fear that one will block and block all the others.. So it's still very useful for UP machines. > > > > Should they be allocated from a zone allocator similar to that > > currently used for process structures? > > Should the vm object associated with threads structures be allocated > > and 'left' as it presently is (type stable storage)? > > Should the thread structure that comes with the proc structure be used > > as one of > > the > > threads for KSE operation, or should it be left untouched until > > KSE mode is stopped (or exit)? If we use the thread pre-packed with > > the proc > > there are some problems.. > > > > For example: it is intimatly associated with one process, but thread > > structs in > > KSE > > mode are transient, and might be given to a different process should > > it be > > needed > > there. (kernel thread structures are only 'used' when the thread enters > > the > > kernel > > due to a trap of some sort (e.g. syscall) until it returns back to > > user land). > > It provides the stack and storage for the thread to transfer from user > > to kernel > > and is 'empty' while the thread is running in user space. > > > > Another option might be to ALWAYS allocate them separatly.. That makes > > the first > > one > > just another thread struct... but it may be more 'expensive' to allocate > > tehm > > that way. > > (though thay could be cached...) > > Are all of the API's in section 3.3 of the KSE white paper implemeted > with SMP support (like thread_new(), thread_preempt()... etc ?? they (or similar ones) will be. We're still working out the API. > > > 2/ When processes have a single state, (e.g. SLEEP, RUN etc.) it becomes > > possible > > for a process to simultaneously have threads in multiple states.. What > > do we do > > in all the places that current code assumes a single monolithic state, > > and how do we report the stat of such a process in /proc or ps? > > > > - My guess is that a single state 'KSE' for a process should indicate > > that no > > finer > > state information is available for that process until we add code to > > 'ps' to > > support it.. We can alter ps and friends to simply give up if they > > see that > > state.. > > > > Has the Kenrnel Scheduler been changed to support the creation of KSE's > or is that planned fir this next phase ?.. that will be this next phase... > > > 3/ similar for reporting wmesg information.. > > > > 4/ What does a process with 4 threads do if you send it a SIGTSTP and > > it has a > > number of threads (maybe on a different processor) presently suspended > > in > > syscalls > > or, maybe running in syscalls. > > > > (other questions later when I think of them..) > > > > The next steps: > > a) add allocators/destructors for threads, kses and ksegrps > > b) use them, and add code to fork() (and friends) to use them > > c) define the user interface so that uerland code can start to be planned. > > (I may just do that first.) > > d) add the syscalls to switch modes etc. > > e) make a single test syscall that exercises some of this...(no locking.. > > What sort of mechanism has been used todate to test the functionality > that has been added to the kernel code in the 'Current' branch so far?? SO far the main aim was "No new functionality, and keep working" :-) > > I am just coming up to speed on some of this and have been waiding > through the way the 4.x kernel functions now and how it is envisioned > to function under 5.0.... did you look at the 5.0 kernel? > > > just > > simple) > > > > > > > > julian > > > > > > > > > > -- > > +------------------------------------+ ______ _ __ > > | __--_|\ Julian Elischer | \ U \/ / hard at work > > in > > | / \ julian@elischer.org +------>x USA \ a very strange > > | ( OZ ) \___ ___ | country ! > > +- X_.---._/ presently in San Francisco \_/ \\ > > v > > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > > with "unsubscribe freebsd-arch" in the body of the message > > > > __________________________________________________ > FREE voicemail, email, and fax...all in one place. > Sign Up Now! http://www.onebox.com -- +------------------------------------+ ______ _ __ | __--_|\ Julian Elischer | \ U \/ / hard at work in | / \ julian@elischer.org +------>x USA \ a very strange | ( OZ ) \___ ___ | country ! +- X_.---._/ presently in San Francisco \_/ \\ v To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sun Sep 30 17:46:39 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from bogslab.ucdavis.edu (bogslab.ucdavis.edu [169.237.68.34]) by hub.freebsd.org (Postfix) with ESMTP id 5F82F37B409 for ; Sun, 30 Sep 2001 17:46:36 -0700 (PDT) Received: from thistle.bogs.org (thistle.bogs.org [198.137.203.61]) by bogslab.ucdavis.edu (8.9.3/8.9.3) with ESMTP id RAA85051 for ; Sun, 30 Sep 2001 17:46:30 -0700 (PDT) (envelope-from greg@bogslab.ucdavis.edu) Received: from thistle.bogs.org (localhost [127.0.0.1]) by thistle.bogs.org (8.11.3/8.11.3) with ESMTP id f910j1A47144 for ; Sun, 30 Sep 2001 17:45:02 -0700 (PDT) (envelope-from greg@thistle.bogs.org) Message-Id: <200110010045.f910j1A47144@thistle.bogs.org> To: hackers@FreeBSD.ORG X-To: Bart Kus X-Sender: owner-freebsd-hackers@FreeBSD.ORG Subject: Re: precise timing In-reply-to: Your message of "Sun, 30 Sep 2001 13:23:08 CDT." <200109301318.44290@EO> Reply-To: gkshenaut@ucdavis.edu Date: Sun, 30 Sep 2001 17:45:01 -0700 From: Greg Shenaut Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG In message <200109301318.44290@EO>, Bart Kus cleopede: >On Sunday 30 September 2001 12:47, Greg Shenaut wrote: >> Well, setitimer has a maximum rate of 100 Hz, with a slop factor >> sometimes much greater than 10 ms. This was the result of some >> recent testing on a lightly-loaded standard 4.3 system. > > That's not good enough. :/ > >> How many stepper motors are you driving? If it's only one at a time, then >> maybe the speaker port on the motherboard (a programmable counter-timer) >> would be more reliable. > > I like the speaker port idea. Can one program the speaker port to generate >an int/signal/un-block using bsd's kernel API? I do not think that there is hardware support for interrupts from the speaker port, but it seems to me that since it just sits there putting out a square wave at whatever frequency was most recently programmed into it, all one of the (relatively infrequent) less-than 10 ms timing glitches would do is to slow down the ramp sometimes, which would never harm the stepper motor (but would slow down the process a little bit). >> Another idea is to use a fifo'ed UART's data out >> line and fiddle with the baud rate to vary the speed of the pulses. > > I don't think this will provide the "smoothness" I want. Going from >2400->4800 steps/sec for example would be a huge jerk. Need SMOOTH >transition (constant-acceleration). I was thinking in terms of changing the baud rate in smaller increments than that--the timing hardware inside the standard PC UART is just a 16-bit programmable divider. But a MCU is still probably your best bet. (I remember writing a stepper-motor driver on a TI 9900 back in the 70's.) Greg Shenaut To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sun Sep 30 17:56:40 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from mail.shell-server.com (24-109-11-245.ivideon.com [24.109.11.245]) by hub.freebsd.org (Postfix) with SMTP id 7FF8E37B40C for ; Sun, 30 Sep 2001 17:56:31 -0700 (PDT) Received: (qmail 14925 invoked from network); 1 Oct 2001 00:56:29 -0000 Received: from betsy.shell-server.com (HELO there) (192.168.3.2) by erin-rl0.shell-server.com with SMTP; 1 Oct 2001 00:56:29 -0000 Content-Type: text/plain; charset="iso-8859-1" From: Bart Kus Message-Id: <200109301944.18930@EO> To: Poul-Henning Kamp Subject: Re: sio modification Date: Sun, 30 Sep 2001 19:57:36 -0500 X-Mailer: KMail [version 1.3] Cc: hackers@freebsd.org References: <7490.1001884707@critter> In-Reply-To: <7490.1001884707@critter> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Sunday 30 September 2001 16:18, Poul-Henning Kamp wrote: > Yes, you'll have to poll, sorry... Ick. How hard would it be to pull off one of the following: 1) Give time_pps_fetch() the ability to become a blocking call 2) Modify the PPS API slightly, by allowing time_pps_fetch() to return a list of events, rather than just 1 event (would need facility to set max # of events for kernel to record - max backlog) I can't think of any other way of dealing with the problem of remote controls under freebsd, other than out-right writing something new tailored for the problem. I assume #1 is hard, since it's not implemented, and is proposed in the PPS API. #2 would be an a-ok solution too, since I could poll time_pps_fetch() 10 times/sec or something and still give fairly real-time response to remote control button presses. --Bart To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sun Sep 30 18:13:23 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from cain.gsoft.com.au (genesi.lnk.telstra.net [139.130.136.161]) by hub.freebsd.org (Postfix) with ESMTP id C159E37B405 for ; Sun, 30 Sep 2001 18:13:13 -0700 (PDT) Received: from cain.gsoft.com.au (root@spare0.gsoft.com.au [203.38.152.114]) by cain.gsoft.com.au (8.8.8/8.8.8) with ESMTP id KAA24284; Mon, 1 Oct 2001 10:42:58 +0930 (CST) (envelope-from doconnor@gsoft.com.au) Message-ID: X-Mailer: XFMail 1.5.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: <200109301010.07784@EO> Date: Mon, 01 Oct 2001 10:42:57 +0930 (CST) From: "Daniel O'Connor" To: Bart Kus Subject: RE: precise timing Cc: hackers@freebsd.org Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On 30-Sep-2001 Bart Kus wrote: > Right now, I use for() as a timing loop. I calibrate it on program start > and can then get very precise timing. There are, of course, the > intermittent > interruptions of the multitasker. So this solution is not ideal by any > means. In fact, the for() loop approach is really meant for the DOS port of > this software. I'm wondering if there is any way I can access a more > precise > interrupt-driven (or blocking) timing source. I know I can do a select() > with supposedly microsecond accuracy, but I doubt that it is in fact that > accurate in practice (doesn't the kernel only use a 100Hz clock or > something?). Is there any way to get at the system timers on the > motherboard? Those can provide precise timing, no? I suspect the only way you could achieve this in FreeBSD at the moment is to write a kernel driver. That way you can disable interrupts while you frob your board.. (And get quick access when you need it). --- Daniel O'Connor software and network engineer for Genesis Software - http://www.gsoft.com.au "The nice thing about standards is that there are so many of them to choose from." -- Andrew Tanenbaum To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sun Sep 30 18:14:27 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from mail.shell-server.com (24-109-11-245.ivideon.com [24.109.11.245]) by hub.freebsd.org (Postfix) with SMTP id 7BBCA37B411 for ; Sun, 30 Sep 2001 18:14:21 -0700 (PDT) Received: (qmail 15005 invoked from network); 1 Oct 2001 01:14:19 -0000 Received: from betsy.shell-server.com (HELO there) (192.168.3.2) by erin-rl0.shell-server.com with SMTP; 1 Oct 2001 01:14:19 -0000 From: Bart Kus Message-Id: <200109301623.4359@EO> To: Mike Meyer Subject: Re: sio modification Date: Sun, 30 Sep 2001 20:15:27 -0500 X-Mailer: KMail [version 1.3] Cc: hackers@freebsd.org References: <200109301003.06903@EO> <15287.29386.998663.37631@guru.mired.org> In-Reply-To: <15287.29386.998663.37631@guru.mired.org> MIME-Version: 1.0 Content-Type: Multipart/Mixed; boundary="------------Boundary-00=_R56ITYN8AH69ZPC1022E" Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG --------------Boundary-00=_R56ITYN8AH69ZPC1022E Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit On Sunday 30 September 2001 14:30, Mike Meyer wrote: > It looks like you've already got a solution to this problem, and this > won't be very useful if the 40kHz figure is right, but I figured I > might mention it anyway. Have you thought about using the feature of > the callin device of the "open" call blocking until it gets CD? You > should then get a SIGHUP when CD drops. This sounded like a really good idea when I first read it, so I wrote a test. The first thing I noticed is that SIGHUP was *NOT* being generated (any idea why?) on CD transition to low. I then realized that I could use write() and it would fail when CD==low. So I used that technique for detecting CD==low, and after setting "dtrwait" to 0 using comcontrol, things seemed to be going well. However, I pressed the same button on the remote multiple times and I noticed a very high variance in the time-deltas between high/low states. In fact, sometimes 7 transitions are reported, sometimes 9. The variance for some time-deltas is sometimes as high as a factor of 10 (note: I'm not using the statistical definition of variance - I simply mean that a +edge -> -edge time can be 100us and then 1000us on the next press of the same button). Sadly, this seemingly good mechanism doesn't perform well enough to produce the kind of data I'd need for pattern matching. Perhaps actually managing to generate a SIGHUP would cut down on this variance? I've attached the source for the test program for your reading enjoyment. :) Don't feel obligated to open it. --Bart --------------Boundary-00=_R56ITYN8AH69ZPC1022E Content-Type: text/x-c; charset="iso-8859-1"; name="IRBaboon2.c" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="IRBaboon2.c" LyogQ293ICYgQ2hpY2tlbiBydWxlIQogKgogKiBJUkJhYm9vbiBDb3B5cmlnaHQgKEMpIEJhcnQg S3VzLCAyMDAxLgogKi8KCi8qIE5PVEU6CiAqIEJlIFNVUkUgdG8gZG8gYTogY29tY29udHJvbCAv ZGV2L2lyYmFib29uIGR0cndhaXQgMAogKiBQcmlvciB0byBydW5uaW5nIHRoaXMgcHJvZ3JhbSEK ICovCgojaW5jbHVkZSA8c3RkaW8uaD4KI2luY2x1ZGUgPGZjbnRsLmg+CiNpbmNsdWRlIDx0ZXJt aW9zLmg+CiNpbmNsdWRlIDxzaWduYWwuaD4KI2luY2x1ZGUgPHN5cy90aW1lLmg+CiNpbmNsdWRl IDxzeXMvdHlwZXMuaD4KI2luY2x1ZGUgPHN5cy91aW8uaD4KI2luY2x1ZGUgPHVuaXN0ZC5oPgoK aW50IGk7CnVuc2lnbmVkIGludCBkdFsyNTZdOwoKdm9pZCBoYW5kbGVyX3NpZ2h1cChpbnQgZGF0 YSkgewoJcHJpbnRmKCJHb3QgU0lHSFVQXG4iKTsKCglyZXR1cm47Cn0KCnZvaWQgaGFuZGxlcl9z aWdpbnQoaW50IGRhdGEpIHsKCWludCBpMjsKCglmb3IoaTI9MDsgaTIgPCBpOyBpMisrKQoJCXBy aW50ZigiRFQ6ICUwMTBkdXNcbiIsIGR0W2kyXSk7CgoJcmV0dXJuOwp9CgppbnQgbWFpbihpbnQg YXJnYywgY2hhciAqKmFyZ3YpCnsKCWludCBmZDsKCXN0cnVjdCB0ZXJtaW9zIHQ7CglzdHJ1Y3Qg dGltZXZhbCBoaWdoLCBsb3c7CgoJLyogQ29uZmlndXJlIG91ciBDRC0+bG93IFNJR0hVUCBoYW5k bGVyICovCglzaWduYWwoU0lHSFVQLCBoYW5kbGVyX3NpZ2h1cCk7CglzaWduYWwoU0lHSU5ULCBo YW5kbGVyX3NpZ2ludCk7CgoJLyogQ29uZmlndXJlIHRoZSBwb3J0ICovCgljZnNldHNwZWVkKCZ0 LCBCMTE1MjAwKTsKCXQuY19pZmxhZyA9IDA7Cgl0LmNfb2ZsYWcgPSAwOwoJdC5jX2NmbGFnID0g Q1NJWkV8Q1M2fENSRUFEfEhVUENMOwoJdC5jX2xmbGFnID0gMDsKCWZvcihpPTA7IGkgPCBOQ0NT OyBpKyspCgkJdC5jX2NjW2ldID0gJ1wwJzsKCglpPTA7Cgl3aGlsZSgxKSB7CgkJLyogT3BlbiBj YWxsaW4gZGV2aWNlIC0gYmxvY2tzIHVudGlsIENELT5oaWdoICovCgkJZmQgPSBvcGVuKCIvZGV2 L2lyYmFib29uIiwgT19SRFdSLCAwKTsKCQlnZXR0aW1lb2ZkYXkoJmhpZ2gsIE5VTEwpOwoKCQlp Zih0Y3NldGF0dHIoZmQsIFRDU0FOT1csICZ0KSkgewoJCQlwZXJyb3IoInRjc2V0YXR0cigpIik7 CgkJCWV4aXQoMSk7CgkJfQoKCQl3aGlsZSh3cml0ZShmZCwgIlgiLCAxKSAhPSAtMSk7CgkJZ2V0 dGltZW9mZGF5KCZsb3csIE5VTEwpOwoKCQljbG9zZShmZCk7CgoJCS8qCQlwcmludGYoIkhJR0g6 ICUwOWQuJTA5ZHNcbiIsIGhpZ2gudHZfc2VjLCBoaWdoLnR2X3VzZWMpOwoJCQkJcHJpbnRmKCIg TE9XOiAlMDlkLiUwOWRzXG4iLCBsb3cudHZfc2VjLCBsb3cudHZfdXNlYyk7CgkJCQlwcmludGYo IiAgRFQ6ICAgICAgICAgJTAxMGR1c1xuIiwgKGxvdy50dl9zZWMtaGlnaC50dl9zZWMpKjEwMDAw MDAgKyAobG93LnR2X3VzZWMgLSBoaWdoLnR2X3VzZWMpKTsqLwoJCWR0W2krK10gPSAobG93LnR2 X3NlYy1oaWdoLnR2X3NlYykqMTAwMDAwMCArIChsb3cudHZfdXNlYyAtIGhpZ2gudHZfdXNlYyk7 Cgl9CgoJcmV0dXJuIDA7Cn0K --------------Boundary-00=_R56ITYN8AH69ZPC1022E-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sun Sep 30 18:25:45 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from wantadilla.lemis.com (wantadilla.lemis.com [192.109.197.80]) by hub.freebsd.org (Postfix) with ESMTP id E82EE37B410 for ; Sun, 30 Sep 2001 18:25:40 -0700 (PDT) Received: by wantadilla.lemis.com (Postfix, from userid 1004) id 15C1A6AB08; Mon, 1 Oct 2001 10:56:24 +0930 (CST) Date: Mon, 1 Oct 2001 10:56:24 +0930 From: Greg Lehey To: Julian Elischer Cc: Gersh , Bernd Walter , Anjali Kulkarni , freebsd-hackers@FreeBSD.ORG Subject: Re: setjmp/longjmp Message-ID: <20011001105624.C31215@wantadilla.lemis.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: ; from julian@elischer.org on Fri, Sep 28, 2001 at 10:12:14AM -0700 Organization: The FreeBSD Project Phone: +61-8-8388-8286 Fax: +61-8-8388-8725 Mobile: +61-418-838-708 WWW-Home-Page: http://www.FreeBSD.org/ X-PGP-Fingerprint: 6B 7B C3 8C 61 CD 54 AF 13 24 52 F8 6D A4 95 EF Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG [Format recovered--see http://www.lemis.com/email/email-format.html] On Friday, 28 September 2001 at 10:12:14 -0700, Julian Elischer wrote: > On Fri, 28 Sep 2001, Gersh wrote: >> On Fri, 28 Sep 2001, Bernd Walter wrote: >>> On Fri, Sep 28, 2001 at 07:03:51PM +0530, Anjali Kulkarni wrote: >>>> Does anyone know whether it is advisable or not to use >>>> setjmp/longjmp within kernel code? I could not see any >>>> setjmp/longjmp in kernel source code. Is there a good reason for >>>> this or can it be used? >>> >>> You need to look again, it's used in several places in the kernel. >> >> Look at sys/i386/i386/db_interface.c > > Yeah but it would probably be a pretty bad idea to use it without > very careful thought. Especialy with the kernel becoming > pre-emptable in the future.. Can you think of a scenario where it wouldn't work? Preemption doesn't tear stacks apart, right? Greg -- When replying to this message, please take care not to mutilate the original text. For more information, see http://www.lemis.com/email.html 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 Sep 30 18:30:13 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from acl.lanl.gov (acl.lanl.gov [128.165.147.1]) by hub.freebsd.org (Postfix) with SMTP id 0190537B40F for ; Sun, 30 Sep 2001 18:30:10 -0700 (PDT) Received: (qmail 193764 invoked from network); 30 Sep 2001 19:30:08 -0600 Received: from snaresland.acl.lanl.gov (128.165.147.113) by acl.lanl.gov with SMTP; 30 Sep 2001 19:30:08 -0600 Received: (qmail 19025 invoked by uid 3499); 30 Sep 2001 19:30:08 -0600 Received: from localhost (sendmail-bs@127.0.0.1) by localhost with SMTP; 30 Sep 2001 19:30:08 -0600 Date: Sun, 30 Sep 2001 19:30:08 -0600 (MDT) From: Ronald G Minnich X-X-Sender: To: Cc: , Subject: Re: power supplies In-Reply-To: <200109302347.f8UNlMn68050@freefall.freebsd.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Sun, 30 Sep 2001 babkin@FreeBSD.ORG wrote: > I had almost exactly the same experience with a Tyan motherboard, > excapt that it was not a network but video card in my case. > Unplugging the power cord from the machine between removing one > card and inserting another (or possibly the same) one has helped. > Though I don't know why it happens. I've seen similar stuff although have not (yet) fried a PS. I've had chipset lockup that requred unplugging AC for 30+ seconds before it was resolved. A simple power cycle with the power switch was not sufficient. Bear in mind that power supplies are never really "off" any more. There is always power applied to motherboards as long as AC is hot. I expect that sloppy enough design could result in these types of problems. Soft power off is not as perfect. ron To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sun Sep 30 18:33:30 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from cain.gsoft.com.au (genesi.lnk.telstra.net [139.130.136.161]) by hub.freebsd.org (Postfix) with ESMTP id 0B57037B411 for ; Sun, 30 Sep 2001 18:33:26 -0700 (PDT) Received: from cain.gsoft.com.au (root@spare0.gsoft.com.au [203.38.152.114]) by cain.gsoft.com.au (8.8.8/8.8.8) with ESMTP id LAA24470; Mon, 1 Oct 2001 11:03:14 +0930 (CST) (envelope-from doconnor@gsoft.com.au) Message-ID: X-Mailer: XFMail 1.5.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: <200109301623.4359@EO> Date: Mon, 01 Oct 2001 11:03:14 +0930 (CST) From: "Daniel O'Connor" To: Bart Kus Subject: Re: sio modification Cc: hackers@freebsd.org, Mike Meyer Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On 01-Oct-2001 Bart Kus wrote: > The variance for some time-deltas is sometimes as high as a factor of 10 > (note: I'm not using the statistical definition of variance - I simply mean > that a +edge -> -edge time can be 100us and then 1000us on the next press of > the same button). Sadly, this seemingly good mechanism doesn't perform well > enough to produce the kind of data I'd need for pattern matching. > > Perhaps actually managing to generate a SIGHUP would cut down on this > variance? > > I've attached the source for the test program for your reading enjoyment. > :) > Don't feel obligated to open it. If you're making an IR rx/tx device I suggest you visit.. http://www.lirc.org/ They have 'dumb' recievers which is probably what you're using, but there is also a link for 'smart' one which uses a PIC chip to do the polling... http://www.geocities.com/SiliconValley/Sector/3863/uir/index.html You could probably fit the whole thing inside a D9 backshell. --- Daniel O'Connor software and network engineer for Genesis Software - http://www.gsoft.com.au "The nice thing about standards is that there are so many of them to choose from." -- Andrew Tanenbaum To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sun Sep 30 18:35: 7 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from cain.gsoft.com.au (genesi.lnk.telstra.net [139.130.136.161]) by hub.freebsd.org (Postfix) with ESMTP id 8595437B40F; Sun, 30 Sep 2001 18:35:01 -0700 (PDT) Received: from cain.gsoft.com.au (root@spare0.gsoft.com.au [203.38.152.114]) by cain.gsoft.com.au (8.8.8/8.8.8) with ESMTP id LAA24487; Mon, 1 Oct 2001 11:04:54 +0930 (CST) (envelope-from doconnor@gsoft.com.au) Message-ID: X-Mailer: XFMail 1.5.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: Mon, 01 Oct 2001 11:04:54 +0930 (CST) From: "Daniel O'Connor" To: Ronald G Minnich Subject: Re: power supplies Cc: freebsd-hackers@FreeBSD.ORG, dphoenix@bravenet.com, babkin@FreeBSD.ORG Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On 01-Oct-2001 Ronald G Minnich wrote: > I've seen similar stuff although have not (yet) fried a PS. I've had > chipset lockup that requred unplugging AC for 30+ seconds before it was > resolved. A simple power cycle with the power switch was not sufficient. We found this problem at work due to an interface card (of custom design) that didn't have any isolation. Power was flowing back from the controlled device and tricking the PSU into thinking it was still on. > Soft power off is not as perfect. No, but it's pretty neat :) --- Daniel O'Connor software and network engineer for Genesis Software - http://www.gsoft.com.au "The nice thing about standards is that there are so many of them to choose from." -- Andrew Tanenbaum To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sun Sep 30 20:32:10 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from rover.village.org (rover.bsdimp.com [204.144.255.66]) by hub.freebsd.org (Postfix) with ESMTP id D0CE837B40E for ; Sun, 30 Sep 2001 20:31:16 -0700 (PDT) Received: from harmony.village.org (harmony.village.org [10.0.0.6]) by rover.village.org (8.11.3/8.11.3) with ESMTP id f913VFu66179; Sun, 30 Sep 2001 21:31:15 -0600 (MDT) (envelope-from imp@harmony.village.org) Received: from harmony.village.org (localhost [127.0.0.1]) by harmony.village.org (8.11.6/8.11.6) with ESMTP id f913VE701352; Sun, 30 Sep 2001 21:31:14 -0600 (MDT) (envelope-from imp@harmony.village.org) Message-Id: <200110010331.f913VE701352@harmony.village.org> To: Vladimir Dozen Subject: Re: VM: dynamic swap remapping (patch) Cc: hackers@FreeBSD.ORG In-reply-to: Your message of "Sun, 30 Sep 2001 13:44:37 -0000." <20010930134437.B284@eix.do-labs.spb.ru> References: <20010930134437.B284@eix.do-labs.spb.ru> <20010929155941.A291@eix.do-labs.spb.ru> <20010929071024.Q59854@elvis.mu.org> <20010929141349.A80876@freebie.xs4all.nl> <200109291653.f8TGrRR37689@earth.backplane.com> <20010929232953.B341@eix.do-labs.spb.ru> <20010929175653.Z59854@elvis.mu.org> <20010930120328.A534@eix.do-labs.spb.ru> <20010930035529.G59854@elvis.mu.org> Date: Sun, 30 Sep 2001 21:31:13 -0600 From: Warner Losh Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG In message <20010930134437.B284@eix.do-labs.spb.ru> Vladimir Dozen writes: : SIGDANGER is the signal from Irix, AFAIR? AIX. Warner To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sun Sep 30 20:35:18 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from rover.village.org (rover.bsdimp.com [204.144.255.66]) by hub.freebsd.org (Postfix) with ESMTP id 7F34F37B40B for ; Sun, 30 Sep 2001 20:35:15 -0700 (PDT) Received: from harmony.village.org (harmony.village.org [10.0.0.6]) by rover.village.org (8.11.3/8.11.3) with ESMTP id f913ZEu66198; Sun, 30 Sep 2001 21:35:14 -0600 (MDT) (envelope-from imp@harmony.village.org) Received: from harmony.village.org (localhost [127.0.0.1]) by harmony.village.org (8.11.6/8.11.6) with ESMTP id f913Z6701389; Sun, 30 Sep 2001 21:35:14 -0600 (MDT) (envelope-from imp@harmony.village.org) Message-Id: <200110010335.f913Z6701389@harmony.village.org> To: Bart Kus Subject: Re: precise timing Cc: hackers@FreeBSD.ORG In-reply-to: Your message of "Sun, 30 Sep 2001 10:18:01 CDT." <200109301010.07784@EO> References: <200109301010.07784@EO> Date: Sun, 30 Sep 2001 21:35:06 -0600 From: Warner Losh Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG In message <200109301010.07784@EO> Bart Kus writes: : Right now, I use for() as a timing loop. I calibrate it on program start : and can then get very precise timing. There are, of course, the intermittent : interruptions of the multitasker. So this solution is not ideal by any : means. In fact, the for() loop approach is really meant for the DOS port of : this software. I'm wondering if there is any way I can access a more precise : interrupt-driven (or blocking) timing source. I know I can do a select() : with supposedly microsecond accuracy, but I doubt that it is in fact that : accurate in practice (doesn't the kernel only use a 100Hz clock or : something?). Is there any way to get at the system timers on the : motherboard? Those can provide precise timing, no? you are likely better off implementing this as a device driver, likely with the parallel port bus stuff. Warner To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sun Sep 30 20:37:45 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from smtp1.sentex.ca (smtp1.sentex.ca [199.212.134.4]) by hub.freebsd.org (Postfix) with ESMTP id E16D137B40B; Sun, 30 Sep 2001 20:37:41 -0700 (PDT) Received: from chimp.simianscience.com (cage.simianscience.com [64.7.134.1]) by smtp1.sentex.ca (8.11.6/8.11.6) with SMTP id f913bfM12080; Sun, 30 Sep 2001 23:37:41 -0400 (EDT) (envelope-from mike@sentex.net) From: Mike Tancsa To: semenu@FreeBSD.ORG ("Semen A. Ustimenko") Cc: hackers@FreeBSD.ORG Subject: Re: VM Corruption - stumped, anyone have any ideas? Date: Sun, 30 Sep 2001 23:37:40 -0400 Message-ID: References: <200109241914.f8OJE4l95477@earth.backplane.com> In-Reply-To: X-Mailer: Forte Agent 1.8/32.548 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Sat, 29 Sep 2001 20:38:51 +0000 (UTC), in sentex.lists.freebsd.hackers you wrote: >Hi! > >On Mon, 24 Sep 2001, Matt Dillon wrote: > >> A number of people have been seeing these on STABLE: >>=20 >> panic: vm_page_remove(): page not found in hash >>=20 >There was rummors that lowering "maxusers" from 512 to 128 worksaround=20 >this problem on a machine with 3Gb of memory... Hi, This machine has maxusers set to 192 with 512MB of RAM. ---Mike Mike Tancsa (mdtancsa@sentex.net) =09 Sentex Communications Corp, =09 Waterloo, Ontario, Canada "Given enough time, 100 monkeys on 100 routers=20 could setup a national IP network." (KDW2) To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sun Sep 30 20:49:14 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from wantadilla.lemis.com (wantadilla.lemis.com [192.109.197.80]) by hub.freebsd.org (Postfix) with ESMTP id B49F637B406 for ; Sun, 30 Sep 2001 20:49:09 -0700 (PDT) Received: by wantadilla.lemis.com (Postfix, from userid 1004) id DF0856AB15; Mon, 1 Oct 2001 13:19:51 +0930 (CST) Date: Mon, 1 Oct 2001 13:19:51 +0930 From: Greg Lehey To: Alfred Perlstein Cc: Jos Backus , hackers@FreeBSD.ORG Subject: Re: VM: dynamic swap remapping (patch) Message-ID: <20011001131951.M31215@wantadilla.lemis.com> References: <200109291653.f8TGrRR37689@earth.backplane.com> <20010929232953.B341@eix.do-labs.spb.ru> <20010929175653.Z59854@elvis.mu.org> <20010930120328.A534@eix.do-labs.spb.ru> <20010930035529.G59854@elvis.mu.org> <20010930134437.B284@eix.do-labs.spb.ru> <20010930105509.B2220@lizzy.bugworks.com> <20010930142326.L59854@elvis.mu.org> <20010930123359.A7241@lizzy.bugworks.com> <20010930145558.M59854@elvis.mu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20010930145558.M59854@elvis.mu.org>; from bright@mu.org on Sun, Sep 30, 2001 at 02:55:58PM -0500 Organization: The FreeBSD Project Phone: +61-8-8388-8286 Fax: +61-8-8388-8725 Mobile: +61-418-838-708 WWW-Home-Page: http://www.FreeBSD.org/ X-PGP-Fingerprint: 6B 7B C3 8C 61 CD 54 AF 13 24 52 F8 6D A4 95 EF Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Sunday, 30 September 2001 at 14:55:58 -0500, Alfred Perlstein wrote: > * Jos Backus [010930 14:35] wrote: >> On Sun, Sep 30, 2001 at 02:23:26PM -0500, Alfred Perlstein wrote: >>> * Jos Backus [010930 12:55] wrote: >>>> AIX has SIGDANGER. >>> >>> Anyone care to tell me how it works in AIX? If the interface is >>> nice, cloning it would be kind of cool. >> >> I don't currently have access to an AIX system, but >> >> http://as400bks.rochester.ibm.com/doc_link/en_US/a_doc_lib/aixbman/admnconc/pag_space_under.htm >> >> has some (useful) info. > > It sure does! > > I think I'm going to make a proposal on -arch about this, to be > perfectly honest, AIX has a good implementation, I haven't read it > all yet, but it doesn't look like it gives the applications a > notification when the danger is gone, we'll have to figure that out, > or I'll have to read more into this. If it's any help, I have an AIX box here. It belongs to IBM, so I have to respect security issues, but I'll do what I can. Greg -- 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 Sep 30 21:41:24 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from elvis.mu.org (elvis.mu.org [216.33.66.196]) by hub.freebsd.org (Postfix) with ESMTP id 9C6F537B40C; Sun, 30 Sep 2001 21:41:19 -0700 (PDT) Received: by elvis.mu.org (Postfix, from userid 1192) id 71C8F81D01; Sun, 30 Sep 2001 23:41:14 -0500 (CDT) Date: Sun, 30 Sep 2001 23:41:14 -0500 From: Alfred Perlstein To: Greg Lehey Cc: Jos Backus , hackers@FreeBSD.ORG Subject: Re: VM: dynamic swap remapping (patch) Message-ID: <20010930234114.P59854@elvis.mu.org> References: <20010929232953.B341@eix.do-labs.spb.ru> <20010929175653.Z59854@elvis.mu.org> <20010930120328.A534@eix.do-labs.spb.ru> <20010930035529.G59854@elvis.mu.org> <20010930134437.B284@eix.do-labs.spb.ru> <20010930105509.B2220@lizzy.bugworks.com> <20010930142326.L59854@elvis.mu.org> <20010930123359.A7241@lizzy.bugworks.com> <20010930145558.M59854@elvis.mu.org> <20011001131951.M31215@wantadilla.lemis.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20011001131951.M31215@wantadilla.lemis.com>; from grog@FreeBSD.org on Mon, Oct 01, 2001 at 01:19:51PM +0930 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG * Greg Lehey [010930 22:49] wrote: > On Sunday, 30 September 2001 at 14:55:58 -0500, Alfred Perlstein wrote: > > * Jos Backus [010930 14:35] wrote: > >> On Sun, Sep 30, 2001 at 02:23:26PM -0500, Alfred Perlstein wrote: > >>> * Jos Backus [010930 12:55] wrote: > >>>> AIX has SIGDANGER. > >>> > >>> Anyone care to tell me how it works in AIX? If the interface is > >>> nice, cloning it would be kind of cool. > >> > >> I don't currently have access to an AIX system, but > >> > >> http://as400bks.rochester.ibm.com/doc_link/en_US/a_doc_lib/aixbman/admnconc/pag_space_under.htm > >> > >> has some (useful) info. > > > > It sure does! > > > > I think I'm going to make a proposal on -arch about this, to be > > perfectly honest, AIX has a good implementation, I haven't read it > > all yet, but it doesn't look like it gives the applications a > > notification when the danger is gone, we'll have to figure that out, > > or I'll have to read more into this. > > If it's any help, I have an AIX box here. It belongs to IBM, so I > have to respect security issues, but I'll do what I can. Well Joe seems to have provided a pretty interesting document on how it works in AIX, but I was wondering if they do anything wrt low/high watermarks like my idea. Basically you'd like to inform processes that the danger has been alliviated so that they can cautiously start accepting more work rather than freaking out and shutting out clients forever... This might lead to a situation where SIGDANGER starts getting sent informing that things are looking bleak, then processes start freeing resources, they get the second SIGDANGER to let them know that things are looking ok so they ramp up again and the cycle repeats, I guess that's not optimal, but I'd like FreeBSD to let processes know that things are looking better so they can go from "scrooge mode" to "thrifty mode". -- -Alfred Perlstein [alfred@freebsd.org] 'Instead of asking why a piece of software is using "1970s technology," start asking why software is ignoring 30 years of accumulated wisdom.' To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sun Sep 30 22:29:31 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from robin.mail.pas.earthlink.net (robin.mail.pas.earthlink.net [207.217.120.65]) by hub.freebsd.org (Postfix) with ESMTP id 4252B37B409 for ; Sun, 30 Sep 2001 22:27:34 -0700 (PDT) Received: from mindspring.com (dialup-209.247.136.133.Dial1.SanJose1.Level3.net [209.247.136.133]) by robin.mail.pas.earthlink.net (8.11.5/8.9.3) with ESMTP id f915R4T25025; Sun, 30 Sep 2001 22:27:04 -0700 (PDT) Message-ID: <3BB7FED9.D91FAA2E@mindspring.com> Date: Sun, 30 Sep 2001 22:27:53 -0700 From: Terry Lambert Reply-To: tlambert2@mindspring.com X-Mailer: Mozilla 4.7 [en]C-CCK-MCD {Sony} (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: Bart Kus Cc: Poul-Henning Kamp , hackers@freebsd.org Subject: Re: sio modification References: <3802.1001864301@critter> <200109301226.0779@EO> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Bart Kus wrote: > If I do have to write something, for my work to be included anywhere, I > should be writing for the -CURRENT kernel, right? I presently run -STABLE, > so that would obviously be the more comfortable kernel to write for...but it > is *STABLE* after all. Most of us doing commercial developement write for -stable, and give it out to be ported to -current by someone else, if we don't have the time to do both. -- Terry To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sun Sep 30 22:38:11 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from robin.mail.pas.earthlink.net (robin.mail.pas.earthlink.net [207.217.120.65]) by hub.freebsd.org (Postfix) with ESMTP id 2953F37B408 for ; Sun, 30 Sep 2001 22:38:08 -0700 (PDT) Received: from mindspring.com (dialup-209.247.136.133.Dial1.SanJose1.Level3.net [209.247.136.133]) by robin.mail.pas.earthlink.net (8.11.5/8.9.3) with ESMTP id f915c4T19263; Sun, 30 Sep 2001 22:38:05 -0700 (PDT) Message-ID: <3BB8016D.935CFF0D@mindspring.com> Date: Sun, 30 Sep 2001 22:38:53 -0700 From: Terry Lambert Reply-To: tlambert2@mindspring.com X-Mailer: Mozilla 4.7 [en]C-CCK-MCD {Sony} (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: Bakul Shah Cc: Bart Kus , hackers@freebsd.org Subject: Re: precise timing References: <200109302119.RAA02358@marlborough.cnchost.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Bakul Shah wrote: > > > Hrm, I was planning on investigating the RT capabilities of fbsd after > > I got > > myself a decent timer mechanism. I was hoping they would be enough to get > > close to RT. I have an SMP system I can use, so 1 CPU can be dedicated to > > the task. > > I doubt even an SMP system would help. Plus this is ASMP -- ASymmetric MultiProcessing -- when you dedicate a CPU to a task. FreeBSD doesn't support this. Linux supports this, with the patches from Ingo. I'm guessing they will become part of the standard Linux distribution. He developes the "Tux" in kernel web server, and he has the entire code path for the thing, including the TCP stack, so it fits in a single CPU instruction cache. -- Terry To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sun Sep 30 22:54:13 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from w250.z064001178.sjc-ca.dsl.cnc.net (w250.z064001178.sjc-ca.dsl.cnc.net [64.1.178.250]) by hub.freebsd.org (Postfix) with SMTP id 15F4D37B40F for ; Sun, 30 Sep 2001 22:54:10 -0700 (PDT) Received: (qmail 94002 invoked by uid 1000); 1 Oct 2001 05:54:31 -0000 Date: Sun, 30 Sep 2001 22:54:09 -0700 From: Jos Backus To: hackers@FreeBSD.ORG Subject: Re: VM: dynamic swap remapping (patch) Message-ID: <20010930225409.C718@lizzy.bugworks.com> Reply-To: Jos Backus Mail-Followup-To: hackers@FreeBSD.ORG References: <20010929175653.Z59854@elvis.mu.org> <20010930120328.A534@eix.do-labs.spb.ru> <20010930035529.G59854@elvis.mu.org> <20010930134437.B284@eix.do-labs.spb.ru> <20010930105509.B2220@lizzy.bugworks.com> <20010930142326.L59854@elvis.mu.org> <20010930123359.A7241@lizzy.bugworks.com> <20010930145558.M59854@elvis.mu.org> <20011001131951.M31215@wantadilla.lemis.com> <20010930234114.P59854@elvis.mu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20010930234114.P59854@elvis.mu.org> User-Agent: Mutt/1.3.22.1i Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Sun, Sep 30, 2001 at 11:41:14PM -0500, Alfred Perlstein wrote: > > If it's any help, I have an AIX box here. It belongs to IBM, so I > > have to respect security issues, but I'll do what I can. I seem to remember that one could set a watermark using the no command, but I could be wrong. No AIX to verify this, maybe Greg can. The link below has some info, too: http://nscp.upenn.edu/aix4.3html/aixbman/prftungd/tunableaixparms.htm -- JoS Backus _/ _/_/_/ Santa Clara, CA _/ _/ _/ _/ _/_/_/ _/ _/ _/ _/ josb@cncdsl.com _/_/ _/_/_/ use Std::Disclaimer; To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sun Sep 30 22:56:31 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from swan.mail.pas.earthlink.net (swan.mail.pas.earthlink.net [207.217.120.123]) by hub.freebsd.org (Postfix) with ESMTP id 4BE1137B40C; Sun, 30 Sep 2001 22:56:27 -0700 (PDT) Received: from mindspring.com (dialup-209.247.136.133.Dial1.SanJose1.Level3.net [209.247.136.133]) by swan.mail.pas.earthlink.net (EL-8_9_3_3/8.9.3) with ESMTP id WAA07544; Sun, 30 Sep 2001 22:56:24 -0700 (PDT) Message-ID: <3BB805B8.6F784DBD@mindspring.com> Date: Sun, 30 Sep 2001 22:57:12 -0700 From: Terry Lambert Reply-To: tlambert2@mindspring.com X-Mailer: Mozilla 4.7 [en]C-CCK-MCD {Sony} (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: Alfred Perlstein Cc: Greg Lehey , Jos Backus , hackers@FreeBSD.org Subject: Re: VM: dynamic swap remapping (patch) References: <20010929232953.B341@eix.do-labs.spb.ru> <20010929175653.Z59854@elvis.mu.org> <20010930120328.A534@eix.do-labs.spb.ru> <20010930035529.G59854@elvis.mu.org> <20010930134437.B284@eix.do-labs.spb.ru> <20010930105509.B2220@lizzy.bugworks.com> <20010930142326.L59854@elvis.mu.org> <20010930123359.A7241@lizzy.bugworks.com> <20010930145558.M59854@elvis.mu.org> <20011001131951.M31215@wantadilla.lemis.com> <20010930234114.P59854@elvis.mu.org> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Alfred Perlstein wrote: [ ... SIGDANGER ... ] > Well Joe seems to have provided a pretty interesting document on > how it works in AIX, but I was wondering if they do anything wrt > low/high watermarks like my idea. > > Basically you'd like to inform processes that the danger has been > alliviated so that they can cautiously start accepting more work > rather than freaking out and shutting out clients forever... The process is supposed to return unused memory to the system when it gets the signal, if it can. It's not supposed to shed all load until it gets the "all clear" signal. I don't know if there are any good books on Windows Internals, but the Windows VM system does the same thing: it notifies all kernel subsystems that they need to free up memory, if they can. The VFAT32 IFS will basically return exactly one page out of many thousands it is using for cache, when it gets the request (it is implemented as a callback, which you must provide when you register for VM services). > This might lead to a situation where SIGDANGER starts getting > sent informing that things are looking bleak, then processes > start freeing resources, they get the second SIGDANGER to let > them know that things are looking ok so they ramp up again and > the cycle repeats, I guess that's not optimal, but I'd like FreeBSD > to let processes know that things are looking better so they can > go from "scrooge mode" to "thrifty mode". The idea is just to free resources, if you can, and to mark the processes which are "precious" by whether or not they have a signal handler. A close reading of the other document posted (it seemed to be the admin manual from the URL) will indicate that the followon SIGKILL is not sent to the processes that have a SIGDANGER handler registered. Note that this does not mean that your process won't be killed off as a result of a page not present fault, so abusing the interface is not really tolerated very well by the system. I think signalling an "all clear" is really a bad idea; a soft hysteresis loop is much less prone to pendulum swings than a hard hysteresis loop (lesson #1 in the book "Fuzzy Logic"). -- Terry To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sun Sep 30 23:38:59 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from critter.freebsd.dk (critter.freebsd.dk [212.242.86.163]) by hub.freebsd.org (Postfix) with ESMTP id 5834C37B410 for ; Sun, 30 Sep 2001 23:38:44 -0700 (PDT) Received: from critter (localhost [127.0.0.1]) by critter.freebsd.dk (8.11.4/8.11.4) with ESMTP id f916cdv14027; Mon, 1 Oct 2001 08:38:39 +0200 (CEST) (envelope-from phk@critter.freebsd.dk) To: tlambert2@mindspring.com Cc: Bart Kus , hackers@freebsd.org Subject: Re: sio modification In-Reply-To: Your message of "Sun, 30 Sep 2001 22:27:53 PDT." <3BB7FED9.D91FAA2E@mindspring.com> Date: Mon, 01 Oct 2001 08:38:39 +0200 Message-ID: <14025.1001918319@critter> From: Poul-Henning Kamp Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG In message <3BB7FED9.D91FAA2E@mindspring.com>, Terry Lambert writes: >Bart Kus wrote: >> If I do have to write something, for my work to be included anywhere, I >> should be writing for the -CURRENT kernel, right? I presently run -STABLE, >> so that would obviously be the more comfortable kernel to write for...but it >> is *STABLE* after all. > >Most of us doing commercial developement write for -stable, and >give it out to be ported to -current by someone else, if we don't >have the time to do both. With the amount of code you have had to get integrated in our tree I can truly see how the workload would overwhelm you. Submissions should contain a -current version or they are likely to never make it into the tree... -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Mon Oct 1 1:37: 7 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from moon.quantum.ru (Moon.quantum.ru [213.170.64.43]) by hub.freebsd.org (Postfix) with ESMTP id 950B637B410 for ; Mon, 1 Oct 2001 01:37:02 -0700 (PDT) Received: from osw.com.ru (miha.quantum.ru [213.170.81.110]) by moon.quantum.ru (8.9.3/8.9.3) with SMTP id MAA05282 for ; Mon, 1 Oct 2001 12:37:00 +0400 (MSD) Received: (qmail 11550 invoked from network); 1 Oct 2001 08:36:26 -0000 Received: from ws4.osw.intranet (HELO osw.com.ru) (192.168.0.4) by gw.osw.intranet with SMTP; 1 Oct 2001 08:36:26 -0000 Message-ID: <3BB82BAD.6090301@osw.com.ru> Date: Mon, 01 Oct 2001 12:39:09 +0400 From: Vladimir Dozen User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:0.9.4) Gecko/20010913 X-Accept-Language: ru, en-us MIME-Version: 1.0 To: Alfred Perlstein Cc: Greg Lehey , Jos Backus , hackers@FreeBSD.ORG Subject: Re: VM: dynamic swap remapping (patch) References: <20010929232953.B341@eix.do-labs.spb.ru> <20010929175653.Z59854@elvis.mu.org> <20010930120328.A534@eix.do-labs.spb.ru> <20010930035529.G59854@elvis.mu.org> <20010930134437.B284@eix.do-labs.spb.ru> <20010930105509.B2220@lizzy.bugworks.com> <20010930142326.L59854@elvis.mu.org> <20010930123359.A7241@lizzy.bugworks.com> <20010930145558.M59854@elvis.mu.org> <20011001131951.M31215@wantadilla.lemis.com> <20010930234114.P59854@elvis.mu.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG ehlo. > Well Joe seems to have provided a pretty interesting document on > how it works in AIX, but I was wondering if they do anything wrt > low/high watermarks like my idea. > > Basically you'd like to inform processes that the danger has been > alliviated so that they can cautiously start accepting more work > rather than freaking out and shutting out clients forever... Actually, most of applications believe that everything OK except something tells them it's not. Regular OOM protection may be build as: int on_sigdanger(int) { throw std::runtime_error("out of memory"); } ... while( there_are_more_requests ) { try { do_some_work_eating_lot_of_memory(); } catch(const std::exception& ex) { cerr << ex.what() << endl; } } I.e, we will attempt to execute user requests while we have them in our queue, but we will get exceptions and stop processing if system is out of memory. As soon as system will get enough free space we will continue normal processing without any special handling from our side. It means that signal that opposite SIGDANGER is rarely required, if required at all. You should be glad, it reduces work to do. ;) P.S. I know that throwing inside signal handler is bad techique, but it works (and works better than setting flag and testing it everywhere). dozen To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Mon Oct 1 2:35:15 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from robin.mail.pas.earthlink.net (robin.mail.pas.earthlink.net [207.217.120.65]) by hub.freebsd.org (Postfix) with ESMTP id 738A337B412 for ; Mon, 1 Oct 2001 02:33:35 -0700 (PDT) Received: from mindspring.com (dialup-209.247.136.133.Dial1.SanJose1.Level3.net [209.247.136.133]) by robin.mail.pas.earthlink.net (8.11.5/8.9.3) with ESMTP id f919XMT29596; Mon, 1 Oct 2001 02:33:22 -0700 (PDT) Message-ID: <3BB83892.E0FAA8CE@mindspring.com> Date: Mon, 01 Oct 2001 02:34:10 -0700 From: Terry Lambert Reply-To: tlambert2@mindspring.com X-Mailer: Mozilla 4.7 [en]C-CCK-MCD {Sony} (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: Poul-Henning Kamp Cc: Bart Kus , hackers@freebsd.org Subject: Re: sio modification References: <14025.1001918319@critter> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Poul-Henning Kamp wrote: > Submissions should contain a -current version or they are likely > to never make it into the tree... I guess this is why the Rice University code that more than triples the TCP connection rate never made it in the first time they released it for 2.2 and then again when they released the updated version with resource containers for version 4.2 (though the license on the second version was not happy). I guess that's also why Luigi Rizzo's SACK and TSACK code for 2.x was never integrated. And the Pittsburgh Supercomputing Center code for the syn cache, which is vastly superior to the code in NetBSD and BSDI... And the MIT code for the TIME_WAIT zombies... It's a great pity that most MA and PhD thesis and real world products have hard deadlines that can't wait for -current to become stable enough to use in a product sold to people, and which the company shipping it must support when it has problems, but it's understandable why companies and people tend to do their development there instead of -current. If I were doing a new product, I'd pick 4.4, I think, since the KSE work and ACPI code has destabilized -current; it doesn't help, either, that the 5.0 release date was pushed back another year. This is not trying to lay blame; it's just pointing out that most funded work is going to take place in a -stable branch, since FreeBSD is being used a a platform for other work, and is not the ends in and of itself (the ends are graduation with a degree, or making money on a FreeBSD based product). Going to P4 would help that a little, but not as much as it would if P4 were free for commercial use; and yes, I understand their need to make money as well: I'm just pointing out that it's largely a tools problem. -- Terry To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Mon Oct 1 2:40:58 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from critter.freebsd.dk (critter.freebsd.dk [212.242.86.163]) by hub.freebsd.org (Postfix) with ESMTP id 41AE337B403 for ; Mon, 1 Oct 2001 02:40:54 -0700 (PDT) Received: from critter (localhost [127.0.0.1]) by critter.freebsd.dk (8.11.4/8.11.4) with ESMTP id f919eov16565; Mon, 1 Oct 2001 11:40:50 +0200 (CEST) (envelope-from phk@critter.freebsd.dk) To: tlambert2@mindspring.com Cc: Bart Kus , hackers@freebsd.org Subject: Re: sio modification In-Reply-To: Your message of "Mon, 01 Oct 2001 02:34:10 PDT." <3BB83892.E0FAA8CE@mindspring.com> Date: Mon, 01 Oct 2001 11:40:50 +0200 Message-ID: <16563.1001929250@critter> From: Poul-Henning Kamp Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG In message <3BB83892.E0FAA8CE@mindspring.com>, Terry Lambert writes: >It's a great pity that most MA and PhD thesis and real world >products have hard deadlines that can't wait for -current to >become stable enough to use in a product sold to people, and >which the company shipping it must support when it has problems, >but it's understandable why companies and people tend to do >their development there instead of -current. It is a great pity that sharp brains like yours, don't integrate these works into -current and submit a PR, rather than spew forth in one tiresome email af the next about how good the world would be if only we all listened more to you... To tell the truth Terry, I think more work would get done here if we didn't have to listen so much to five-star-arm-chair generals like you. -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Mon Oct 1 3:41: 0 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from bugz.infotecs.ru (bugz.infotecs.ru [195.210.139.22]) by hub.freebsd.org (Postfix) with ESMTP id D580E37B40C for ; Mon, 1 Oct 2001 03:40:55 -0700 (PDT) Received: (from root@localhost) by bugz.infotecs.ru (8.11.6/8.11.4) id f91AdOD88292 for freebsd-hackers@freebsd.org; Mon, 1 Oct 2001 14:39:24 +0400 (MSD) (envelope-from vel) From: "Eugene L. Vorokov" Message-Id: <200110011039.f91AdOD88292@bugz.infotecs.ru> Subject: how to make 'for' understand two words as a single argument To: freebsd-hackers@freebsd.org Date: Mon, 1 Oct 2001 14:39:24 +0400 (MSD) X-Mailer: ELM [version 2.5 PL5] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Hello, I have a script which is supposed to convert all filenames to lowercase recursively from current directory. It looks like: echo "Processing files" for i in `ls |grep [A-Z]`; \ do mv $i `echo $i |tr [A-Z] [a-z]`; echo $i;\ done; for i in `find . -name "*" -type d -maxdepth 1`;\ do if [ $i != "." ]; then cd $i; echo "Processing sub-dir $i"; $0; cd ..; fi \ done; It works fine unless some file or directory has a space in it's name. It this case each word is interpreted as a separate argument by 'for' and script doesn't find files. I tried this: for i in `ls |grep [A-Z] |awk '{printf("\"%s\"\n", $0);}'`; \ but it doesn't work either - I still get '"word1' and 'word2"' separately. How am I supposed to get this working ? Regards, Eugene To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Mon Oct 1 4:35:43 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from newsguy.com (smtp.newsguy.com [209.155.56.71]) by hub.freebsd.org (Postfix) with ESMTP id D3FE737B410 for ; Mon, 1 Oct 2001 04:34:17 -0700 (PDT) Received: from newsguy.com (ppp232-bsace7002.telebrasilia.net.br [200.181.81.232]) by newsguy.com (8.9.1a/8.9.1) with ESMTP id EAA98439; Mon, 1 Oct 2001 04:33:47 -0700 (PDT) Message-ID: <3BB855BB.D10C5030@newsguy.com> Date: Mon, 01 Oct 2001 08:38:35 -0300 From: "Daniel C. Sobral" X-Mailer: Mozilla 4.77 [en] (Win98; U) X-Accept-Language: en,pt-BR,pt,en-GB,en-US,ja MIME-Version: 1.0 To: "Eugene L. Vorokov" Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: how to make 'for' understand two words as a single argument References: <200110011039.f91AdOD88292@bugz.infotecs.ru> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG "Eugene L. Vorokov" wrote: > > I have a script which is supposed to convert all filenames to lowercase > recursively from current directory. It looks like: > > echo "Processing files" > for i in `ls |grep [A-Z]`; \ > do mv $i `echo $i |tr [A-Z] [a-z]`; echo $i;\ > done; > for i in `find . -name "*" -type d -maxdepth 1`;\ > do if [ $i != "." ]; then cd $i; echo "Processing sub-dir $i"; $0; cd ..; fi \ > done; > > It works fine unless some file or directory has a space in it's name. > It this case each word is interpreted as a separate argument by 'for' > and script doesn't find files. Any way using `` won't work. for i in a "b c" d works, for instance, but there is not way that I know of that you can control the output this way using ``. OTOH, try: find . -type d -maxdepth 1 -print -exec mv {} `echo {} | tr [A-Z] [a-z]` \; -- Daniel C. Sobral (8-DCS) dcs@newsguy.com dcs@freebsd.org capo@the.secret.bsdconspiracy.net wow regex humor... I'm a geek To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Mon Oct 1 4:55:48 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from alpha.dante.org.uk (alpha.dante.org.uk [193.63.211.19]) by hub.freebsd.org (Postfix) with ESMTP id 9EDFD37B403 for ; Mon, 1 Oct 2001 04:55:44 -0700 (PDT) Received: from pi.dante.org.uk ([193.63.211.70] helo=dante.org.uk) by alpha.dante.org.uk with esmtp (Exim 3.12 #4) id 15o1fR-0005LP-00; Mon, 01 Oct 2001 12:55:25 +0100 Message-ID: <3BB859AC.2192A711@dante.org.uk> Date: Mon, 01 Oct 2001 12:55:24 +0100 From: Konstantin Chuguev Organization: Delivery of Advanced Network Technology to Europe Ltd. X-Mailer: Mozilla 4.78 [en] (X11; U; SunOS 5.8 sun4u) X-Accept-Language: ru, en MIME-Version: 1.0 To: "Eugene L. Vorokov" Cc: "Daniel C. Sobral" , freebsd-hackers@FreeBSD.ORG Subject: Re: how to make 'for' understand two words as a single argument References: <200110011039.f91AdOD88292@bugz.infotecs.ru> <3BB855BB.D10C5030@newsguy.com> Content-Type: text/plain; charset=koi8-r Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG "Daniel C. Sobral" wrote: > "Eugene L. Vorokov" wrote: > > > > I have a script which is supposed to convert all filenames to lowercase > > recursively from current directory. It looks like: > > > > echo "Processing files" > > for i in `ls |grep [A-Z]`; \ > > do mv $i `echo $i |tr [A-Z] [a-z]`; echo $i;\ > > done; ls |grep [A-Z] | while read i; \ do mv $i `echo $i |tr [A-Z] [a-z]`; echo $i;\ done > > > for i in `find . -name "*" -type d -maxdepth 1`;\ > > do if [ $i != "." ]; then cd $i; echo "Processing sub-dir $i"; $0; cd ..; fi \ > > done; find . -name "*" -type d -maxdepth 1 | while read i; \ do if [ $i != "." ]; then cd $i; echo "Processing sub-dir $i"; $0; cd ..; fi \ done Be aware that the pipe will launch a child shell for the while loop, so any variables set inside the loop will get lost after 'done' And, of course, the output of the first part of the pipe should be one file name per line. -- * * Konstantin Chuguev Francis House * * Application Engineer 112 Hills Road * Tel: +44 1223 302992 Cambridge CB2 1PQ D A N T E WWW: http://www.dante.net United Kingdom To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Mon Oct 1 4:57: 7 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from pcwin002.win.tue.nl (pcwin002.win.tue.nl [131.155.71.72]) by hub.freebsd.org (Postfix) with ESMTP id 3522137B40E for ; Mon, 1 Oct 2001 04:57:03 -0700 (PDT) Received: (from stijn@localhost) by pcwin002.win.tue.nl (8.11.6/8.11.4) id f91BuZq39371; Mon, 1 Oct 2001 13:56:35 +0200 (CEST) (envelope-from stijn) Date: Mon, 1 Oct 2001 13:56:35 +0200 From: Stijn Hoop To: "Daniel C. Sobral" Cc: "Eugene L. Vorokov" , freebsd-hackers@freebsd.org Subject: Re: how to make 'for' understand two words as a single argument Message-ID: <20011001135635.A39309@pcwin002.win.tue.nl> References: <200110011039.f91AdOD88292@bugz.infotecs.ru> <3BB855BB.D10C5030@newsguy.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <3BB855BB.D10C5030@newsguy.com>; from dcs@newsguy.com on Mon, Oct 01, 2001 at 08:38:35AM -0300 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Mon, Oct 01, 2001 at 08:38:35AM -0300, Daniel C. Sobral wrote: > "Eugene L. Vorokov" wrote: > > > > I have a script which is supposed to convert all filenames to lowercase > > recursively from current directory. It looks like: > > > > echo "Processing files" > > for i in `ls |grep [A-Z]`; \ > > do mv $i `echo $i |tr [A-Z] [a-z]`; echo $i;\ > > done; > > for i in `find . -name "*" -type d -maxdepth 1`;\ > > do if [ $i != "." ]; then cd $i; echo "Processing sub-dir $i"; $0; cd ..; fi \ > > done; > > > > It works fine unless some file or directory has a space in it's name. > > It this case each word is interpreted as a separate argument by 'for' > > and script doesn't find files. > > Any way using `` won't work. for i in a "b c" d works, for instance, but > there is not way that I know of that you can control the output this way > using ``. Yes there is: set IFS to only contain a newline beforehand. That's my local hack, your way is probably better :) --Stijn -- "I used to think I was indecisive, but now I'm not so sure." To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Mon Oct 1 4:57:21 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from rfhs8012.fh-regensburg.de (rfhs8012.fh-regensburg.de [194.95.108.29]) by hub.freebsd.org (Postfix) with ESMTP id 1241837B401 for ; Mon, 1 Oct 2001 04:57:17 -0700 (PDT) Received: from rfhpc8320.fh-regensburg.de (wup34966@rfhpc8320.fh-regensburg.de [194.95.108.32]) by rfhs8012.fh-regensburg.de (8.11.6/8.11.6) with ESMTP id f91BvCN16689 for ; Mon, 1 Oct 2001 13:57:12 +0200 (MEST) Received: (from wup34966@localhost) by rfhpc8320.fh-regensburg.de (8.9.1/8.8.3) id NAA03682 for hackers@freebsd.org; Mon, 1 Oct 2001 13:57:12 +0200 (MET DST) Date: Mon, 1 Oct 2001 13:57:12 +0200 From: Peter Wullinger To: hackers@freebsd.org Subject: Re: how to make 'for' understand two words as a single argument Message-ID: <20011001135712.A3593@rfhpc8320.fh-regensburg.de> References: <20011001135119.B17764@pc04.ipc-kallmuenz.de> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-rmd160; protocol="application/pgp-signature"; boundary="0OAP2g/MAC+5xKAE" Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20011001135119.B17764@pc04.ipc-kallmuenz.de>; from wullinger@ipc-fabautomation.com on Mon, Oct 01, 2001 at 01:51:19PM +0200 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG --0OAP2g/MAC+5xKAE Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Oct 01, 2001 at 01:51:19PM +0200, Peter Wullinger wrote: >=20 > find . -type d -maxdepth 1 -print -exec mv {} `echo {} | tr [A-Z] [a-z]` > \; This does not work either, since it rename directories while still processi= ng it... And it renames only dirs ;-) Try your old script and setup IFS to newline=20 Sorry, I don't know any more how to do this, it is either IFS=3D"\ " or IFS=3D"\n"; Peter =20 --0OAP2g/MAC+5xKAE Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.0 (SunOS) Comment: For info see http://www.gnupg.org iD8DBQE7uFoX2o6XoYZo6n4RAvTVAJ0SSeSdrnkIqrPn02Po3MR3cWG5/gCfVqp6 rLuejmMoGIzkNK84i7bS7es= =QkGj -----END PGP SIGNATURE----- --0OAP2g/MAC+5xKAE-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Mon Oct 1 5:29:46 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from bugz.infotecs.ru (bugz.infotecs.ru [195.210.139.22]) by hub.freebsd.org (Postfix) with ESMTP id EED2737B407 for ; Mon, 1 Oct 2001 05:29:40 -0700 (PDT) Received: (from root@localhost) by bugz.infotecs.ru (8.11.6/8.11.4) id f91CRin11441; Mon, 1 Oct 2001 16:27:44 +0400 (MSD) (envelope-from vel) From: "Eugene L. Vorokov" Message-Id: <200110011227.f91CRin11441@bugz.infotecs.ru> Subject: Re: how to make 'for' understand two words as a single argument To: Konstantin.Chuguev@dante.org.uk (Konstantin Chuguev) Date: Mon, 1 Oct 2001 16:27:44 +0400 (MSD) Cc: freebsd-hackers@freebsd.org In-Reply-To: from "Konstantin Chuguev" at Oct 01, 2001 12:55:24 PM X-Mailer: ELM [version 2.5 PL5] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG > > "Eugene L. Vorokov" wrote: > > > > > > I have a script which is supposed to convert all filenames to lowercase > > > recursively from current directory. It looks like: > > > > > > echo "Processing files" > > > for i in `ls |grep [A-Z]`; \ > > > do mv $i `echo $i |tr [A-Z] [a-z]`; echo $i;\ > > > done; > > ls |grep [A-Z] | while read i; \ > do mv $i `echo $i |tr [A-Z] [a-z]`; echo $i;\ > done > > > > > > for i in `find . -name "*" -type d -maxdepth 1`;\ > > > do if [ $i != "." ]; then cd $i; echo "Processing sub-dir $i"; $0; cd ..; fi \ > > > done; > > find . -name "*" -type d -maxdepth 1 | while read i; \ > do if [ $i != "." ]; then cd $i; echo "Processing sub-dir $i"; $0; cd ..; fi \ > done This way it works fine, thanks ! Regards, Eugene To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Mon Oct 1 9:13:36 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from mail.webmonster.de (datasink.webmonster.de [194.162.162.209]) by hub.freebsd.org (Postfix) with SMTP id E7C8537B41B for ; Mon, 1 Oct 2001 09:10:42 -0700 (PDT) Received: (qmail 93929 invoked by uid 1000); 1 Oct 2001 16:11:03 -0000 Date: Mon, 1 Oct 2001 18:11:03 +0200 From: "Karsten W. Rohrbach" To: Greg Lehey Cc: Alfred Perlstein , Jos Backus , hackers@FreeBSD.ORG Subject: Re: VM: dynamic swap remapping (patch) Message-ID: <20011001181103.D93325@mail.webmonster.de> Mail-Followup-To: "Karsten W. Rohrbach" , Greg Lehey , Alfred Perlstein , Jos Backus , hackers@FreeBSD.ORG References: <20010929232953.B341@eix.do-labs.spb.ru> <20010929175653.Z59854@elvis.mu.org> <20010930120328.A534@eix.do-labs.spb.ru> <20010930035529.G59854@elvis.mu.org> <20010930134437.B284@eix.do-labs.spb.ru> <20010930105509.B2220@lizzy.bugworks.com> <20010930142326.L59854@elvis.mu.org> <20010930123359.A7241@lizzy.bugworks.com> <20010930145558.M59854@elvis.mu.org> <20011001131951.M31215@wantadilla.lemis.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-md5; protocol="application/pgp-signature"; boundary="JwB53PgKC5A7+0Ej" Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20011001131951.M31215@wantadilla.lemis.com>; from grog@FreeBSD.org on Mon, Oct 01, 2001 at 01:19:51PM +0930 X-Arbitrary-Number-Of-The-Day: 42 X-URL: http://www.webmonster.de/ X-Disclaimer: My opinions do not necessarily represent those of my employer X-Work-URL: http://www.ngenn.net/ X-Work-Address: nGENn GmbH, Schloss Kransberg, D-61250 Usingen-Kransberg, Germany X-Work-Phone: +49-6081-682-304 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG --JwB53PgKC5A7+0Ej Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable i got a (way old) ppc 604e, in the corner of my office. it's a 74p, latest 4.3.3 patchlevel from one month ago or so installed. i could arrange ssh access to the box if somebody cares, although i am not available 24x7 for remote hands ;-) there's nothing critical on it, the box got 128mb ram, so contact me=20 off-list if you want to play around with it. /k Greg Lehey(grog@FreeBSD.org)@2001.10.01 13:19:51 +0000: > On Sunday, 30 September 2001 at 14:55:58 -0500, Alfred Perlstein wrote: > > * Jos Backus [010930 14:35] wrote: > >> On Sun, Sep 30, 2001 at 02:23:26PM -0500, Alfred Perlstein wrote: > >>> * Jos Backus [010930 12:55] wrote: > >>>> AIX has SIGDANGER. > >>> > >>> Anyone care to tell me how it works in AIX? If the interface is > >>> nice, cloning it would be kind of cool. > >> > >> I don't currently have access to an AIX system, but > >> > >> http://as400bks.rochester.ibm.com/doc_link/en_US/a_doc_lib/aixbman/adm= nconc/pag_space_under.htm > >> > >> has some (useful) info. > > > > It sure does! > > > > I think I'm going to make a proposal on -arch about this, to be > > perfectly honest, AIX has a good implementation, I haven't read it > > all yet, but it doesn't look like it gives the applications a > > notification when the danger is gone, we'll have to figure that out, > > or I'll have to read more into this. >=20 > If it's any help, I have an AIX box here. It belongs to IBM, so I > have to respect security issues, but I'll do what I can. >=20 > Greg > -- > See complete headers for address and phone numbers >=20 > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-hackers" in the body of the message --=20 > Gravity is an unforgiving motherfucker. KR433/KR11-RIPE -- WebMonster Community Founder -- nGENn GmbH Senior Techie http://www.webmonster.de/ -- ftp://ftp.webmonster.de/ -- http://www.ngenn.n= et/ karsten&rohrbach.de -- alpha&ngenn.net -- alpha&scene.org -- catch@spam.de GnuPG 0x2964BF46 2001-03-15 42F9 9FFF 50D4 2F38 DBEE DF22 3340 4F4E 2964 B= F46 Please do not remove my address from To: and Cc: fields in mailing lists. 1= 0x --JwB53PgKC5A7+0Ej Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (FreeBSD) Comment: For info see http://www.gnupg.org iD8DBQE7uJWXM0BPTilkv0YRAokFAJ9h7MRRgblmtKpmSOA17ojJlSBGcACeNlGp v1Rx2Y+GReblEQ0nBe+ksEM= =yvN8 -----END PGP SIGNATURE----- --JwB53PgKC5A7+0Ej-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Mon Oct 1 11:20:24 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from InterJet.elischer.org (c421509-a.pinol1.sfba.home.com [24.7.86.9]) by hub.freebsd.org (Postfix) with ESMTP id DBEBD37B40E for ; Mon, 1 Oct 2001 11:20:16 -0700 (PDT) Received: from localhost (localhost.elischer.org [127.0.0.1]) by InterJet.elischer.org (8.9.1a/8.9.1) with ESMTP id LAA86739; Mon, 1 Oct 2001 11:45:00 -0700 (PDT) Date: Mon, 1 Oct 2001 11:44:59 -0700 (PDT) From: Julian Elischer To: Warner Losh Cc: Bart Kus , hackers@FreeBSD.ORG Subject: Re: precise timing In-Reply-To: <200110010335.f913Z6701389@harmony.village.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG the REALLY best answer was the suggestion to use teh speaker output.. (ANDED with anuother bit.. you don;t want the bios BEEP to move teh drill.. alrternatively you can also use the tiemrs.. remember that the pcaudio device runs the available clock chip up to 16,000 Hz.. and changes teh duty cycle on each cycle.. You could do something like that.... julian On Sun, 30 Sep 2001, Warner Losh wrote: > In message <200109301010.07784@EO> Bart Kus writes: > : Right now, I use for() as a timing loop. I calibrate it on program start > : and can then get very precise timing. There are, of course, the intermittent > : interruptions of the multitasker. So this solution is not ideal by any > : means. In fact, the for() loop approach is really meant for the DOS port of > : this software. I'm wondering if there is any way I can access a more precise > : interrupt-driven (or blocking) timing source. I know I can do a select() > : with supposedly microsecond accuracy, but I doubt that it is in fact that > : accurate in practice (doesn't the kernel only use a 100Hz clock or > : something?). Is there any way to get at the system timers on the > : motherboard? Those can provide precise timing, no? > > you are likely better off implementing this as a device driver, likely > with the parallel port bus stuff. > > Warner > > 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 Oct 1 11:33:23 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from prism.flugsvamp.com (cb58709-a.mdsn1.wi.home.com [24.17.241.9]) by hub.freebsd.org (Postfix) with ESMTP id 0202537B40D for ; Mon, 1 Oct 2001 11:33:16 -0700 (PDT) Received: (from jlemon@localhost) by prism.flugsvamp.com (8.11.0/8.11.0) id f91IUJr13736; Mon, 1 Oct 2001 13:30:19 -0500 (CDT) (envelope-from jlemon) Date: Mon, 1 Oct 2001 13:30:19 -0500 From: Jonathan Lemon To: Guido van Rooij Cc: Jonathan Lemon , hackers@freebsd.org Subject: Re: cvs commit: src/sys/conf majors src/sys/net if.c Message-ID: <20011001133019.A12292@prism.flugsvamp.com> References: <200109290555.f8T5tCu17458@prism.flugsvamp.com> <20011001202223.A57173@gvr.gvr.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0pre2i In-Reply-To: <20011001202223.A57173@gvr.gvr.org> Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Mon, Oct 01, 2001 at 08:22:23PM +0200, Guido van Rooij wrote: > On Sat, Sep 29, 2001 at 12:55:12AM -0500, Jonathan Lemon wrote: > > In article you write: > > >jlemon 2001/09/28 22:55:04 PDT > > > > > > Modified files: > > > sys/conf majors > > > sys/net if.c > > > Log: > > > Introduce network device nodes. Network devices will now automatically > > > appear in /dev. Interface hardware ioctls (not protocol or routing) can > > > be performed on the descriptor. The SIOCGIFCONF ioctl may be performed > > > on the special /dev/network node. > > > > The semantics of read/write on the node are currently undefined, > > discussion on their appropriate behavior (if any) is invited. > > This commit is the precursor for some additional features which > > require a dev_t/filehandle for their operation (e.g.: kqueue support). > > Cool. I did a presentation abt kqueue and added a slide with just something > like this. > > What I would, among other be interested in was media changes and errors. > I alos here people talk about BPF stuff. > Perhaps there should be a node and a control node... Right now, there is /dev/network, which is intended as a control node. One possibility would be to use this to provde a central place to do general operations like device cloning. Another possibility would have have network node changes (addition, removal) reported here, although this probably wants some sort of central devd mechanism, rather than restricting it to network devices only. As for link up/down events, try the small sample program attached. I'm not quite satisfied with the behavior yet; there should be a way to get the inital status of the link as well as link changes, but it is a start. -- Jonathan #include #include #include #include #include #include #include #include #include int main(int argc, char **argv) { int fd, kq, n; struct kevent event[2]; char buffer[128]; struct timespec nullts = { 0, 0 }; int fdout = 1; if (argc != 2) errx(1, "Usage: %s net_device\n", argv[0]); fd = open(argv[1], O_RDWR); if (fd == -1) err(1, "open(%s)", argv[1]); kq = kqueue(); if (kq < 0) err(1, "kqueue"); EV_SET(&event[0], fd, EVFILT_NETDEV, EV_ADD | EV_CLEAR, NOTE_LINKUP | NOTE_LINKDOWN | NOTE_LINKINV, 0, 0); n = kevent(kq, event, 1, NULL, 0, &nullts); if (n == -1) err(1, "kevent"); for (;;) { n = kevent(kq, NULL, 0, event, 1, NULL); if (n < 0) err(1, "kevent"); printf("fflags: 0x%x\n", event[0].fflags); printf("Link"); if (event[0].fflags & NOTE_LINKUP) printf(" up"); if (event[0].fflags & NOTE_LINKDOWN) printf(" down"); if (event[0].fflags & NOTE_LINKINV) printf(" indeterminate"); printf("\n"); } return (0); } To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Mon Oct 1 14:59:53 2001 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 42BCD37B407 for ; Mon, 1 Oct 2001 14:59:46 -0700 (PDT) Received: from onyx (onyx.cs.binghamton.edu [128.226.140.171]) by bingnet2.cc.binghamton.edu (8.11.4/8.11.4) with ESMTP id f91LxjS07729 for ; Mon, 1 Oct 2001 17:59:45 -0400 (EDT) Date: Mon, 1 Oct 2001 17:59:14 -0400 (EDT) From: Zhihui Zhang X-Sender: zzhang@onyx To: freebsd-hackers@freebsd.org Subject: Make a kernel in a different directory Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG I put the whole kernel code under /test by the following command: #cp -R /usr/src/sys /test My configuration file is under /test/sys/i386/conf. Then I follow all the steps as I usually do to make a kernel and install the kernel (config, make depend, make, and make install). But I got the following errors: # make install chflags noschg /kernel mv /kernel /kernel.old install -c -m 555 -o root -g wheel -fschg kernel /kernel if [ -d /modules -a -n "`ls /modules`" ]; then mkdir -p /modules.old; cp -p /modules/* /modules.old; fi; cd ../../modules && env MAKEOBJDIRPREFIX=/test/sys/compile/TRY/modules make install ===> accf_data install -c -o root -g wheel -m 555 accf_data.ko /modules ===> accf_http install -c -o root -g wheel -m 555 accf_http.ko /modules install: accf_http.ko: No such file or directory *** Error code 71 Stop in /test/sys/modules/accf_http. *** Error code 1 I go to the directory and there is nothing except Makefile there: # pwd /test/sys/modules/accf_http # ls -al total 24 drwxr-xr-x 2 root wheel 56 Oct 1 17:49 . drwxr-xr-x 97 root wheel 1848 Oct 1 17:49 .. -rw-r--r-- 1 root wheel 183 Oct 1 17:49 Makefile I must have missed something. Thanks for any help. I am using 4.3-Release on a PC. -Zhihui To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Mon Oct 1 15: 4:24 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from opine.cs.umass.edu (opine.cs.umass.edu [128.119.240.42]) by hub.freebsd.org (Postfix) with ESMTP id E101C37B40E for ; Mon, 1 Oct 2001 15:04:18 -0700 (PDT) Received: from localhost (sli@localhost) by opine.cs.umass.edu (8.8.7/8.8.8) with ESMTP id SAA18702; Mon, 1 Oct 2001 18:04:17 -0400 (EDT) Date: Mon, 1 Oct 2001 18:04:16 -0400 (EDT) From: Song Li To: Zhihui Zhang Cc: Subject: Re: Make a kernel in a different directory In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG So what's the contents of the Makefile in the accf_http directory? On Mon, 1 Oct 2001, Zhihui Zhang wrote: > > I put the whole kernel code under /test by the following command: > > #cp -R /usr/src/sys /test > > My configuration file is under /test/sys/i386/conf. Then I follow > all the steps as I usually do to make a kernel and install the kernel > (config, make depend, make, and make install). > > But I got the following errors: > > # make install > chflags noschg /kernel > mv /kernel /kernel.old > install -c -m 555 -o root -g wheel -fschg kernel /kernel > if [ -d /modules -a -n "`ls /modules`" ]; then mkdir -p /modules.old; cp > -p /modules/* /modules.old; fi; > cd ../../modules && env MAKEOBJDIRPREFIX=/test/sys/compile/TRY/modules > make install > ===> accf_data > install -c -o root -g wheel -m 555 accf_data.ko /modules > ===> accf_http > install -c -o root -g wheel -m 555 accf_http.ko /modules > install: accf_http.ko: No such file or directory > *** Error code 71 > > Stop in /test/sys/modules/accf_http. > *** Error code 1 > > I go to the directory and there is nothing except Makefile there: > > # pwd > /test/sys/modules/accf_http > # ls -al > total 24 > drwxr-xr-x 2 root wheel 56 Oct 1 17:49 . > drwxr-xr-x 97 root wheel 1848 Oct 1 17:49 .. > -rw-r--r-- 1 root wheel 183 Oct 1 17:49 Makefile > > I must have missed something. Thanks for any help. I am using 4.3-Release > on a PC. > > -Zhihui > > > 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 Oct 1 15:22: 2 2001 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 335BF37B406 for ; Mon, 1 Oct 2001 15:21:58 -0700 (PDT) Received: from onyx (onyx.cs.binghamton.edu [128.226.140.171]) by bingnet2.cc.binghamton.edu (8.11.4/8.11.4) with ESMTP id f91MLuS18747; Mon, 1 Oct 2001 18:21:56 -0400 (EDT) Date: Mon, 1 Oct 2001 18:21:25 -0400 (EDT) From: Zhihui Zhang X-Sender: zzhang@onyx To: Song Li Cc: freebsd-hackers@freebsd.org Subject: Re: Make a kernel in a different directory In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG The Makefile contains the following: # $FreeBSD: src/sys/modules/accf_http/Makefile,v 1.1.2.1 2000/07/28 04:03:48 alfred Exp $ .PATH: ${.CURDIR}/../../netinet KMOD = accf_http SRCS = accf_http.c .include On Mon, 1 Oct 2001, Song Li wrote: > So what's the contents of the Makefile in the accf_http directory? > > > On Mon, 1 Oct 2001, Zhihui Zhang wrote: > > > > > I put the whole kernel code under /test by the following command: > > > > #cp -R /usr/src/sys /test > > > > My configuration file is under /test/sys/i386/conf. Then I follow > > all the steps as I usually do to make a kernel and install the kernel > > (config, make depend, make, and make install). > > > > But I got the following errors: > > > > # make install > > chflags noschg /kernel > > mv /kernel /kernel.old > > install -c -m 555 -o root -g wheel -fschg kernel /kernel > > if [ -d /modules -a -n "`ls /modules`" ]; then mkdir -p /modules.old; cp > > -p /modules/* /modules.old; fi; > > cd ../../modules && env MAKEOBJDIRPREFIX=/test/sys/compile/TRY/modules > > make install > > ===> accf_data > > install -c -o root -g wheel -m 555 accf_data.ko /modules > > ===> accf_http > > install -c -o root -g wheel -m 555 accf_http.ko /modules > > install: accf_http.ko: No such file or directory > > *** Error code 71 > > > > Stop in /test/sys/modules/accf_http. > > *** Error code 1 > > > > I go to the directory and there is nothing except Makefile there: > > > > # pwd > > /test/sys/modules/accf_http > > # ls -al > > total 24 > > drwxr-xr-x 2 root wheel 56 Oct 1 17:49 . > > drwxr-xr-x 97 root wheel 1848 Oct 1 17:49 .. > > -rw-r--r-- 1 root wheel 183 Oct 1 17:49 Makefile > > > > I must have missed something. Thanks for any help. I am using 4.3-Release > > on a PC. > > > > -Zhihui > > > > > > 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 Oct 1 16:22: 5 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from mta06.onebox.com (mta06.onebox.com [64.68.77.179]) by hub.freebsd.org (Postfix) with ESMTP id 13E0637B408 for ; Mon, 1 Oct 2001 16:22:03 -0700 (PDT) Received: from onebox.com ([10.1.111.6]) by mta06.onebox.com (InterMail vM.4.01.03.23 201-229-121-123-20010418) with SMTP id <20011001232202.UBUL29220.mta06.onebox.com@onebox.com> for ; Mon, 1 Oct 2001 16:22:02 -0700 Received: from [165.121.194.156] by onebox.com with HTTP; Mon, 01 Oct 2001 16:22:02 -0700 Date: Mon, 01 Oct 2001 16:22:02 -0700 Subject: Configuring 3Com 3C589 on Dell Insprion 5000e From: "Glenn Gombert" To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit MIME-Version: 1.0 Message-Id: <20011001232202.UBUL29220.mta06.onebox.com@onebox.com> Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Hello, I have a Dell Inspiron 5000e that I want to configure with a 3Com 589 pcmcia eithernet card. Can anyone tell me exactly what I need to put into the kernal config file to support this card on my Dell Laptop?? Thanks in advance, Glenn G. -- Glenn Gombert glenngombert@onebox.com - email (513) 587-2643 x2263 - voicemail/fax __________________________________________________ FREE voicemail, email, and fax...all in one place. Sign Up Now! http://www.onebox.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Mon Oct 1 16:38: 0 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from mail.wrs.com (unknown-1-11.windriver.com [147.11.1.11]) by hub.freebsd.org (Postfix) with ESMTP id EDD4537B40C for ; Mon, 1 Oct 2001 16:37:57 -0700 (PDT) Received: from laptop.baldwin.cx ([147.11.46.209]) by mail.wrs.com (8.9.3/8.9.1) with ESMTP id QAA02599; Mon, 1 Oct 2001 16:37:53 -0700 (PDT) Message-ID: 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: <20011001232202.UBUL29220.mta06.onebox.com@onebox.com> Date: Mon, 01 Oct 2001 16:37:33 -0700 (PDT) From: John Baldwin To: Glenn Gombert Subject: RE: Configuring 3Com 3C589 on Dell Insprion 5000e Cc: freebsd-hackers@FreeBSD.org Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On 01-Oct-01 Glenn Gombert wrote: > Hello, > > I have a Dell Inspiron 5000e that I want to configure with a 3Com 589 > pcmcia eithernet card. Can anyone tell me exactly what I need to put > into the kernal config file to support this card on my Dell Laptop?? Normal pccard support and the ep(4) driver. The -mobile list is usually a better place for asking laptop questions BTW. -- John Baldwin -- http://www.FreeBSD.org/~jhb/ PGP Key: http://www.baldwin.cx/~john/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 Mon Oct 1 18:29: 4 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from diablo.gammae.com (diablo.gammae.com [208.49.12.9]) by hub.freebsd.org (Postfix) with ESMTP id E308337B40C for ; Mon, 1 Oct 2001 18:28:53 -0700 (PDT) Received: from localhost (hummer [208.49.12.10]) by diablo.gammae.com (8.11.0/8.11.0) with SMTP id f921gmQ14776 for ; Mon, 1 Oct 2001 21:42:49 -0400 (EDT) Message-Id: <200110020142.f921gmQ14776@diablo.gammae.com> Subject: Please Confirm Free Subscription Content-transfer-encoding: quoted-printable Content-type: text/html; charset="iso-8859-1" Mime-version: 1.0 To: From: Asians By Mail Date: Mon, 1 Oct 2001 21:42 -0400 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Asians by mail - (FREE Pictures)
=20 =20 =20 =20
=20 =20
=20 =20 =20
=20 =20
=20 =20
=20 =20 =20 =20
=20 =20

This=20 is not a spam, someone from ip 207= .172.11.232=20 requested a subscription to this free= newsletter.=20 You must confirm your subscription to= get=20 the daily emails. If you did not requ= est=20 this subscription, someone did on you= r behalf.

YOU MUST=20 CONFIRM YOUR FREE MEMBERSHIP, FOLLOW = INSTRUCTIONS:

Thank=20 you for signing up with Asians By Mai= l!=20 The best way to see the youngest and = hottest=20 oriental girls, delivered right to yo= ur=20 e-mail box every day of the week.

Prepare=20 yourself for a wild ride!

Click=20 Here to Confirm.
ht= tp://www.asiansbymail.com/manager.php?sid=3D3172134&skey=3D2c3e68dc7dd579da= =20

To=20 start getting Asians By Mail, copy th= e link=20 above and paste it to your browser, y= ou'll=20 be taken to the confirmation page.

IMPORTANT:=20 You must confirm your subscrition to = get=20 our FREE newsletter.

Click=20 Here to Confirm.
http:= //www.asiansbymail.com/manager.php?sid=3D3172134&skey=3D2c3e68dc7dd579da

=20 Thanks again, and get ready ... here = come=20 your FREE asian pics!

=20 =20
=20 =20 =20
<= /td>

=A9  2 0 0 0    <= font size=3D"2">G A M M A  E N T E R T A I N&nbs= p;M E N T    = ;A l l   R i g h t s = ; R e s e r v e d=

To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Mon Oct 1 18:31:59 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from rover.village.org (rover.bsdimp.com [204.144.255.66]) by hub.freebsd.org (Postfix) with ESMTP id 4271D37B40C for ; Mon, 1 Oct 2001 18:31:57 -0700 (PDT) Received: from harmony.village.org (harmony.village.org [10.0.0.6]) by rover.village.org (8.11.3/8.11.3) with ESMTP id f921Vuu71099; Mon, 1 Oct 2001 19:31:56 -0600 (MDT) (envelope-from imp@harmony.village.org) Received: from harmony.village.org (localhost [127.0.0.1]) by harmony.village.org (8.11.6/8.11.6) with ESMTP id f921Vt709365; Mon, 1 Oct 2001 19:31:55 -0600 (MDT) (envelope-from imp@harmony.village.org) Message-Id: <200110020131.f921Vt709365@harmony.village.org> To: "Glenn Gombert" Subject: Re: Configuring 3Com 3C589 on Dell Insprion 5000e Cc: freebsd-hackers@FreeBSD.ORG In-reply-to: Your message of "Mon, 01 Oct 2001 16:22:02 PDT." <20011001232202.UBUL29220.mta06.onebox.com@onebox.com> References: <20011001232202.UBUL29220.mta06.onebox.com@onebox.com> Date: Mon, 01 Oct 2001 19:31:55 -0600 From: Warner Losh Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG In message <20011001232202.UBUL29220.mta06.onebox.com@onebox.com> "Glenn Gombert" writes: : I have a Dell Inspiron 5000e that I want to configure with a 3Com 589 : pcmcia eithernet card. Can anyone tell me exactly what I need to put : into the kernal config file to support this card on my Dell Laptop?? # PCCARD (PCMCIA) support device card # pccard bus device pcic # PCMCIA bridge device ep Warner To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Mon Oct 1 18:46:20 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from diablo.gammae.com (diablo.gammae.com [208.49.12.9]) by hub.freebsd.org (Postfix) with ESMTP id B2D5737B408 for ; Mon, 1 Oct 2001 18:46:04 -0700 (PDT) Received: from diablo.gammae.com (localhost [127.0.0.1]) by diablo.gammae.com (8.11.0/8.11.0) with ESMTP id f92205Q18865 for ; Mon, 1 Oct 2001 22:00:05 -0400 (EDT) Date: Mon, 1 Oct 2001 22:00:05 -0400 (EDT) Message-Id: <200110020200.f92205Q18865@diablo.gammae.com> To: From: Asians By Mail Subject: Free Asian Pictures - October 1, 2001 Content-type: text/html; charset="iso-8859-1" Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Asians by mail - (FREE Pictures)
October 1, 2001
 
Get Your Free Cell Phone NOW!!!
Click here to DOUBLE your internet speed.
No Risk, Garanteed!

School Girls - Real Teen-Age Sluts!
These Sluts Are Waiting For The School Bell To Ring! So They Can Go Suck The Football Team!

Check it out Now!

Young Wives
Enjoy Amateur pictures of Young Wives from around the world - they're slutty, they're horny, they're wet and they spread wide for you. View the Huge Photo Gallery - barely legal cuties, asians, readheads, latinas, older women, bondage, big tits, close ups, group sex & so much more! Peep through our Live Hidden VOYEUR CAMS - shower, dressing room, tanning bed!

Click Here Now

Increase Your Sex Drive!
Impulsaria is the #1 Sexual Enhancer for MEN & WOMEN! Natural alternative to Viagra. MEN feel like a teenager again; rock solid Erections & increased Stamina. WOMEN will have intensified Orgasms & vaginal lubrication. GREAT SEX GUARANTEED!

Click Here for GREAT new stuff!

VirtuaGirl - Girls stripping on your desktop!
Nasty Girls Stripping On Your Desktop!
-100% Free VirtuaGirl can be whoever, whatever, whenever you feel like right on your desktop!!

Tempting, no ?? And there is more...


Click Here for HOT new stuff



Click Here to view your Free Daily Pictures!

More Free Pics! TeensCuties!
Get free pictures of beautiful and young girls daily in your email!

Click Here for more FREE pics

Click Here to view your Free Jokes of the day!

©  2 0 0 0    G A M M A  E N T E R T A I N M E N T    A l l   R i g h t s  R e s e r v e d

To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Mon Oct 1 21: 4:16 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from mta10.onebox.com (mta10.onebox.com [64.68.76.184]) by hub.freebsd.org (Postfix) with ESMTP id 2E4AE37B40E for ; Mon, 1 Oct 2001 21:03:53 -0700 (PDT) Received: from onebox.com ([10.1.101.5]) by mta04.onebox.com (InterMail vM.4.01.03.23 201-229-121-123-20010418) with SMTP id <20010930195319.PQDX19615.mta04.onebox.com@onebox.com>; Sun, 30 Sep 2001 12:53:19 -0700 Received: from [66.32.1.193] by onebox.com with HTTP; Sun, 30 Sep 2001 12:53:19 -0700 Date: Sun, 30 Sep 2001 12:53:19 -0700 Subject: Re: KSE next steps... From: "Glenn Gombert" To: Julian Elischer Cc: hackers@FreeBSD.ORG Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit MIME-Version: 1.0 Message-Id: <20010930195319.PQDX19615.mta04.onebox.com@onebox.com> Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG A couple of questions come to mind after reading what has been done so far and what ( think has been committed into the the Free BSD Current tree)and reading throught the present KSE write up.. How much of the KSE code is dependant upon the SMP support being fully functional?? The new system call(s) sa_new(cpy_id), sa_pressmpt)...etc seem to depend upon the new SMP support being functional in the 'Current' tree...is this the case or call's like "sa_new(cpu_id) will just create one KSE per avaiable CPU (one on a single cpu machine).. > Should they be allocated from a zone allocator similar to that > currently used for process structures? > Should the vm object associated with threads structures be allocated > and 'left' as it presently is (type stable storage)? > Should the thread structure that comes with the proc structure be used > as one of > the > threads for KSE operation, or should it be left untouched until > KSE mode is stopped (or exit)? If we use the thread pre-packed with > the proc > there are some problems.. > > For example: it is intimatly associated with one process, but thread > structs in > KSE > mode are transient, and might be given to a different process should > it be > needed > there. (kernel thread structures are only 'used' when the thread enters > the > kernel > due to a trap of some sort (e.g. syscall) until it returns back to > user land). > It provides the stack and storage for the thread to transfer from user > to kernel > and is 'empty' while the thread is running in user space. > > Another option might be to ALWAYS allocate them separatly.. That makes > the first > one > just another thread struct... but it may be more 'expensive' to allocate > tehm > that way. > (though thay could be cached...) Are all of the API's in section 3.3 of the KSE white paper implemeted with SMP support (like thread_new(), thread_preempt()... etc ?? > 2/ When processes have a single state, (e.g. SLEEP, RUN etc.) it becomes > possible > for a process to simultaneously have threads in multiple states.. What > do we do > in all the places that current code assumes a single monolithic state, > and how do we report the stat of such a process in /proc or ps? > > - My guess is that a single state 'KSE' for a process should indicate > that no > finer > state information is available for that process until we add code to > 'ps' to > support it.. We can alter ps and friends to simply give up if they > see that > state.. > Has the Kenrnel Scheduler been changed to support the creation of KSE's or is that planned fir this next phase ?.. > 3/ similar for reporting wmesg information.. > > 4/ What does a process with 4 threads do if you send it a SIGTSTP and > it has a > number of threads (maybe on a different processor) presently suspended > in > syscalls > or, maybe running in syscalls. > > (other questions later when I think of them..) > > The next steps: > a) add allocators/destructors for threads, kses and ksegrps > b) use them, and add code to fork() (and friends) to use them > c) define the user interface so that uerland code can start to be planned. > (I may just do that first.) > d) add the syscalls to switch modes etc. > e) make a single test syscall that exercises some of this...(no locking.. What sort of mechanism has been used todate to test the functionality that has been added to the kernel code in the 'Current' branch so far?? I am just coming up to speed on some of this and have been waiding through the way the 4.x kernel functions now and how it is envisioned to function under 5.0.... > just > simple) > > > > julian > > > > > -- > +------------------------------------+ ______ _ __ > | __--_|\ Julian Elischer | \ U \/ / hard at work > in > | / \ julian@elischer.org +------>x USA \ a very strange > | ( OZ ) \___ ___ | country ! > +- X_.---._/ presently in San Francisco \_/ \\ > v > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-arch" in the body of the message > __________________________________________________ FREE voicemail, email, and fax...all in one place. Sign Up Now! http://www.onebox.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Mon Oct 1 21:32:18 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from nas.dgap.mipt.ru (nas.dgap.mipt.ru [194.85.81.203]) by hub.freebsd.org (Postfix) with ESMTP id 6FE7937B40C for ; Mon, 1 Oct 2001 21:32:15 -0700 (PDT) Received: from localhost (andrew@localhost) by nas.dgap.mipt.ru (8.11.3/8.11.3) with ESMTP id f924WDb33388 for ; Tue, 2 Oct 2001 08:32:13 +0400 (MSD) (envelope-from andrew@nas.dgap.mipt.ru) Date: Tue, 2 Oct 2001 08:32:12 +0400 (MSD) From: "Andrew L. Neporada" To: freebsd-hackers@freebsd.org Subject: current strstr(3) implementation is slow Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG If the length of substring is M and the length of string is N, then current algorithm takes O(N*M) operations. It is possible to perform search faster -- O(N+M) operations only. I'll send patches if you are interested. Andrey. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Mon Oct 1 21:41:56 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from squall.waterspout.com (squall.waterspout.com [208.13.56.12]) by hub.freebsd.org (Postfix) with ESMTP id 9285F37B40A for ; Mon, 1 Oct 2001 21:41:53 -0700 (PDT) Received: by squall.waterspout.com (Postfix, from userid 1050) id 051DE9B19; Mon, 1 Oct 2001 23:41:20 -0500 (EST) Date: Mon, 1 Oct 2001 23:41:19 -0500 From: Will Andrews To: "Andrew L. Neporada" Cc: freebsd-hackers@freebsd.org Subject: Re: current strstr(3) implementation is slow Message-ID: <20011001234119.D24038@squall.waterspout.com> Reply-To: Will Andrews References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.3.22.1i X-Operating-System: FreeBSD 4.3-STABLE i386 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Tue, Oct 02, 2001 at 08:32:12AM +0400, Andrew L. Neporada wrote: > If the length of substring is M and the length of string is N, then > current algorithm takes O(N*M) operations. > It is possible to perform search faster -- O(N+M) operations only. Please send-pr them. -- wca To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Mon Oct 1 22:44:30 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from ajax.cnchost.com (ajax.cnchost.com [207.155.248.31]) by hub.freebsd.org (Postfix) with ESMTP id 0D93E37B411 for ; Mon, 1 Oct 2001 22:44:29 -0700 (PDT) Received: from bitblocks.com (adsl-209-204-185-216.sonic.net [209.204.185.216]) by ajax.cnchost.com id BAA28358; Tue, 2 Oct 2001 01:44:24 -0400 (EDT) [ConcentricHost SMTP Relay 1.14] Message-ID: <200110020544.BAA28358@ajax.cnchost.com> To: "Andrew L. Neporada" Cc: freebsd-hackers@freebsd.org Subject: Re: current strstr(3) implementation is slow In-reply-to: Your message of "Tue, 02 Oct 2001 08:32:12 +0400." Date: Mon, 01 Oct 2001 22:44:24 -0700 From: Bakul Shah Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG > If the length of substring is M and the length of string is N, then > current algorithm takes O(N*M) operations. > It is possible to perform search faster -- O(N+M) operations only. Is this a known algorithm? If so which one? Note that http://www-igm.univ-mlv.fr/~lecroq/string is a pretty good reference on string matching. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Mon Oct 1 23: 5:44 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from nas.dgap.mipt.ru (nas.dgap.mipt.ru [194.85.81.203]) by hub.freebsd.org (Postfix) with ESMTP id F423237B408 for ; Mon, 1 Oct 2001 23:05:40 -0700 (PDT) Received: from localhost (andrew@localhost) by nas.dgap.mipt.ru (8.11.3/8.11.3) with ESMTP id f9265YN33835; Tue, 2 Oct 2001 10:05:34 +0400 (MSD) (envelope-from andrew@nas.dgap.mipt.ru) Date: Tue, 2 Oct 2001 10:05:33 +0400 (MSD) From: "Andrew L. Neporada" To: Bakul Shah Cc: freebsd-hackers@freebsd.org Subject: Re: current strstr(3) implementation is slow In-Reply-To: <200110020544.BAA28358@ajax.cnchost.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Mon, 1 Oct 2001, Bakul Shah wrote: > > If the length of substring is M and the length of string is N, then > > current algorithm takes O(N*M) operations. > > It is possible to perform search faster -- O(N+M) operations only. > > Is this a known algorithm? If so which one? Note that > http://www-igm.univ-mlv.fr/~lecroq/string > is a pretty good reference on string matching. > Yes, this is known algorithm from Cormen, Leiserson, Rivest "Introduction to Algorithms" book (AKA CLR) by MIT Press, more precisely "Knuth, Morris and Pratt algorithm". Andrey. P.S. Very impressive URL! Thank you. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Tue Oct 2 0:13: 4 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from bubo.vslib.cz (bubo.vslib.cz [147.230.16.1]) by hub.freebsd.org (Postfix) with ESMTP id 4E95637B409 for ; Tue, 2 Oct 2001 00:13:02 -0700 (PDT) Received: from A410A (a410a.kolej.vslib.cz [147.230.152.17]) by bubo.vslib.cz (Postfix) with SMTP id 585B780BC for ; Tue, 2 Oct 2001 09:13:01 +0200 (CEST) Message-ID: <000c01c14b11$f07c74e0$1198e693@kolej.vslib.cz> From: "Martin Vana" To: Subject: reading files from win Date: Tue, 2 Oct 2001 09:14:56 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-2" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG hi, is there any utility that can read a bsd FS from win/dos? thank you To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Tue Oct 2 3:21: 5 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from ringworld.nanolink.com (straylight.ringlet.net [217.75.134.254]) by hub.freebsd.org (Postfix) with SMTP id 631B037B407 for ; Tue, 2 Oct 2001 03:20:55 -0700 (PDT) Received: (qmail 10234 invoked by uid 1000); 2 Oct 2001 10:09:42 -0000 Date: Tue, 2 Oct 2001 13:09:42 +0300 From: Peter Pentchev To: David Taylor Cc: Alfred Perlstein , freebsd-hackers@FreeBSD.org Subject: Re: Doubt of system(3) Message-ID: <20011002130942.C704@ringworld.oblivion.bg> Mail-Followup-To: David Taylor , Alfred Perlstein , freebsd-hackers@FreeBSD.org References: <200109291527.f8TFRrU76727.toshi@jp.FreeBSD.org> <20010929153433.U59854@elvis.mu.org> <20010929214338.A57903@gattaca.yadt.co.uk> <20010929221658.B57903@gattaca.yadt.co.uk> <20010929170332.Y59854@elvis.mu.org> <20010929232839.A91153@gattaca.yadt.co.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20010929232839.A91153@gattaca.yadt.co.uk>; from davidt@yadt.co.uk on Sat, Sep 29, 2001 at 11:28:39PM +0100 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Sat, Sep 29, 2001 at 11:28:39PM +0100, David Taylor wrote: [snip] > IMO, the below patch is probably the best solution. Yep, it also fixes the fact that the return value from wait4() needs to be preserved, at least for the return statement of __system(). G'luck, Peter -- "yields falsehood, when appended to its quotation." yields falsehood, when appended to its quotation. > > cvs diff: Diffing . > > Index: system.c > > =================================================================== > > RCS file: /home/ncvs/src/lib/libc/stdlib/system.c,v > > retrieving revision 1.7 > > diff -u -r1.7 system.c > > --- system.c 2001/01/24 13:00:59 1.7 > > +++ system.c 2001/09/29 21:55:41 > > @@ -53,7 +53,7 @@ > > __system(command) > > const char *command; > > { > > - pid_t pid; > > + pid_t pid, savedpid; > > int pstat; > > struct sigaction ign, intact, quitact; > > sigset_t newsigblock, oldsigblock; > > @@ -86,8 +86,9 @@ > > execl(_PATH_BSHELL, "sh", "-c", command, (char *)NULL); > > _exit(127); > > default: /* parent */ > > + savedpid = pid; > > do { > > - pid = _wait4(pid, &pstat, 0, (struct rusage *)0); > > + pid = _wait4(savedpid, &pstat, 0, (struct rusage *)0); > > } while (pid == -1 && errno == EINTR); > > break; > > } > > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Tue Oct 2 5:15:15 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from newsguy.com (smtp.newsguy.com [209.155.56.71]) by hub.freebsd.org (Postfix) with ESMTP id A129937B403 for ; Tue, 2 Oct 2001 05:15:05 -0700 (PDT) Received: from newsguy.com (ppp232-bsace7002.telebrasilia.net.br [200.181.81.232]) by newsguy.com (8.9.1a/8.9.1) with ESMTP id FAA91468; Tue, 2 Oct 2001 05:14:01 -0700 (PDT) Message-ID: <3BB9B0A3.2C5F3ACC@newsguy.com> Date: Tue, 02 Oct 2001 09:18:43 -0300 From: "Daniel C. Sobral" X-Mailer: Mozilla 4.77 [en] (Win98; U) X-Accept-Language: en,pt-BR,pt,en-GB,en-US,ja MIME-Version: 1.0 To: Stijn Hoop Cc: "Eugene L. Vorokov" , freebsd-hackers@freebsd.org Subject: Re: how to make 'for' understand two words as a single argument References: <200110011039.f91AdOD88292@bugz.infotecs.ru> <3BB855BB.D10C5030@newsguy.com> <20011001135635.A39309@pcwin002.win.tue.nl> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Stijn Hoop wrote: > > > Any way using `` won't work. for i in a "b c" d works, for instance, but > > there is not way that I know of that you can control the output this way > > using ``. > > Yes there is: set IFS to only contain a newline beforehand. That's my local > hack, your way is probably better :) But if you do that, you'll get a single argument back, instead of a number of arguments, some of which have space in the middle, or not? -- Daniel C. Sobral (8-DCS) dcs@newsguy.com dcs@freebsd.org capo@the.secret.bsdconspiracy.net wow regex humor... I'm a geek To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Tue Oct 2 6:15:44 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from ringworld.nanolink.com (straylight.ringlet.net [217.75.134.254]) by hub.freebsd.org (Postfix) with SMTP id 3782937B40C for ; Tue, 2 Oct 2001 06:15:34 -0700 (PDT) Received: (qmail 11689 invoked by uid 1000); 2 Oct 2001 13:04:14 -0000 Date: Tue, 2 Oct 2001 16:04:14 +0300 From: Peter Pentchev To: Greg Lehey Cc: Julian Elischer , Gersh , Bernd Walter , Anjali Kulkarni , freebsd-hackers@FreeBSD.ORG Subject: Re: setjmp/longjmp Message-ID: <20011002160414.B10919@ringworld.oblivion.bg> Mail-Followup-To: Greg Lehey , Julian Elischer , Gersh , Bernd Walter , Anjali Kulkarni , freebsd-hackers@FreeBSD.ORG References: <20011001105624.C31215@wantadilla.lemis.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20011001105624.C31215@wantadilla.lemis.com>; from grog@FreeBSD.org on Mon, Oct 01, 2001 at 10:56:24AM +0930 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Mon, Oct 01, 2001 at 10:56:24AM +0930, Greg Lehey wrote: > [Format recovered--see http://www.lemis.com/email/email-format.html] > > On Friday, 28 September 2001 at 10:12:14 -0700, Julian Elischer wrote: > > On Fri, 28 Sep 2001, Gersh wrote: > >> On Fri, 28 Sep 2001, Bernd Walter wrote: > >>> On Fri, Sep 28, 2001 at 07:03:51PM +0530, Anjali Kulkarni wrote: > >>>> Does anyone know whether it is advisable or not to use > >>>> setjmp/longjmp within kernel code? I could not see any > >>>> setjmp/longjmp in kernel source code. Is there a good reason for > >>>> this or can it be used? > >>> > >>> You need to look again, it's used in several places in the kernel. > >> > >> Look at sys/i386/i386/db_interface.c > > > > Yeah but it would probably be a pretty bad idea to use it without > > very careful thought. Especialy with the kernel becoming > > pre-emptable in the future.. > > Can you think of a scenario where it wouldn't work? Preemption > doesn't tear stacks apart, right? How about a case of a longjmp() back from under an acquired lock/mutex? Like function A sets up a jump buffer, calls function B, B acquires a lock, B calls C, C longjmp()'s back to A; what happens to the lock? It would work if A were aware of B's lock and the possibility of a code path that would end up with it still being held; I presume that this is what Julian meant by 'very careful thought'. G'luck, Peter -- Do you think anybody has ever had *precisely this thought* before? To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Tue Oct 2 7:22:16 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from bogslab.ucdavis.edu (bogslab.ucdavis.edu [169.237.68.34]) by hub.freebsd.org (Postfix) with ESMTP id 4C58437B407 for ; Tue, 2 Oct 2001 07:22:14 -0700 (PDT) Received: from thistle.bogs.org (thistle.bogs.org [198.137.203.61]) by bogslab.ucdavis.edu (8.9.3/8.9.3) with ESMTP id HAA92465 for ; Tue, 2 Oct 2001 07:22:07 -0700 (PDT) (envelope-from greg@bogslab.ucdavis.edu) Received: from thistle.bogs.org (localhost [127.0.0.1]) by thistle.bogs.org (8.11.3/8.11.3) with ESMTP id f92EJbS06989 for ; Tue, 2 Oct 2001 07:19:38 -0700 (PDT) (envelope-from greg@thistle.bogs.org) Message-Id: <200110021419.f92EJbS06989@thistle.bogs.org> To: hackers@FreeBSD.ORG X-To: "Daniel C. Sobral" X-Sender: owner-freebsd-hackers@FreeBSD.ORG Subject: ALT- (Was: how to make 'for' understand two words as a single argumen) In-reply-to: Your message of "Tue, 02 Oct 2001 09:18:43 -0300." <3BB9B0A3.2C5F3ACC@newsguy.com> Reply-To: gkshenaut@ucdavis.edu Date: Tue, 02 Oct 2001 07:19:37 -0700 From: Greg Shenaut Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG In message <3BB9B0A3.2C5F3ACC@newsguy.com>, "Daniel C. Sobral" cleopede: >Stijn Hoop wrote: >> >> > Any way using `` won't work. for i in a "b c" d works, for instance, but >> > there is not way that I know of that you can control the output this way >> > using ``. >> >> Yes there is: set IFS to only contain a newline beforehand. That's my local >> hack, your way is probably better :) > >But if you do that, you'll get a single argument back, instead of a >number of arguments, some of which have space in the middle, or not? Is there any reason why the "unbreakable space" (0xa0) shouldn't be the only kind of space character used/allowed in filenames? Greg Shenaut To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Tue Oct 2 7:22:42 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from mail.webmonster.de (datasink.webmonster.de [194.162.162.209]) by hub.freebsd.org (Postfix) with SMTP id 79EE937B406 for ; Tue, 2 Oct 2001 07:22:36 -0700 (PDT) Received: (qmail 13998 invoked by uid 1000); 2 Oct 2001 14:22:56 -0000 Date: Tue, 2 Oct 2001 16:22:56 +0200 From: "Karsten W. Rohrbach" To: "Daniel C. Sobral" Cc: Stijn Hoop , "Eugene L. Vorokov" , freebsd-hackers@freebsd.org Subject: Re: how to make 'for' understand two words as a single argument Message-ID: <20011002162256.E12706@mail.webmonster.de> Mail-Followup-To: "Karsten W. Rohrbach" , "Daniel C. Sobral" , Stijn Hoop , "Eugene L. Vorokov" , freebsd-hackers@freebsd.org References: <200110011039.f91AdOD88292@bugz.infotecs.ru> <3BB855BB.D10C5030@newsguy.com> <20011001135635.A39309@pcwin002.win.tue.nl> <3BB9B0A3.2C5F3ACC@newsguy.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-md5; protocol="application/pgp-signature"; boundary="brEuL7wsLY8+TuWz" Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <3BB9B0A3.2C5F3ACC@newsguy.com>; from dcs@newsguy.com on Tue, Oct 02, 2001 at 09:18:43AM -0300 X-Arbitrary-Number-Of-The-Day: 42 X-URL: http://www.webmonster.de/ X-Disclaimer: My opinions do not necessarily represent those of my employer X-Work-URL: http://www.ngenn.net/ X-Work-Address: nGENn GmbH, Schloss Kransberg, D-61250 Usingen-Kransberg, Germany X-Work-Phone: +49-6081-682-304 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG --brEuL7wsLY8+TuWz Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Daniel C. Sobral(dcs@newsguy.com)@2001.10.02 09:18:43 +0000: > Stijn Hoop wrote: > >=20 > > > Any way using `` won't work. for i in a "b c" d works, for instance, = but > > > there is not way that I know of that you can control the output this = way > > > using ``. > >=20 > > Yes there is: set IFS to only contain a newline beforehand. That's my l= ocal > > hack, your way is probably better :) >=20 > But if you do that, you'll get a single argument back, instead of a > number of arguments, some of which have space in the middle, or not? you should save IFS somewhere, anyway. you might do [...] OLDIFS=3D"${IFS}" IFS=3D' ' for i in "`command`"; do IFS=3D"${OLDIFS}" echo "${i}" | read one two othercommand ${one} more arguments -paramaters ${two} IFS=3D' ' done [...] in bournish shells. i am a zsh user, so perhaps this won't work in /bin/sh... arguments should be parsed as expanded text, so it should not really matter if you use them as subsequent arguments. the technique with echo'ing the value through read splits it into the two variables. does this make sense? /k --=20 > MCSE: Management Can't Send E-mail KR433/KR11-RIPE -- WebMonster Community Founder -- nGENn GmbH Senior Techie http://www.webmonster.de/ -- ftp://ftp.webmonster.de/ -- http://www.ngenn.n= et/ karsten&rohrbach.de -- alpha&ngenn.net -- alpha&scene.org -- catch@spam.de GnuPG 0x2964BF46 2001-03-15 42F9 9FFF 50D4 2F38 DBEE DF22 3340 4F4E 2964 B= F46 Please do not remove my address from To: and Cc: fields in mailing lists. 1= 0x --brEuL7wsLY8+TuWz Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (FreeBSD) Comment: For info see http://www.gnupg.org iD8DBQE7uc3AM0BPTilkv0YRAlX5AJ9Z3cZRaxjOHSDqhe9XSU//dvLsagCaAn+m krnlb2QSjkF7+tVts4q4i3A= =Ug5h -----END PGP SIGNATURE----- --brEuL7wsLY8+TuWz-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Tue Oct 2 8:48:27 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from iguana.aciri.org (iguana.aciri.org [192.150.187.36]) by hub.freebsd.org (Postfix) with ESMTP id 095ED37B403; Tue, 2 Oct 2001 08:48:22 -0700 (PDT) Received: (from rizzo@localhost) by iguana.aciri.org (8.11.3/8.11.1) id f92FjXs25805; Tue, 2 Oct 2001 08:45:33 -0700 (PDT) (envelope-from rizzo) From: Luigi Rizzo Message-Id: <200110021545.f92FjXs25805@iguana.aciri.org> Subject: compiling kernels from readonly source trees ? To: hackers@freebsd.org Date: Tue, 2 Oct 2001 08:45:33 -0700 (PDT) X-Mailer: ELM [version 2.4ME+ PL43 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG [Bcc to -small as someone there might have had similar problems] Hi, I was trying to modify the picobsd build scripts so that the source tree is entirely readonly. For the most part of it i think i managed, the only missing part seems to be compilation of new kernels. config supports the "-d" command to set the destination directory, but it appears that it insists on the config file being in ${SYS}/${ARCH}/conf/ as it derives other paths from the current directory, such as ... if (realpath("../..", srcdir) == NULL) ... (void) snprintf(fname, sizeof(fname), "../../conf/options"); and maybe more places like this. Am I wrong ? And if not, is there any plan to make config handle config files in other places than ${SYS}/${ARCH}/conf ? cheers luigi ----------------------------------+----------------------------------------- Luigi RIZZO, luigi@iet.unipi.it . ACIRI/ICSI (on leave from Univ. di Pisa) http://www.iet.unipi.it/~luigi/ . 1947 Center St, Berkeley CA 94704 Phone: (510) 666 2927 ----------------------------------+----------------------------------------- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Tue Oct 2 8:59:57 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from galileo.poli.hu (galileo.poli.hu [193.224.190.1]) by hub.freebsd.org (Postfix) with ESMTP id BA4CE37B40A for ; Tue, 2 Oct 2001 08:59:53 -0700 (PDT) Received: from faber.poli.hu (mail@faber.poli.hu [193.224.190.2]) by galileo.poli.hu (8.11.3/8.11.3) with ESMTP id f92FxoA25100 for ; Tue, 2 Oct 2001 17:59:50 +0200 (CEST) (envelope-from mauzi@faber.poli.hu) Received: from mauzi (helo=localhost) by faber.poli.hu with local-esmtp (Exim 3.22 #1 (Debian)) id 15oRxU-0006fS-00 for ; Tue, 02 Oct 2001 17:59:48 +0200 Date: Tue, 2 Oct 2001 17:59:48 +0200 (CEST) From: Egervary Gergely To: Subject: newbie question: filesystem i/o Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG hi hackers, I'm quite new to FreeBSD but not in UN*X, please let me ask a question: I wonder that the filesystem performance under FreeBSD is so great. I'm doing disk-to-disk file copies, like ``dd if=file1 of=file2 bs=64k'' and the performance is much better than on other unices. Other systems use 16k or 64k (or whatever MAXBSIZE is set to) chunks for sequential i/o, and the disk seeks like an evil. On FreeBSD, the disk seeks _much_ less. probably FreeBSD is re-blocking the (contigous?) chunks, and does i/o with huge blocks like several megabytes? How is it done technically? Is it the filesystem, or the VM? could someone enlighten me please? :) cheers, -- mauzi To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Tue Oct 2 9:27:15 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from elvis.mu.org (elvis.mu.org [216.33.66.196]) by hub.freebsd.org (Postfix) with ESMTP id 237AC37B401 for ; Tue, 2 Oct 2001 09:27:13 -0700 (PDT) Received: by elvis.mu.org (Postfix, from userid 1192) id D7BB981D01; Tue, 2 Oct 2001 11:27:07 -0500 (CDT) Date: Tue, 2 Oct 2001 11:27:07 -0500 From: Alfred Perlstein To: Peter Pentchev Cc: David Taylor , freebsd-hackers@FreeBSD.org Subject: Re: Doubt of system(3) Message-ID: <20011002112707.C59854@elvis.mu.org> References: <200109291527.f8TFRrU76727.toshi@jp.FreeBSD.org> <20010929153433.U59854@elvis.mu.org> <20010929214338.A57903@gattaca.yadt.co.uk> <20010929221658.B57903@gattaca.yadt.co.uk> <20010929170332.Y59854@elvis.mu.org> <20010929232839.A91153@gattaca.yadt.co.uk> <20011002130942.C704@ringworld.oblivion.bg> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20011002130942.C704@ringworld.oblivion.bg>; from roam@ringlet.net on Tue, Oct 02, 2001 at 01:09:42PM +0300 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG * Peter Pentchev [011002 05:21] wrote: > On Sat, Sep 29, 2001 at 11:28:39PM +0100, David Taylor wrote: > [snip] > > IMO, the below patch is probably the best solution. > > Yep, it also fixes the fact that the return value from wait4() needs > to be preserved, at least for the return statement of __system(). Aaaaaaaaaaah! Forgot about it, I'm going to upgrade my workstation now and commit it if it works, probably tonight. If someone else can test it earlier, by all means commit it. thanks, -Alfred To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Tue Oct 2 9:33:49 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from elvis.mu.org (elvis.mu.org [216.33.66.196]) by hub.freebsd.org (Postfix) with ESMTP id B52AE37B409 for ; Tue, 2 Oct 2001 09:33:46 -0700 (PDT) Received: by elvis.mu.org (Postfix, from userid 1192) id A7F6781D01; Tue, 2 Oct 2001 11:33:46 -0500 (CDT) Date: Tue, 2 Oct 2001 11:33:46 -0500 From: Alfred Perlstein To: Egervary Gergely Cc: freebsd-hackers@freebsd.org Subject: Re: newbie question: filesystem i/o Message-ID: <20011002113346.D59854@elvis.mu.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: ; from mauzi@faber.poli.hu on Tue, Oct 02, 2001 at 05:59:48PM +0200 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG * Egervary Gergely [011002 11:00] wrote: > hi hackers, > > I'm quite new to FreeBSD but not in UN*X, please let me ask a question: > > I wonder that the filesystem performance under FreeBSD is so great. I'm > doing disk-to-disk file copies, like ``dd if=file1 of=file2 bs=64k'' and > the performance is much better than on other unices. Other systems use > 16k or 64k (or whatever MAXBSIZE is set to) chunks for sequential i/o, and > the disk seeks like an evil. On FreeBSD, the disk seeks _much_ less. > > probably FreeBSD is re-blocking the (contigous?) chunks, and does i/o with > huge blocks like several megabytes? How is it done technically? Is it the > filesystem, or the VM? > > could someone enlighten me please? :) Hmm.. http://shop.barnesandnoble.com/booksearch/isbnInquiry.asp?isbn=0201549794 Also, you'll want to clarify what you mean by "most unicies", you can't compare apples and cold fusion, at least give us an orange, ok? :) -- -Alfred Perlstein [alfred@freebsd.org] 'Instead of asking why a piece of software is using "1970s technology," start asking why software is ignoring 30 years of accumulated wisdom.' To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Tue Oct 2 10: 5: 6 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from ns.yogotech.com (ns.yogotech.com [206.127.123.66]) by hub.freebsd.org (Postfix) with ESMTP id B988437B409 for ; Tue, 2 Oct 2001 10:05:01 -0700 (PDT) Received: from nomad.yogotech.com (nomad.yogotech.com [206.127.123.131]) by ns.yogotech.com (8.9.3/8.9.3) with ESMTP id LAA13569 for ; Tue, 2 Oct 2001 11:05:00 -0600 (MDT) (envelope-from nate@nomad.yogotech.com) Received: (from nate@localhost) by nomad.yogotech.com (8.8.8/8.8.8) id LAA21871; Tue, 2 Oct 2001 11:05:00 -0600 (MDT) (envelope-from nate) From: Nate Williams MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15289.62396.178582.398770@nomad.yogotech.com> Date: Tue, 2 Oct 2001 11:05:00 -0600 To: freebsd-hackers@FreeBSD.org Subject: dump/restore and DIRPREF X-Mailer: VM 6.95 under 21.1 (patch 12) "Channel Islands" XEmacs Lucid Reply-To: nate@yogotech.com (Nate Williams) Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG After Kris's recent report of 'massive speedups' using dirpref, I've been toying with the idea of backing up my box, and then restoring them. However, backup/restore are so much faster than doing a tar/untar. If I do a backup of my FS, wipe the disk, will the 'restore' cause the same (ineffecient) directory layout to appear on disk? I wouldn't think so since the directory layout is controlled by the kernel, but I do know that dump/restore are much lower-layer tools than tar, so they may possibly have layout information embedded in them. Is my assumption correct? Nate To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Tue Oct 2 10:10:55 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from odin.ac.hmc.edu (Odin.AC.HMC.Edu [134.173.32.75]) by hub.freebsd.org (Postfix) with ESMTP id 3CE7537B408 for ; Tue, 2 Oct 2001 10:10:49 -0700 (PDT) Received: (from brdavis@localhost) by odin.ac.hmc.edu (8.11.0/8.11.0) id f92HAb329369; Tue, 2 Oct 2001 10:10:37 -0700 Date: Tue, 2 Oct 2001 10:10:37 -0700 From: Brooks Davis To: Nate Williams Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: dump/restore and DIRPREF Message-ID: <20011002101037.A28551@Odin.AC.HMC.Edu> References: <15289.62396.178582.398770@nomad.yogotech.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-md5; protocol="application/pgp-signature"; boundary="nFreZHaLTZJo0R7j" Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <15289.62396.178582.398770@nomad.yogotech.com>; from nate@yogotech.com on Tue, Oct 02, 2001 at 11:05:00AM -0600 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG --nFreZHaLTZJo0R7j Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Oct 02, 2001 at 11:05:00AM -0600, Nate Williams wrote: > If I do a backup of my FS, wipe the disk, will the 'restore' cause the > same (ineffecient) directory layout to appear on disk? > > I wouldn't think so since the directory layout is controlled by the > kernel, but I do know that dump/restore are much lower-layer tools than > tar, so they may possibly have layout information embedded in them. >=20 > Is my assumption correct? No. Dump reads the raw disk directly, but restore doesn't. Dump needs to in order to find the actual location of holes in files, but recreating them can be done in userland by simply seeking over them so there's no need to write directly to the raw disk on restore. Assuming you can read the dumps and you don't care about the file permissions, you can restore as any user. -- Brooks --=20 Any statement of the form "X is the one, true Y" is FALSE. PGP fingerprint 655D 519C 26A7 82E7 2529 9BF0 5D8E 8BE9 F238 1AD4 --nFreZHaLTZJo0R7j Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE7ufUNXY6L6fI4GtQRAgM2AKCaqygl9dmmAxkWaSOebB2srhiy0wCffWoJ i+eGSzyv7Pl8svUwRBM522Q= =n5tP -----END PGP SIGNATURE----- --nFreZHaLTZJo0R7j-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Tue Oct 2 10:13: 7 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from critter.freebsd.dk (critter.freebsd.dk [212.242.86.163]) by hub.freebsd.org (Postfix) with ESMTP id 744AA37B401 for ; Tue, 2 Oct 2001 10:13:03 -0700 (PDT) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.11.6/8.11.6) with ESMTP id f92HCnC04961; Tue, 2 Oct 2001 19:12:49 +0200 (CEST) (envelope-from phk@critter.freebsd.dk) To: nate@yogotech.com (Nate Williams) Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: dump/restore and DIRPREF In-Reply-To: Your message of "Tue, 02 Oct 2001 11:05:00 MDT." <15289.62396.178582.398770@nomad.yogotech.com> Date: Tue, 02 Oct 2001 19:12:49 +0200 Message-ID: <4959.1002042769@critter.freebsd.dk> From: Poul-Henning Kamp Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG In message <15289.62396.178582.398770@nomad.yogotech.com>, Nate Williams writes : >After Kris's recent report of 'massive speedups' using dirpref, I've >been toying with the idea of backing up my box, and then restoring them. > >However, backup/restore are so much faster than doing a tar/untar. > >If I do a backup of my FS, wipe the disk, will the 'restore' cause the >same (ineffecient) directory layout to appear on disk? > >I wouldn't think so since the directory layout is controlled by the >kernel, but I do know that dump/restore are much lower-layer tools than >tar, so they may possibly have layout information embedded in them. > >Is my assumption correct? no. Dump reads the raw device and finds everything by hand. Restore (like tar!) just open/write/close/chown regular files. -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Tue Oct 2 10:17:10 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from ns.yogotech.com (ns.yogotech.com [206.127.123.66]) by hub.freebsd.org (Postfix) with ESMTP id C4E9C37B403 for ; Tue, 2 Oct 2001 10:17:06 -0700 (PDT) Received: from nomad.yogotech.com (nomad.yogotech.com [206.127.123.131]) by ns.yogotech.com (8.9.3/8.9.3) with ESMTP id LAA14085; Tue, 2 Oct 2001 11:17:05 -0600 (MDT) (envelope-from nate@nomad.yogotech.com) Received: (from nate@localhost) by nomad.yogotech.com (8.8.8/8.8.8) id LAA21975; Tue, 2 Oct 2001 11:17:04 -0600 (MDT) (envelope-from nate) From: Nate Williams MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15289.63120.478430.9876@nomad.yogotech.com> Date: Tue, 2 Oct 2001 11:17:04 -0600 To: Poul-Henning Kamp Cc: nate@yogotech.com (Nate Williams), freebsd-hackers@FreeBSD.ORG Subject: Re: dump/restore and DIRPREF In-Reply-To: <4959.1002042769@critter.freebsd.dk> References: <15289.62396.178582.398770@nomad.yogotech.com> <4959.1002042769@critter.freebsd.dk> X-Mailer: VM 6.95 under 21.1 (patch 12) "Channel Islands" XEmacs Lucid Reply-To: nate@yogotech.com (Nate Williams) Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG > >After Kris's recent report of 'massive speedups' using dirpref, I've > >been toying with the idea of backing up my box, and then restoring them. > > > >However, backup/restore are so much faster than doing a tar/untar. > > > >If I do a backup of my FS, wipe the disk, will the 'restore' cause the > >same (ineffecient) directory layout to appear on disk? > > > >I wouldn't think so since the directory layout is controlled by the > >kernel, but I do know that dump/restore are much lower-layer tools than > >tar, so they may possibly have layout information embedded in them. > > > >Is my assumption correct? > > no. Actually, yes, but I didn't word it very well above. > Dump reads the raw device and finds everything by hand. > > Restore (like tar!) just open/write/close/chown regular files. So my assumption *is* correct that it won't matter if I use dump/restore to do the job, and that the lower-layer effeciencies of dump don't effect the resulting layout done by restore. Great, thanks for the quick response! Nate To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Tue Oct 2 10:55:48 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from dayspring.firedrake.org (dayspring.firedrake.org [195.82.105.251]) by hub.freebsd.org (Postfix) with ESMTP id D5A3C37B405 for ; Tue, 2 Oct 2001 10:55:42 -0700 (PDT) Received: from float by dayspring.firedrake.org with local (Exim 3.22 #1 (Debian)) id 15oTlG-0000Ax-00; Tue, 02 Oct 2001 18:55:18 +0100 Date: Tue, 2 Oct 2001 18:55:18 +0100 To: gkshenaut@ucdavis.edu Cc: hackers@FreeBSD.ORG Subject: Re: ALT- (Was: how to make 'for' understand two words as a single argumen) Message-ID: <20011002185518.A335@firedrake.org> References: <200110021419.f92EJbS06989@thistle.bogs.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200110021419.f92EJbS06989@thistle.bogs.org> User-Agent: Mutt/1.3.18i From: void Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Tue, Oct 02, 2001 at 07:19:37AM -0700, Greg Shenaut wrote: > > Is there any reason why the "unbreakable space" (0xa0) shouldn't be > the only kind of space character used/allowed in filenames? Any character except for '/' is allowed in filenames, and I believe it's been that way since the dawn of time. -- Ben "An art scene of delight I created this to be ..." -- Sun Ra To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Tue Oct 2 10:57:40 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from earth.backplane.com (earth-nat-cw.backplane.com [208.161.114.67]) by hub.freebsd.org (Postfix) with ESMTP id 3B4C637B406 for ; Tue, 2 Oct 2001 10:57:39 -0700 (PDT) Received: (from dillon@localhost) by earth.backplane.com (8.11.6/8.11.2) id f92Hv6458868; Tue, 2 Oct 2001 10:57:06 -0700 (PDT) (envelope-from dillon) Date: Tue, 2 Oct 2001 10:57:06 -0700 (PDT) From: Matt Dillon Message-Id: <200110021757.f92Hv6458868@earth.backplane.com> To: Nate Williams Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: dump/restore and DIRPREF References: <15289.62396.178582.398770@nomad.yogotech.com> Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG I recommend using cpdup ( /usr/ports/sysutils/cpdup ), mainly because you can ^C it and restart it at any time so it's a lot easier to play around with your directory dup'ing. -Matt To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Tue Oct 2 11:44:24 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from bogslab.ucdavis.edu (bogslab.ucdavis.edu [169.237.68.34]) by hub.freebsd.org (Postfix) with ESMTP id 7686E37B406 for ; Tue, 2 Oct 2001 11:44:19 -0700 (PDT) Received: from thistle.bogs.org (thistle.bogs.org [198.137.203.61]) by bogslab.ucdavis.edu (8.9.3/8.9.3) with ESMTP id LAA93189 for ; Tue, 2 Oct 2001 11:44:05 -0700 (PDT) (envelope-from greg@bogslab.ucdavis.edu) Received: from thistle.bogs.org (localhost [127.0.0.1]) by thistle.bogs.org (8.11.3/8.11.3) with ESMTP id f92IfVS07537 for ; Tue, 2 Oct 2001 11:41:37 -0700 (PDT) (envelope-from greg@thistle.bogs.org) Message-Id: <200110021841.f92IfVS07537@thistle.bogs.org> To: hackers@FreeBSD.ORG X-To: void X-Sender: owner-freebsd-hackers@FreeBSD.ORG Subject: Re: ALT- (Was: how to make 'for' understand two words as a single argumen) In-reply-to: Your message of "Tue, 02 Oct 2001 18:55:18 BST." <20011002185518.A335@firedrake.org> Reply-To: gkshenaut@ucdavis.edu Date: Tue, 02 Oct 2001 11:41:31 -0700 From: Greg Shenaut Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG In message <20011002185518.A335@firedrake.org>, void cleopede: >On Tue, Oct 02, 2001 at 07:19:37AM -0700, Greg Shenaut wrote: >> >> Is there any reason why the "unbreakable space" (0xa0) shouldn't be >> the only kind of space character used/allowed in filenames? > >Any character except for '/' is allowed in filenames, and I believe it's >been that way since the dawn of time. Yes, but I mention it because if 0xa0 were used instead of space in filenames, then they wouldn't be split into several arguments and nothing special would need to be done in "for x in * ;" loops or elsewhere to handle them, but the names would still look the same to users. I just throw out the idea--as for where to enforce such a convention, I agree that the file-system definition may not be the best place, but it might be the *easiest* place (spaces could be silently mapped to 0xa0's). Greg Shenaut To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Tue Oct 2 12: 2:23 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from InterJet.elischer.org (c421509-a.pinol1.sfba.home.com [24.7.86.9]) by hub.freebsd.org (Postfix) with ESMTP id EAD1237B401; Tue, 2 Oct 2001 12:02:19 -0700 (PDT) Received: from localhost (localhost.elischer.org [127.0.0.1]) by InterJet.elischer.org (8.9.1a/8.9.1) with ESMTP id MAA92550; Tue, 2 Oct 2001 12:43:55 -0700 (PDT) Date: Tue, 2 Oct 2001 12:43:54 -0700 (PDT) From: Julian Elischer To: Peter Pentchev Cc: Greg Lehey , Gersh , Bernd Walter , Anjali Kulkarni , freebsd-hackers@FreeBSD.ORG Subject: Re: setjmp/longjmp In-Reply-To: <20011002160414.B10919@ringworld.oblivion.bg> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Tue, 2 Oct 2001, Peter Pentchev wrote: > On Mon, Oct 01, 2001 at 10:56:24AM +0930, Greg Lehey wrote: > > [Format recovered--see http://www.lemis.com/email/email-format.html] > > > > On Friday, 28 September 2001 at 10:12:14 -0700, Julian Elischer wrote: > > > On Fri, 28 Sep 2001, Gersh wrote: > > >> On Fri, 28 Sep 2001, Bernd Walter wrote: > > >>> On Fri, Sep 28, 2001 at 07:03:51PM +0530, Anjali Kulkarni wrote: > > >>>> Does anyone know whether it is advisable or not to use > > >>>> setjmp/longjmp within kernel code? I could not see any > > >>>> setjmp/longjmp in kernel source code. Is there a good reason for > > >>>> this or can it be used? > > >>> > > >>> You need to look again, it's used in several places in the kernel. > > >> > > >> Look at sys/i386/i386/db_interface.c > > > > > > Yeah but it would probably be a pretty bad idea to use it without > > > very careful thought. Especialy with the kernel becoming > > > pre-emptable in the future.. > > > > Can you think of a scenario where it wouldn't work? Preemption > > doesn't tear stacks apart, right? > > How about a case of a longjmp() back from under an acquired lock/mutex? > Like function A sets up a jump buffer, calls function B, B acquires > a lock, B calls C, C longjmp()'s back to A; what happens to the lock? > > It would work if A were aware of B's lock and the possibility of a code > path that would end up with it still being held; I presume that this is > what Julian meant by 'very careful thought'. pretty much... > > G'luck, > Peter > > -- > Do you think anybody has ever had *precisely this thought* before? > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Tue Oct 2 12:35:23 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from earth.backplane.com (earth-nat-cw.backplane.com [208.161.114.67]) by hub.freebsd.org (Postfix) with ESMTP id 26BEE37B406; Tue, 2 Oct 2001 12:35:11 -0700 (PDT) Received: (from dillon@localhost) by earth.backplane.com (8.11.6/8.11.2) id f92JZAm59707; Tue, 2 Oct 2001 12:35:10 -0700 (PDT) (envelope-from dillon) Date: Tue, 2 Oct 2001 12:35:10 -0700 (PDT) From: Matt Dillon Message-Id: <200110021935.f92JZAm59707@earth.backplane.com> To: Yevgeniy Aleynikov Cc: peter@FreeBSD.ORG, ache@FreeBSD.ORG, mckusick@mckusick.com, Ken Pizzini , Ian Dowse , hackers@FreeBSD.ORG Subject: Re: bleh. Re: ufs_rename panic References: <200110020506.f9256BJ55255@earth.backplane.com> <3BBA0699.29F589BE@infospace.com> Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Ok, I'm adding -hackers... another email thread got going in -committers. Here is a patch set for -stable. It isn't perfect but it does appear to solve the problem. The one case I don't handle right is if you have a hardlinked file and two renames in two different directories on the same file occur at the same time... that will (improperly) return an error code when, in fact, it's perfectly acceptable to do that. This patch appears to fix the utterly trivial crash reproduction that Yevgeniy was able to produce with a couple of simple race scripts running in the background. What I've done is add a SOFTLOCKLEAF capability to namei(). If set, and the file/directory exists, namei() will generate an extra VREF() on the vnode and set the VSOFTLOCK flag in vp->v_flag. If the vnode already has VSOFTLOCK set, namei() will return EINVAL. Then in rename() and rmdir() I set SOFTLOCKLEAF for the namei resolution and, of course, clean things up when everything is done. The ufs_rename() and ufs_rmdir() code no longer have to do the IN_RENAME hack at all, because it's now handled. This patch set does not yet include fixes to unionfs or the nfs server and is for informational purposes only. Comments? -Matt Index: kern/vfs_lookup.c =================================================================== RCS file: /home/ncvs/src/sys/kern/vfs_lookup.c,v retrieving revision 1.38.2.3 diff -u -r1.38.2.3 vfs_lookup.c --- kern/vfs_lookup.c 2001/08/31 19:36:49 1.38.2.3 +++ kern/vfs_lookup.c 2001/10/02 19:04:21 @@ -372,11 +372,20 @@ error = EISDIR; goto bad; } + if ((cnp->cn_flags & SOFTLOCKLEAF) && + (dp->v_flag & VSOFTLOCK)) { + error = EINVAL; + goto bad; + } if (wantparent) { ndp->ni_dvp = dp; VREF(dp); } ndp->ni_vp = dp; + if (cnp->cn_flags & SOFTLOCKLEAF) { + VREF(dp); + vsetsoftlock(dp); + } if (!(cnp->cn_flags & (LOCKPARENT | LOCKLEAF))) VOP_UNLOCK(dp, 0, p); /* XXX This should probably move to the top of function. */ @@ -565,13 +574,20 @@ error = EROFS; goto bad2; } + if ((cnp->cn_flags & SOFTLOCKLEAF) && (dp->v_flag & VSOFTLOCK)) { + error = EINVAL; + goto bad2; + } if (cnp->cn_flags & SAVESTART) { ndp->ni_startdir = ndp->ni_dvp; VREF(ndp->ni_startdir); } if (!wantparent) vrele(ndp->ni_dvp); - + if (cnp->cn_flags & SOFTLOCKLEAF) { + VREF(dp); + vsetsoftlock(dp); + } if ((cnp->cn_flags & LOCKLEAF) == 0) VOP_UNLOCK(dp, 0, p); return (0); @@ -654,6 +670,15 @@ error = ENOTDIR; goto bad; } + if ((cnp->cn_flags & SOFTLOCKLEAF) && + (dp->v_flag & VSOFTLOCK)) { + error = EINVAL; + goto bad; + } + if (cnp->cn_flags & SOFTLOCKLEAF) { + VREF(dp); + vsetsoftlock(dp); + } if (!(cnp->cn_flags & LOCKLEAF)) VOP_UNLOCK(dp, 0, p); *vpp = dp; @@ -707,6 +732,10 @@ error = EROFS; goto bad2; } + if ((cnp->cn_flags & SOFTLOCKLEAF) && (dp->v_flag & VSOFTLOCK)) { + error = EINVAL; + goto bad2; + } /* ASSERT(dvp == ndp->ni_startdir) */ if (cnp->cn_flags & SAVESTART) VREF(dvp); @@ -718,6 +747,10 @@ ((cnp->cn_flags & (NOOBJ|LOCKLEAF)) == LOCKLEAF)) vfs_object_create(dp, cnp->cn_proc, cnp->cn_cred); + if (cnp->cn_flags & SOFTLOCKLEAF) { + VREF(dp); + vsetsoftlock(dp); + } if ((cnp->cn_flags & LOCKLEAF) == 0) VOP_UNLOCK(dp, 0, p); return (0); Index: kern/vfs_subr.c =================================================================== RCS file: /home/ncvs/src/sys/kern/vfs_subr.c,v retrieving revision 1.249.2.11 diff -u -r1.249.2.11 vfs_subr.c --- kern/vfs_subr.c 2001/09/11 09:49:53 1.249.2.11 +++ kern/vfs_subr.c 2001/10/02 18:45:55 @@ -2927,6 +2961,12 @@ struct nameidata *ndp; const uint flags; { + if (!(flags & NDF_NO_FREE_SOFTLOCKLEAF) && + (ndp->ni_cnd.cn_flags & SOFTLOCKLEAF) && + ndp->ni_vp) { + vclearsoftlock(ndp->ni_vp); + vrele(ndp->ni_vp); + } if (!(flags & NDF_NO_FREE_PNBUF) && (ndp->ni_cnd.cn_flags & HASBUF)) { zfree(namei_zone, ndp->ni_cnd.cn_pnbuf); @@ -2955,3 +2995,24 @@ ndp->ni_startdir = NULL; } } + +void +vsetsoftlock(struct vnode *vp) +{ + int s; + + s = splbio(); + vp->v_flag |= VSOFTLOCK; + splx(s); +} + +void +vclearsoftlock(struct vnode *vp) +{ + int s; + + s = splbio(); + vp->v_flag &= ~VSOFTLOCK; + splx(s); +} + Index: kern/vfs_syscalls.c =================================================================== RCS file: /home/ncvs/src/sys/kern/vfs_syscalls.c,v retrieving revision 1.151.2.9 diff -u -r1.151.2.9 vfs_syscalls.c --- kern/vfs_syscalls.c 2001/08/12 10:48:00 1.151.2.9 +++ kern/vfs_syscalls.c 2001/10/02 19:18:06 @@ -2633,8 +2633,8 @@ int error; bwillwrite(); - NDINIT(&fromnd, DELETE, WANTPARENT | SAVESTART, UIO_USERSPACE, - SCARG(uap, from), p); + NDINIT(&fromnd, DELETE, WANTPARENT | SAVESTART | SOFTLOCKLEAF, + UIO_USERSPACE, SCARG(uap, from), p); if ((error = namei(&fromnd)) != 0) return (error); fvp = fromnd.ni_vp; @@ -2646,7 +2646,7 @@ /* Translate error code for rename("dir1", "dir2/."). */ if (error == EISDIR && fvp->v_type == VDIR) error = EINVAL; - NDFREE(&fromnd, NDF_ONLY_PNBUF); + NDFREE(&fromnd, NDF_ONLY_PNBUF & NDF_ONLY_SOFTLOCKLEAF); vrele(fromnd.ni_dvp); vrele(fvp); goto out1; @@ -2683,12 +2683,14 @@ if (tvp) { VOP_LEASE(tvp, p, p->p_ucred, LEASE_WRITE); } + fromnd.ni_cnd.cn_flags &= ~SOFTLOCKLEAF; /* XXX hack */ error = VOP_RENAME(fromnd.ni_dvp, fromnd.ni_vp, &fromnd.ni_cnd, tond.ni_dvp, tond.ni_vp, &tond.ni_cnd); - NDFREE(&fromnd, NDF_ONLY_PNBUF); + fromnd.ni_cnd.cn_flags |= SOFTLOCKLEAF; + NDFREE(&fromnd, NDF_ONLY_PNBUF & NDF_ONLY_SOFTLOCKLEAF); NDFREE(&tond, NDF_ONLY_PNBUF); } else { - NDFREE(&fromnd, NDF_ONLY_PNBUF); + NDFREE(&fromnd, NDF_ONLY_PNBUF & NDF_ONLY_SOFTLOCKLEAF); NDFREE(&tond, NDF_ONLY_PNBUF); if (tdvp == tvp) vrele(tdvp); @@ -2785,8 +2787,8 @@ struct nameidata nd; bwillwrite(); - NDINIT(&nd, DELETE, LOCKPARENT | LOCKLEAF, UIO_USERSPACE, - SCARG(uap, path), p); + NDINIT(&nd, DELETE, LOCKPARENT | LOCKLEAF | SOFTLOCKLEAF, + UIO_USERSPACE, SCARG(uap, path), p); if ((error = namei(&nd)) != 0) return (error); vp = nd.ni_vp; @@ -2812,7 +2814,7 @@ error = VOP_RMDIR(nd.ni_dvp, nd.ni_vp, &nd.ni_cnd); } out: - NDFREE(&nd, NDF_ONLY_PNBUF); + NDFREE(&nd, NDF_ONLY_PNBUF & NDF_ONLY_SOFTLOCKLEAF); if (nd.ni_dvp == vp) vrele(nd.ni_dvp); else Index: sys/namei.h =================================================================== RCS file: /home/ncvs/src/sys/sys/namei.h,v retrieving revision 1.29.2.2 diff -u -r1.29.2.2 namei.h --- sys/namei.h 2001/09/30 21:12:54 1.29.2.2 +++ sys/namei.h 2001/10/02 18:43:34 @@ -114,7 +114,7 @@ #define FOLLOW 0x0040 /* follow symbolic links */ #define NOOBJ 0x0080 /* don't create object */ #define NOFOLLOW 0x0000 /* do not follow symbolic links (pseudo) */ -#define MODMASK 0x00fc /* mask of operational modifiers */ +#define MODMASK (0x00fc|SOFTLOCKLEAF) /* * Namei parameter descriptors. * @@ -143,7 +143,7 @@ #define WILLBEDIR 0x080000 /* new files will be dirs; allow trailing / */ #define ISUNICODE 0x100000 /* current component name is unicode*/ #define PDIRUNLOCK 0x200000 /* file system lookup() unlocked parent dir */ -#define PARAMASK 0x1fff00 /* mask of parameter descriptors */ +#define SOFTLOCKLEAF 0x400000 /* set VSOFTLOCK in vnode */ /* * Initialization of an nameidata structure. */ @@ -180,7 +180,9 @@ #define NDF_NO_VP_PUT 0x0000000c #define NDF_NO_STARTDIR_RELE 0x00000010 #define NDF_NO_FREE_PNBUF 0x00000020 +#define NDF_NO_FREE_SOFTLOCKLEAF 0x00000040 #define NDF_ONLY_PNBUF (~NDF_NO_FREE_PNBUF) +#define NDF_ONLY_SOFTLOCKLEAF (~NDF_NO_FREE_SOFTLOCKLEAF) void NDFREE __P((struct nameidata *, const uint)); Index: sys/vnode.h =================================================================== RCS file: /home/ncvs/src/sys/sys/vnode.h,v retrieving revision 1.111.2.12 diff -u -r1.111.2.12 vnode.h --- sys/vnode.h 2001/09/22 09:21:48 1.111.2.12 +++ sys/vnode.h 2001/10/02 18:46:10 @@ -169,6 +169,7 @@ #define VTBFREE 0x100000 /* This vnode is on the to-be-freelist */ #define VONWORKLST 0x200000 /* On syncer work-list */ #define VMOUNT 0x400000 /* Mount in progress */ +#define VSOFTLOCK 0x800000 /* Soft lock on vnode (directory entry) */ /* * Vnode attributes. A field value of VNOVAL represents a field whose value @@ -630,6 +632,8 @@ void vrele __P((struct vnode *vp)); void vref __P((struct vnode *vp)); void vbusy __P((struct vnode *vp)); +void vsetsoftlock __P((struct vnode *vp)); +void vclearsoftlock __P((struct vnode *vp)); extern vop_t **default_vnodeop_p; extern vop_t **spec_vnodeop_p; Index: ufs/ufs/ufs_vnops.c =================================================================== RCS file: /home/ncvs/src/sys/ufs/ufs/ufs_vnops.c,v retrieving revision 1.131.2.4 diff -u -r1.131.2.4 ufs_vnops.c --- ufs/ufs/ufs_vnops.c 2001/08/28 17:28:49 1.131.2.4 +++ ufs/ufs/ufs_vnops.c 2001/10/02 19:16:40 @@ -997,13 +997,11 @@ * Avoid ".", "..", and aliases of "." for obvious reasons. */ if ((fcnp->cn_namelen == 1 && fcnp->cn_nameptr[0] == '.') || - dp == ip || (fcnp->cn_flags | tcnp->cn_flags) & ISDOTDOT || - (ip->i_flag & IN_RENAME)) { + dp == ip || (fcnp->cn_flags | tcnp->cn_flags) & ISDOTDOT) { VOP_UNLOCK(fvp, 0, p); error = EINVAL; goto abortit; } - ip->i_flag |= IN_RENAME; oldparent = dp->i_number; doingdirectory = 1; } @@ -1224,13 +1222,12 @@ return (0); } /* - * Ensure that the directory entry still exists and has not - * changed while the new name has been entered. If the source is - * a file then the entry may have been unlinked or renamed. In - * either case there is no further work to be done. If the source - * is a directory then it cannot have been rmdir'ed; the IN_RENAME - * flag ensures that it cannot be moved by another rename or removed - * by a rmdir. + * The source has been VSOFTLOCKd by the caller, preventing rename + * or rmdir, but not prevent unlink. At the moment we allow the unlink + * race and so do not panic if relookup fails or the inodes do not + * match, because files can be hardlinked and our flag is on the vnode + * rather then the directory entry in the namei cache. But source + * directories must still exist. */ if (xp != ip) { if (doingdirectory) @@ -1248,7 +1245,6 @@ cache_purge(fdvp); } error = ufs_dirremove(fdvp, xp, fcnp->cn_flags, 0); - xp->i_flag &= ~IN_RENAME; } VN_KNOTE(fvp, NOTE_RENAME); if (dp) @@ -1263,13 +1259,10 @@ vput(ITOV(xp)); vput(ITOV(dp)); out: - if (doingdirectory) - ip->i_flag &= ~IN_RENAME; if (vn_lock(fvp, LK_EXCLUSIVE, p) == 0) { ip->i_effnlink--; ip->i_nlink--; ip->i_flag |= IN_CHANGE; - ip->i_flag &= ~IN_RENAME; if (DOINGSOFTDEP(fvp)) softdep_change_linkcnt(ip); vput(fvp); @@ -1503,18 +1496,16 @@ dp = VTOI(dvp); /* - * Do not remove a directory that is in the process of being renamed. * Verify the directory is empty (and valid). Rmdir ".." will not be * valid since ".." will contain a reference to the current directory * and thus be non-empty. Do not allow the removal of mounted on * directories (this can happen when an NFS exported filesystem * tries to remove a locally mounted on directory). + * + * The syscall wrapper already protects us from attempting to remove + * a directory that is undergoing a rename. */ error = 0; - if (ip->i_flag & IN_RENAME) { - error = EINVAL; - goto out; - } if (ip->i_effnlink != 2 || !ufs_dirempty(ip, dp->i_number, cnp->cn_cred)) { error = ENOTEMPTY; To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Tue Oct 2 12:44:46 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from digitaldaemon.com (digitaldaemon.com [63.105.9.34]) by hub.freebsd.org (Postfix) with SMTP id 5455237B407 for ; Tue, 2 Oct 2001 12:44:32 -0700 (PDT) Received: (qmail 65391 invoked from network); 2 Oct 2001 19:43:20 -0000 Received: from 213-84-202-101.adsl.xs4all.nl (HELO jak.nl) (213.84.202.101) by jak.nl with SMTP; 2 Oct 2001 19:43:20 -0000 Message-ID: <3BBA196D.7060505@jak.nl> Date: Tue, 02 Oct 2001 21:45:49 +0200 From: Arjan Knepper Organization: JAK++ Software Development B.V. User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:0.9.2) Gecko/20010726 Netscape6/6.1 X-Accept-Language: en-us MIME-Version: 1.0 To: hackers FreeBSD Subject: Cyclades Cyclom YeP (PCI) driver problems on a DELL PowerEdge 2550 (DUAL) Content-Type: multipart/mixed; boundary="------------080101000409050404080901" Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG This is a multi-part message in MIME format. --------------080101000409050404080901 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Hello, There are problems with the Cyclades Cyclom YeP driver. (see PR i386/30965). I've put printf's in the driver code on several places to check where the point is of hard locking and its seems to be on line 136 in the /usr/src/sys/pci/cy_pci.c in my situation. ----------------------------------------------------------------------------- case PLX_9050: outw(ioport + CY_PLX_9050_ICS, inw(ioport + CY_PLX_9050_ICS) | CY_PLX_9050_ICS_IENABLE | CY_PLX_9050_ICS_LOCAL_IENABLE); ----------------------------------------------------------------------------- This particular piece of code is hard-locking a DUAL PENTIUM III 933 DELL PowerEdge 2550 with 2 YeP (PCI) boards with a SINGLE CPU kernel. (Doesn't even react on numlock key anymore) I really need some enligtment on this. Attached my kernel conf file and below the piece of code containg the lines. static void cy_attach(config_id, unit) pcici_t config_id; int unit; { vm_offset_t paddr; void *vaddr; u_int32_t ioport; int adapter; u_char plx_ver; ioport = (u_int32_t) pci_conf_read(config_id, CY_PCI_BASE_ADDR1) & ~0x3; paddr = pci_conf_read(config_id, CY_PCI_BASE_ADDR2) & ~0xf; #if 0 if (!pci_map_mem(config_id, CY_PCI_BASE_ADDR2, &vaddr, &paddr)) { printf("cy%d: couldn't map shared memory\n", unit); return; }; #endif vaddr = pmap_mapdev(paddr, 0x4000); adapter = cyattach_common(vaddr, 1); if (adapter < 0) { /* * No ports found. Release resources and punt. */ printf("cy%d: no ports found!\n", unit); goto fail; } /* * Allocate our interrupt. * XXX Using the ISA interrupt handler directly is a bit of a violation * since it doesn't actually take the same argument. For PCI, the * argument is a void * token, but for ISA it is a unit. Since * there is no overlap in PCI/ISA unit numbers for this driver, and * since the ISA driver must handle the interrupt anyway, we use * the unit number as the token even for PCI. */ if ( #ifdef CY_PCI_FASTINTR !pci_map_int_right(config_id, (pci_inthand_t *)cyintr, (void *)adapter, &tty_imask, INTR_EXCL | INTR_FAST) && #endif !pci_map_int_right(config_id, (pci_inthand_t *)cyintr, (void *)adapter, &tty_imask, 0)) { printf("cy%d: couldn't map interrupt\n", unit); goto fail; } /* * Enable the "local" interrupt input to generate a * PCI interrupt. */ plx_ver = *((u_char *)vaddr + PLX_VER) & 0x0f; switch (plx_ver) { case PLX_9050: outw(ioport + CY_PLX_9050_ICS, inw(ioport + CY_PLX_9050_ICS) | CY_PLX_9050_ICS_IENABLE | CY_PLX_9050_ICS_LOCAL_IENABLE); break; case PLX_9060: case PLX_9080: default: /* Old board, use PLX_9060 values. */ outw(ioport + CY_PLX_9060_ICS, inw(ioport + CY_PLX_9060_ICS) | CY_PLX_9060_ICS_IENABLE | CY_PLX_9060_ICS_LOCAL_IENABLE); break; } return; fail: /* XXX should release any allocated virtual memory */ return; } --------------080101000409050404080901 Content-Type: text/plain; name="SINGLE" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="SINGLE" # # Dell POWER-EDGE 2550 Server kernel config # # Take Care : sio1 removed # ppc removed # INET6 removed # cyclades cy0 cy1 and cy2 added # options CY_FAST_INTERUPT added # options SC_DISABLE_REBOOT added (REQUIRED!!) # # DO NOT FORGET TO MODIFY THE BIOS SETTINGS ACCORDINGLY !! # # TRY TO GIVE EACH Cyclades YeP board IT'S OWN IRQ !! # machine i386 cpu I686_CPU ident POWEREDGE-2550 maxusers 256 #makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols #options MATH_EMULATE #Support for x87 emulation options INET #InterNETworking #options INET6 #IPv6 communications protocols options FFS #Berkeley Fast Filesystem options FFS_ROOT #FFS usable as root device [keep this!] options SOFTUPDATES #Enable FFS soft updates support options MFS #Memory Filesystem options MD_ROOT #MD is a potential root device options NFS #Network Filesystem #options NFS_ROOT #NFS usable as root device, NFS required options MSDOSFS #MSDOS Filesystem options CD9660 #ISO 9660 Filesystem options CD9660_ROOT #CD-ROM usable as root, CD9660 required options PROCFS #Process filesystem options COMPAT_43 #Compatible with BSD 4.3 [KEEP THIS!] options SCSI_DELAY=3000 #Delay (in ms) before probing SCSI options UCONSOLE #Allow users to grab the console options USERCONFIG #boot -c editor options VISUAL_USERCONFIG #visual boot -c editor #options KTRACE #ktrace(1) support options SYSVSHM #SYSV-style shared memory options SYSVMSG #SYSV-style message queues options SYSVSEM #SYSV-style semaphores options P1003_1B #Posix P1003_1B real-time extensions options _KPOSIX_PRIORITY_SCHEDULING options ICMP_BANDLIM #Rate limit bad replies options KBD_INSTALL_CDEV # install a CDEV entry in /dev # To make an SMP kernel, the next two are needed #options SMP # Symmetric MultiProcessor Kernel #options APIC_IO # Symmetric (APIC) I/O options INCLUDE_CONFIG_FILE options MD_NSECT=40000 device isa #device eisa device pci # Floppy drives device fdc0 at isa? port IO_FD1 irq 6 drq 2 device fd0 at fdc0 drive 0 #device fd1 at fdc0 drive 1 # # If you have a Toshiba Libretto with its Y-E Data PCMCIA floppy, # don't use the above line for fdc0 but the following one: #device fdc0 # ATA and ATAPI devices #device ata0 at isa? port IO_WD1 irq 14 #device ata1 at isa? port IO_WD2 irq 15 device ata #device atadisk # ATA disk drives device atapicd # ATAPI CDROM drives #device atapifd # ATAPI floppy drives #device atapist # ATAPI tape drives options ATA_STATIC_ID #Static device numbering # SCSI Controllers #device ahb # EISA AHA1742 family device ahc # AHA2940 and onboard AIC7xxx devices #device amd # AMD 53C974 (Tekram DC-390(T)) #device isp # Qlogic family #device ncr # NCR/Symbios Logic #device sym # NCR/Symbios Logic (newer chipsets) #options SYM_SETUP_LP_PROBE_MAP=0x40 # Allow ncr to attach legacy NCR devices when # both sym and ncr are configured #device adv0 at isa? #device adw #device bt0 at isa? #device aha0 at isa? #device aic0 at isa? #device ncv # NCR 53C500 #device nsp # Workbit Ninja SCSI-3 #device stg # TMC 18C30/18C50 # SCSI peripherals device scbus # SCSI bus (required) device da # Direct Access (disks) #device sa # Sequential Access (tape etc) #device cd # CD device pass # Passthrough device (direct SCSI access) # RAID controllers interfaced to the SCSI subsystem #device asr # DPT SmartRAID V, VI and Adaptec SCSI RAID #device dpt # DPT Smartcache - See LINT for options! #device mly # Mylex AcceleRAID/eXtremeRAID # RAID controllers #device aac # Adaptec FSA RAID, Dell PERC2/PERC3 #device ida # Compaq Smart RAID #device amr # AMI MegaRAID #device mlx # Mylex DAC960 family #device twe # 3ware Escalade # atkbdc0 controls both the keyboard and the PS/2 mouse device atkbdc0 at isa? port IO_KBD device atkbd0 at atkbdc? irq 1 flags 0x1 device psm0 at atkbdc? irq 12 device vga0 at isa? # splash screen/screen saver pseudo-device splash # syscons is the default console driver, resembling an SCO console device sc0 at isa? flags 0x100 options SC_DISABLE_REBOOT # Enable this and PCVT_FREEBSD for pcvt vt220 compatible console driver #device vt0 at isa? #options XSERVER # support for X server on a vt console #options FAT_CURSOR # start with block cursor # If you have a ThinkPAD, uncomment this along with the rest of the PCVT lines #options PCVT_SCANSET=2 # IBM keyboards are non-std # Floating point support - do not disable. device npx0 at nexus? port IO_NPX irq 13 # Power management support (see LINT for more options) #device apm0 at nexus? disable flags 0x20 # Advanced Power Management # PCCARD (PCMCIA) support #device card #device pcic0 at isa? irq 0 port 0x3e0 iomem 0xd0000 #device pcic1 at isa? irq 0 port 0x3e2 iomem 0xd4000 disable # Serial (COM) ports device sio0 at isa? port IO_COM1 flags 0x10 irq 4 #device sio1 at isa? port IO_COM2 irq 3 #device sio2 at isa? disable port IO_COM3 irq 5 #device sio3 at isa? disable port IO_COM4 irq 9 # Parallel port #device ppc0 at isa? irq 7 #device ppbus # Parallel port bus (required) #device lpt # Printer #device plip # TCP/IP over parallel #device ppi # Parallel port interface device #device vpo # Requires scbus and da # PCI Ethernet NICs. #device de # DEC/Intel DC21x4x (``Tulip'') #device txp # 3Com 3cR990 (``Typhoon'') #device vx # 3Com 3c590, 3c595 (``Vortex'') # PCI Ethernet NICs that use the common MII bus controller code. # NOTE: Be sure to keep the 'device miibus' line in order to use these NICs! device miibus # MII bus support #device dc # DEC/Intel 21143 and various workalikes device fxp # Intel EtherExpress PRO/100B (82557, 82558) #device pcn # AMD Am79C97x PCI 10/100 NICs #device rl # RealTek 8129/8139 #device sf # Adaptec AIC-6915 (``Starfire'') #device sis # Silicon Integrated Systems SiS 900/SiS 7016 #device ste # Sundance ST201 (D-Link DFE-550TX) #device tl # Texas Instruments ThunderLAN #device tx # SMC EtherPower II (83c170 ``EPIC'') #device vr # VIA Rhine, Rhine II #device wb # Winbond W89C840F #device wx # Intel Gigabit Ethernet Card (``Wiseman'') #device xl # 3Com 3c90x (``Boomerang'', ``Cyclone'') # ISA Ethernet NICs. # 'device ed' requires 'device miibus' #device ed0 at isa? port 0x280 irq 10 iomem 0xd8000 #device ex #device ep #device fe0 at isa? port 0x300 # Xircom Ethernet #device xe # PRISM I IEEE 802.11b wireless NIC. #device awi # WaveLAN/IEEE 802.11 wireless NICs. Note: the WaveLAN/IEEE really # exists only as a PCMCIA device, so there is no ISA attachment needed # and resources will always be dynamically assigned by the pccard code. #device wi # Aironet 4500/4800 802.11 wireless NICs. Note: the declaration below will # work for PCMCIA and PCI cards, as well as ISA cards set to ISA PnP # mode (the factory default). If you set the switches on your ISA # card for a manually chosen I/O address and IRQ, you must specify # those parameters here. #device an # The probe order of these is presently determined by i386/isa/isa_compat.c. #device ie0 at isa? port 0x300 irq 10 iomem 0xd0000 #device le0 at isa? port 0x300 irq 5 iomem 0xd0000 #device lnc0 at isa? port 0x280 irq 10 drq 0 #device cs0 at isa? port 0x300 #device sn0 at isa? port 0x300 irq 10 # Pseudo devices - the number indicates how many units to allocate. pseudo-device loop # Network loopback pseudo-device ether # Ethernet support pseudo-device sl 1 # Kernel SLIP pseudo-device ppp 1 # Kernel PPP pseudo-device tun # Packet tunnel. pseudo-device pty # Pseudo-ttys (telnet etc) pseudo-device md # Memory "disks" #pseudo-device gif # IPv6 and IPv4 tunneling #pseudo-device faith 1 # IPv6-to-IPv4 relaying (translation) # The `bpf' pseudo-device enables the Berkeley Packet Filter. # Be aware of the administrative consequences of enabling this! pseudo-device bpf #Berkeley packet filter # USB support #device uhci # UHCI PCI->USB interface #device ohci # OHCI PCI->USB interface #device usb # USB Bus (required) #device ugen # Generic #device uhid # "Human Interface Devices" #device ukbd # Keyboard #device ulpt # Printer #device umass # Disks/Mass storage - Requires scbus and da #device ums # Mouse #device uscanner # Scanners # USB Ethernet, requires mii #device aue # ADMtek USB ethernet #device cue # CATC USB ethernet #device kue # Kawasaki LSI USB ethernet # # Cyclades YeP boards # device cy0 device cy1 device cy2 options CY_PCI_FASTINTR # use with cy_pci unless IRQ is shared --------------080101000409050404080901-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Tue Oct 2 13:53: 6 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from salmon.maths.tcd.ie (salmon.maths.tcd.ie [134.226.81.11]) by hub.freebsd.org (Postfix) with SMTP id 0160937B401; Tue, 2 Oct 2001 13:52:51 -0700 (PDT) Received: from walton.maths.tcd.ie by salmon.maths.tcd.ie with SMTP id ; 2 Oct 2001 21:52:49 +0100 (BST) To: Matt Dillon Cc: Yevgeniy Aleynikov , peter@FreeBSD.ORG, ache@FreeBSD.ORG, mckusick@mckusick.com, Ken Pizzini , hackers@FreeBSD.ORG Subject: Re: bleh. Re: ufs_rename panic In-Reply-To: Your message of "Tue, 02 Oct 2001 12:35:10 PDT." <200110021935.f92JZAm59707@earth.backplane.com> Date: Tue, 02 Oct 2001 21:52:48 +0100 From: Ian Dowse Message-ID: <200110022152.aa36964@salmon.maths.tcd.ie> Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG In message <200110021935.f92JZAm59707@earth.backplane.com>, Matt Dillon writes: > What I've done is add a SOFTLOCKLEAF capability to namei(). If set, and > the file/directory exists, namei() will generate an extra VREF() on > the vnode and set the VSOFTLOCK flag in vp->v_flag. If the vnode already > has VSOFTLOCK set, namei() will return EINVAL. I just tried a more direct approach, which is to implement a flag at the vnode layer that is roughly equivalent to UFS's IN_RENAME flag. This keeps the changes local to vfs_syscalls.c except for the addition of a new vnode flag in vnode.h. A patch is below. It doesn't include the changes to remove IN_RENAME etc, but these could be done later anyway. The basic idea is that the rename syscall locks the source node just for long enough to mark it with VRENAME. It then keeps an extra reference on the source node so that it can clear VRENAME before returning. The syscalls unlink(), rmdir() and rename() also check for VRENAME before proceeding with the operation, and act appropriately if it is found set. One case that is not being handled well is where the target of a rename has VRENAME set; the patch just causes rename to return EINVAL, but a better approach would be to unlock everything and try again. I don't know how to deal with the case of vn_lock(fvp, ...) failing at the end of rename() either. Only lightly tested, so expect lots of bugs... Ian Index: sys/vnode.h =================================================================== RCS file: /dump/FreeBSD-CVS/src/sys/sys/vnode.h,v retrieving revision 1.157 diff -u -r1.157 vnode.h --- sys/vnode.h 13 Sep 2001 22:52:42 -0000 1.157 +++ sys/vnode.h 2 Oct 2001 19:06:41 -0000 @@ -163,8 +163,8 @@ #define VXLOCK 0x00100 /* vnode is locked to change underlying type */ #define VXWANT 0x00200 /* thread is waiting for vnode */ #define VBWAIT 0x00400 /* waiting for output to complete */ +#define VRENAME 0x00800 /* rename operation on progress */ #define VNOSYNC 0x01000 /* unlinked, stop syncing */ -/* open for business 0x01000 */ #define VOBJBUF 0x02000 /* Allocate buffers in VM object */ #define VCOPYONWRITE 0x04000 /* vnode is doing copy-on-write */ #define VAGE 0x08000 /* Insert vnode at head of free list */ Index: kern/vfs_syscalls.c =================================================================== RCS file: /dump/FreeBSD-CVS/src/sys/kern/vfs_syscalls.c,v retrieving revision 1.206 diff -u -r1.206 vfs_syscalls.c --- kern/vfs_syscalls.c 22 Sep 2001 03:07:41 -0000 1.206 +++ kern/vfs_syscalls.c 2 Oct 2001 20:29:54 -0000 @@ -1573,6 +1573,9 @@ if (vp->v_flag & VROOT) error = EBUSY; } + /* Claim that the node is already gone if it is being renamed. */ + if (vp->v_flag & VRENAME) + error = ENOENT; if (vn_start_write(nd.ni_dvp, &mp, V_NOWAIT) != 0) { NDFREE(&nd, NDF_ONLY_PNBUF); vrele(vp); @@ -2879,20 +2882,29 @@ struct mount *mp; struct vnode *tvp, *fvp, *tdvp; struct nameidata fromnd, tond; - int error; + int err1, error; bwillwrite(); - NDINIT(&fromnd, DELETE, WANTPARENT | SAVESTART, UIO_USERSPACE, - SCARG(uap, from), td); + NDINIT(&fromnd, DELETE, WANTPARENT | LOCKLEAF | SAVESTART, + UIO_USERSPACE, SCARG(uap, from), td); if ((error = namei(&fromnd)) != 0) return (error); fvp = fromnd.ni_vp; - if ((error = vn_start_write(fvp, &mp, V_WAIT | PCATCH)) != 0) { + if (fvp->v_flag & VRENAME) + /* The node is being renamed; claim it has already gone. */ + error = ENOENT; + if (!error) + error = vn_start_write(fvp, &mp, V_WAIT | PCATCH); + if (error) { NDFREE(&fromnd, NDF_ONLY_PNBUF); vrele(fromnd.ni_dvp); - vrele(fvp); + vput(fvp); + fvp = NULL; goto out1; } + fvp->v_flag |= VRENAME; + vref(fvp); + VOP_UNLOCK(fvp, 0, td); NDINIT(&tond, RENAME, LOCKPARENT | LOCKLEAF | NOCACHE | SAVESTART | NOOBJ, UIO_USERSPACE, SCARG(uap, to), td); if (fromnd.ni_vp->v_type == VDIR) @@ -2929,6 +2941,10 @@ !bcmp(fromnd.ni_cnd.cn_nameptr, tond.ni_cnd.cn_nameptr, fromnd.ni_cnd.cn_namelen)) error = -1; + if (tvp != NULL && (tvp->v_flag & VRENAME)) { + /* XXX, should just unlock everything and retry. */ + error = EINVAL; + } out: if (!error) { VOP_LEASE(tdvp, td, td->td_proc->p_ucred, LEASE_WRITE); @@ -2961,6 +2977,18 @@ ASSERT_VOP_UNLOCKED(tond.ni_dvp, "rename"); ASSERT_VOP_UNLOCKED(tond.ni_vp, "rename"); out1: + if (fvp != NULL) { + /* We set the VRENAME flag and did an extra vref(fvp) above. */ + if ((err1 = vn_lock(fvp, LK_EXCLUSIVE, td)) == 0) { + KASSERT(fvp->v_flag & VRENAME, + ("rename: lost VRENAME")); + fvp->v_flag &= ~VRENAME; + vput(fvp); + } else { + printf("rename: failed to clear VRENAME! (%d)\n", err1); + vrele(fvp); + } + } if (fromnd.ni_startdir) vrele(fromnd.ni_startdir); if (error == -1) @@ -3082,6 +3110,11 @@ */ if (vp->v_flag & VROOT) { error = EBUSY; + goto out; + } + /* Claim that the node is already gone if it is being renamed. */ + if (vp->v_flag & VRENAME) { + error = ENOENT; goto out; } if (vn_start_write(nd.ni_dvp, &mp, V_NOWAIT) != 0) { To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Tue Oct 2 14: 2: 5 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from mail.yadt.co.uk (yadt.demon.co.uk [158.152.4.134]) by hub.freebsd.org (Postfix) with SMTP id 1E9D237B408 for ; Tue, 2 Oct 2001 14:01:56 -0700 (PDT) Received: (qmail 24687 invoked from network); 2 Oct 2001 21:01:53 -0000 Received: from unknown (HELO mail.gattaca.yadt.co.uk) (qmailr@10.0.0.2) by yadt.demon.co.uk with SMTP; 2 Oct 2001 21:01:53 -0000 Received: (qmail 28306 invoked by uid 1000); 2 Oct 2001 21:01:52 -0000 Date: Tue, 2 Oct 2001 22:01:52 +0100 From: David Taylor To: Alfred Perlstein Cc: Peter Pentchev , freebsd-hackers@FreeBSD.org Subject: Re: Doubt of system(3) Message-ID: <20011002220152.A3056@gattaca.yadt.co.uk> Mail-Followup-To: Alfred Perlstein , Peter Pentchev , freebsd-hackers@FreeBSD.org References: <200109291527.f8TFRrU76727.toshi@jp.FreeBSD.org> <20010929153433.U59854@elvis.mu.org> <20010929214338.A57903@gattaca.yadt.co.uk> <20010929221658.B57903@gattaca.yadt.co.uk> <20010929170332.Y59854@elvis.mu.org> <20010929232839.A91153@gattaca.yadt.co.uk> <20011002130942.C704@ringworld.oblivion.bg> <20011002112707.C59854@elvis.mu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20011002112707.C59854@elvis.mu.org>; from bright@mu.org on Tue, Oct 02, 2001 at 11:27:07 -0500 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Tue, 02 Oct 2001, Alfred Perlstein wrote: > * Peter Pentchev [011002 05:21] wrote: > > On Sat, Sep 29, 2001 at 11:28:39PM +0100, David Taylor wrote: > > [snip] > > > IMO, the below patch is probably the best solution. > > > > Yep, it also fixes the fact that the return value from wait4() needs > > to be preserved, at least for the return statement of __system(). > > Aaaaaaaaaaah! Forgot about it, I'm going to upgrade my workstation > now and commit it if it works, probably tonight. > > If someone else can test it earlier, by all means commit it. Just to say that as I did a make world today, I took the opportunity to test the patch, and it does fix the bug. (Old behaviour: davidt@gattaca:~/C/system-bug$ ./test Parent: Child A pid = 26271 Calling system... Child A: exiting Child B running - pid 26273 Child B: Sending parent (26270) SIGFPE to interrupt wait... System has returned Child B entering busy loop... Child B still running... Parent exiting - child b should have also exited... davidt@gattaca:~/C/system-bug$ Child B still running... killall test2 Terminated New behaviour: davidt@gattaca:~/C/system-bug$ ./test Parent: Child A pid = 27944 Calling system... Child A: exiting Child B running - pid 27946 Child B: Sending parent (27943) SIGFPE to interrupt wait... Child B entering busy loop... Child B still running... Child B still running... Child B still running... ^Z [1]+ Stopped ./test davidt@gattaca:~/C/system-bug$ bg [1]+ ./test & davidt@gattaca:~/C/system-bug$ Child B still running... kill 27946 Terminated System has returned Parent exiting - child b should have also exited... davidt@gattaca:~/C/system-bug$ ) However, I won't be able to commit it, since I'm not a committer :) -- David Taylor davidt@yadt.co.uk To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Tue Oct 2 14: 7:31 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from softcon.mail.net (softcon.mail.net [209.47.5.37]) by hub.freebsd.org (Postfix) with ESMTP id 22FF937B403 for ; Tue, 2 Oct 2001 14:07:25 -0700 (PDT) Received: from xwave.com (saturn.mail.net [209.47.5.34]) by softcon.mail.net (8.11.3/8.11.3) with ESMTP id f92L5I051884 for ; Tue, 2 Oct 2001 17:05:18 -0400 (EDT) (envelope-from Dwayne.MacKinnon@xwave.com) Message-ID: <3BBA29C0.5E125DAF@xwave.com> Date: Tue, 02 Oct 2001 16:55:28 -0400 From: Dwayne Reply-To: Dwayne.MacKinnon@xwave.com Organization: xwave X-Mailer: Mozilla 4.76 [en] (X11; U; FreeBSD 4.2-RELEASE i386) X-Accept-Language: en MIME-Version: 1.0 To: freebsd-hackers@freebsd.org Subject: Memory allocation question Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Hi, I'm creating an app where I want to use memory to store data so I can get at it quickly. The problem is, I can't afford the delays that would occur if the memory gets swapped out. Is there any way in FreeBSD to allocate memory so that the VM system won't swap it out? Thanks, DMK To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Tue Oct 2 14:22:23 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from smtpproxy1.mitre.org (smtpproxy1.mitre.org [129.83.20.90]) by hub.freebsd.org (Postfix) with ESMTP id 1B9DF37B408 for ; Tue, 2 Oct 2001 14:22:20 -0700 (PDT) Received: from avsrv1.mitre.org (avsrv1.mitre.org [129.83.20.58]) by smtpproxy1.mitre.org (8.11.3/8.11.3) with ESMTP id f92LLuE05147; Tue, 2 Oct 2001 17:21:57 -0400 (EDT) Received: from MAILHUB1 (mailhub1.mitre.org [129.83.20.31]) by smtpsrv1.mitre.org (8.11.3/8.11.3) with ESMTP id f92LLtf04388; Tue, 2 Oct 2001 17:21:55 -0400 (EDT) Received: from dhcp-105-164.mitre.org (128.29.105.164) by mailhub1.mitre.org with SMTP id 7809085; Tue, 02 Oct 2001 17:21:05 -0400 Message-ID: <3BBA2FF1.84FF06AC@mitre.org> Date: Tue, 02 Oct 2001 17:21:53 -0400 From: Jason Andresen Organization: The MITRE Corporation X-Mailer: Mozilla 4.75 [en]C-20000818M (Windows NT 5.0; U) X-Accept-Language: en MIME-Version: 1.0 To: Dwayne.MacKinnon@xwave.com Cc: freebsd-hackers@freebsd.org Subject: Re: Memory allocation question References: <3BBA29C0.5E125DAF@xwave.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Dwayne wrote: > > Hi, > > I'm creating an app where I want to use memory to store data so I > can get at it quickly. The problem is, I can't afford the delays that > would occur if the memory gets swapped out. Is there any way in FreeBSD > to allocate memory so that the VM system won't swap it out? It's not a 100% guarentee IIRC, but I think madvise(2) can tell FreeBSD to try it's best to not swap out parts of memory. -- \ |_ _|__ __|_ \ __| Jason Andresen jandrese@mitre.org |\/ | | | / _| Network and Distributed Systems Engineer _| _|___| _| _|_\___| Office: 703-883-7755 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Tue Oct 2 14:39: 4 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from noos.fr (r178m112.cybercable.tm.fr [195.132.178.112]) by hub.freebsd.org (Postfix) with ESMTP id 8A48237B407 for ; Tue, 2 Oct 2001 14:39:01 -0700 (PDT) Received: (from mux@localhost) by noos.fr (8.11.6/8.11.4) id f92Lcp518844; Tue, 2 Oct 2001 23:38:51 +0200 (CEST) (envelope-from mux) Date: Tue, 2 Oct 2001 23:38:51 +0200 From: Maxime Henrion To: Dwayne Cc: freebsd-hackers@freebsd.org Subject: Re: Memory allocation question Message-ID: <20011002233851.A1317@nebula.cybercable.fr> References: <3BBA29C0.5E125DAF@xwave.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3BBA29C0.5E125DAF@xwave.com> User-Agent: Mutt/1.3.22.1i Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Dwayne wrote: > I'm creating an app where I want to use memory to store data so I > can get at it quickly. The problem is, I can't afford the delays that > would occur if the memory gets swapped out. Is there any way in FreeBSD > to allocate memory so that the VM system won't swap it out? > I think mlock(2) is what you want. Maxime Henrion -- Don't be fooled by cheap finnish imitations ; BSD is the One True Code To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Tue Oct 2 15:58: 6 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from elvis.mu.org (elvis.mu.org [216.33.66.196]) by hub.freebsd.org (Postfix) with ESMTP id EA53737B405 for ; Tue, 2 Oct 2001 15:58:03 -0700 (PDT) Received: by elvis.mu.org (Postfix, from userid 1192) id D80B981D01; Tue, 2 Oct 2001 17:57:58 -0500 (CDT) Date: Tue, 2 Oct 2001 17:57:58 -0500 From: Alfred Perlstein To: Peter Pentchev , freebsd-hackers@FreeBSD.org Subject: Re: Doubt of system(3) Message-ID: <20011002175758.M59854@elvis.mu.org> References: <200109291527.f8TFRrU76727.toshi@jp.FreeBSD.org> <20010929153433.U59854@elvis.mu.org> <20010929214338.A57903@gattaca.yadt.co.uk> <20010929221658.B57903@gattaca.yadt.co.uk> <20010929170332.Y59854@elvis.mu.org> <20010929232839.A91153@gattaca.yadt.co.uk> <20011002130942.C704@ringworld.oblivion.bg> <20011002112707.C59854@elvis.mu.org> <20011002220152.A3056@gattaca.yadt.co.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20011002220152.A3056@gattaca.yadt.co.uk>; from davidt@yadt.co.uk on Tue, Oct 02, 2001 at 10:01:52PM +0100 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG * David Taylor [011002 16:02] wrote: > On Tue, 02 Oct 2001, Alfred Perlstein wrote: > > * Peter Pentchev [011002 05:21] wrote: > > > On Sat, Sep 29, 2001 at 11:28:39PM +0100, David Taylor wrote: > > > [snip] > > > > IMO, the below patch is probably the best solution. > > > > > > Yep, it also fixes the fact that the return value from wait4() needs > > > to be preserved, at least for the return statement of __system(). > > > > Aaaaaaaaaaah! Forgot about it, I'm going to upgrade my workstation > > now and commit it if it works, probably tonight. > > > > If someone else can test it earlier, by all means commit it. > > Just to say that as I did a make world today, I took the opportunity to test > the patch, and it does fix the bug. Thanks for taking the time to do this and thanks for the feedback. -Alfred To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Tue Oct 2 16: 5:22 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from mailsrv.otenet.gr (mailsrv.otenet.gr [195.170.0.5]) by hub.freebsd.org (Postfix) with ESMTP id BE44937B405 for ; Tue, 2 Oct 2001 16:05:14 -0700 (PDT) Received: from hades.hell.gr (patr530-a009.otenet.gr [212.205.215.9]) by mailsrv.otenet.gr (8.11.5/8.11.5) with ESMTP id f92N55I26140; Wed, 3 Oct 2001 02:05:05 +0300 (EEST) Received: (from charon@localhost) by hades.hell.gr (8.11.6/8.11.6) id f92N54a16934; Wed, 3 Oct 2001 02:05:04 +0300 (EEST) (envelope-from charon@labs.gr) Date: Wed, 3 Oct 2001 02:05:04 +0300 From: Giorgos Keramidas To: Greg Shenaut Cc: hackers@FreeBSD.ORG Subject: Re: ALT- (Was: how to make 'for' understand two words as a single argumen) Message-ID: <20011003020504.A16924@hades.hell.gr> References: <20011002185518.A335@firedrake.org> <200110021841.f92IfVS07537@thistle.bogs.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200110021841.f92IfVS07537@thistle.bogs.org> User-Agent: Mutt/1.3.22.1i X-GPG-Fingerprint: C1EB 0653 DB8B A557 3829 00F9 D60F 941A 3186 03B6 X-URL: http://labs.gr/~charon/ Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Greg Shenaut wrote: > > I just throw out the idea--as for where to enforce such a convention, > I agree that the file-system definition may not be the best place, > but it might be the *easiest* place (spaces could be silently mapped > to 0xa0's). Please don't even think about it. When I write a space, I mean a space, and silently doing things behind my back, is something I have not been used to expecting from Unix. -giorgos To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Tue Oct 2 16:13:23 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from earth.backplane.com (earth-nat-cw.backplane.com [208.161.114.67]) by hub.freebsd.org (Postfix) with ESMTP id DB81237B401; Tue, 2 Oct 2001 16:12:58 -0700 (PDT) Received: (from dillon@localhost) by earth.backplane.com (8.11.6/8.11.2) id f92NCpp60948; Tue, 2 Oct 2001 16:12:51 -0700 (PDT) (envelope-from dillon) Date: Tue, 2 Oct 2001 16:12:51 -0700 (PDT) From: Matt Dillon Message-Id: <200110022312.f92NCpp60948@earth.backplane.com> To: Ian Dowse Cc: Yevgeniy Aleynikov , peter@FreeBSD.ORG, ache@FreeBSD.ORG, mckusick@mckusick.com, Ken Pizzini , hackers@FreeBSD.ORG Subject: patch #3 (was Re: bleh. Re: ufs_rename panic) Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Here is the latest patch I have. It appears to completely solve the problem. I have shims in unionfs and nfs for the moment. The patch is against -stable. * Implements SOFTLOCKLEAF namei() option * Implements EAGAIN error & appropriate tsleep/retry code * Universal for rename() & rmdir(). Final patch will also probably implement it on unlink() to solve (pre-existing) unlink/rename regular file race. * Tested very well w/ UFS, should be compatible with and work for direct access to other filesystems that still use IN_RENAME. * Tested for collision probability. Answer: Very low even when one tries on purpose. There is no need to implement a more sophisticated fine-grained tsleep. -Matt Index: kern/vfs_lookup.c =================================================================== RCS file: /home/ncvs/src/sys/kern/vfs_lookup.c,v retrieving revision 1.38.2.3 diff -u -r1.38.2.3 vfs_lookup.c --- kern/vfs_lookup.c 2001/08/31 19:36:49 1.38.2.3 +++ kern/vfs_lookup.c 2001/10/02 20:06:33 @@ -372,6 +372,11 @@ error = EISDIR; goto bad; } + if (cnp->cn_flags & SOFTLOCKLEAF) { + if ((error = vsetsoftlock(dp)) != 0) + goto bad; + VREF(dp); + } if (wantparent) { ndp->ni_dvp = dp; VREF(dp); @@ -565,13 +570,17 @@ error = EROFS; goto bad2; } + if (cnp->cn_flags & SOFTLOCKLEAF) { + if ((error = vsetsoftlock(dp)) != 0) + goto bad2; + VREF(dp); + } if (cnp->cn_flags & SAVESTART) { ndp->ni_startdir = ndp->ni_dvp; VREF(ndp->ni_startdir); } if (!wantparent) vrele(ndp->ni_dvp); - if ((cnp->cn_flags & LOCKLEAF) == 0) VOP_UNLOCK(dp, 0, p); return (0); @@ -654,6 +663,11 @@ error = ENOTDIR; goto bad; } + if (cnp->cn_flags & SOFTLOCKLEAF) { + if ((error = vsetsoftlock(dp)) != 0) + goto bad; + VREF(dp); + } if (!(cnp->cn_flags & LOCKLEAF)) VOP_UNLOCK(dp, 0, p); *vpp = dp; @@ -707,6 +721,11 @@ error = EROFS; goto bad2; } + if (cnp->cn_flags & SOFTLOCKLEAF) { + if ((error = vsetsoftlock(dp)) != 0) + goto bad2; + VREF(dp); + } /* ASSERT(dvp == ndp->ni_startdir) */ if (cnp->cn_flags & SAVESTART) VREF(dvp); @@ -715,8 +734,9 @@ vrele(dvp); if (vn_canvmio(dp) == TRUE && - ((cnp->cn_flags & (NOOBJ|LOCKLEAF)) == LOCKLEAF)) + ((cnp->cn_flags & (NOOBJ|LOCKLEAF)) == LOCKLEAF)) { vfs_object_create(dp, cnp->cn_proc, cnp->cn_cred); + } if ((cnp->cn_flags & LOCKLEAF) == 0) VOP_UNLOCK(dp, 0, p); Index: kern/vfs_subr.c =================================================================== RCS file: /home/ncvs/src/sys/kern/vfs_subr.c,v retrieving revision 1.249.2.11 diff -u -r1.249.2.11 vfs_subr.c --- kern/vfs_subr.c 2001/09/11 09:49:53 1.249.2.11 +++ kern/vfs_subr.c 2001/10/02 22:55:38 @@ -130,6 +132,8 @@ #endif struct nfs_public nfs_pub; /* publicly exported FS */ static vm_zone_t vnode_zone; +static int vagain_count = 1; +static int vagain_waiting = 0; /* * The workitem queue. @@ -2927,6 +2963,13 @@ struct nameidata *ndp; const uint flags; { + if (!(flags & NDF_NO_FREE_SOFTLOCKLEAF) && + (ndp->ni_cnd.cn_flags & SOFTLOCKLEAF) && + ndp->ni_vp) { + vclearsoftlock(ndp->ni_vp); + ndp->ni_cnd.cn_flags &= ~SOFTLOCKLEAF; + vrele(ndp->ni_vp); + } if (!(flags & NDF_NO_FREE_PNBUF) && (ndp->ni_cnd.cn_flags & HASBUF)) { zfree(namei_zone, ndp->ni_cnd.cn_pnbuf); @@ -2955,3 +2998,55 @@ ndp->ni_startdir = NULL; } } + +/* + * vsetsoftlock() - set the VSOFTLOCK flag on the vnode, return + * EAGAIN if it has already been set by someone else. + * + * note: we could further refine the collision by setting a VSOFTLOCKCOLL + * flag and then only waking up waiters when the colliding vnode is + * released. However, this sort of collision does not happen often + * enough for such an addition to yield any improvement in performance. + */ + +int +vsetsoftlock(struct vnode *vp) +{ + int s; + int error = 0; + + s = splbio(); + if (vp->v_flag & VSOFTLOCK) + error = EAGAIN; + else + vp->v_flag |= VSOFTLOCK; + splx(s); + return(error); +} + +void +vclearsoftlock(struct vnode *vp) +{ + int s; + + s = splbio(); + vp->v_flag &= ~VSOFTLOCK; + splx(s); + if (++vagain_count == 0) + vagain_count = 1; + if (vagain_waiting) { + vagain_waiting = 0; + wakeup(&vagain_waiting); + } +} + +void +vagain(int *gc) +{ + while (*gc && *gc == vagain_count) { + vagain_waiting = 1; + tsleep(&vagain_waiting, PVFS, "vagain", 0); + } + *gc = vagain_count; +} + Index: kern/vfs_syscalls.c =================================================================== RCS file: /home/ncvs/src/sys/kern/vfs_syscalls.c,v retrieving revision 1.151.2.9 diff -u -r1.151.2.9 vfs_syscalls.c --- kern/vfs_syscalls.c 2001/08/12 10:48:00 1.151.2.9 +++ kern/vfs_syscalls.c 2001/10/02 22:19:22 @@ -2631,12 +2631,18 @@ register struct vnode *tvp, *fvp, *tdvp; struct nameidata fromnd, tond; int error; + int gc = 0; +again: + vagain(&gc); bwillwrite(); - NDINIT(&fromnd, DELETE, WANTPARENT | SAVESTART, UIO_USERSPACE, - SCARG(uap, from), p); - if ((error = namei(&fromnd)) != 0) + NDINIT(&fromnd, DELETE, WANTPARENT | SAVESTART | SOFTLOCKLEAF, + UIO_USERSPACE, SCARG(uap, from), p); + if ((error = namei(&fromnd)) != 0) { + if (error == EAGAIN) + goto again; return (error); + } fvp = fromnd.ni_vp; NDINIT(&tond, RENAME, LOCKPARENT | LOCKLEAF | NOCACHE | SAVESTART | NOOBJ, UIO_USERSPACE, SCARG(uap, to), p); @@ -2646,7 +2652,7 @@ /* Translate error code for rename("dir1", "dir2/."). */ if (error == EISDIR && fvp->v_type == VDIR) error = EINVAL; - NDFREE(&fromnd, NDF_ONLY_PNBUF); + NDFREE(&fromnd, NDF_ONLY_PNBUF & NDF_ONLY_SOFTLOCKLEAF); vrele(fromnd.ni_dvp); vrele(fvp); goto out1; @@ -2683,12 +2689,14 @@ if (tvp) { VOP_LEASE(tvp, p, p->p_ucred, LEASE_WRITE); } + fromnd.ni_cnd.cn_flags &= ~SOFTLOCKLEAF; /* XXX hack */ error = VOP_RENAME(fromnd.ni_dvp, fromnd.ni_vp, &fromnd.ni_cnd, tond.ni_dvp, tond.ni_vp, &tond.ni_cnd); - NDFREE(&fromnd, NDF_ONLY_PNBUF); + fromnd.ni_cnd.cn_flags |= SOFTLOCKLEAF; + NDFREE(&fromnd, NDF_ONLY_PNBUF & NDF_ONLY_SOFTLOCKLEAF); NDFREE(&tond, NDF_ONLY_PNBUF); } else { - NDFREE(&fromnd, NDF_ONLY_PNBUF); + NDFREE(&fromnd, NDF_ONLY_PNBUF & NDF_ONLY_SOFTLOCKLEAF); NDFREE(&tond, NDF_ONLY_PNBUF); if (tdvp == tvp) vrele(tdvp); @@ -2782,13 +2790,19 @@ { register struct vnode *vp; int error; + int gc = 0; struct nameidata nd; +again: + vagain(&gc); bwillwrite(); - NDINIT(&nd, DELETE, LOCKPARENT | LOCKLEAF, UIO_USERSPACE, - SCARG(uap, path), p); - if ((error = namei(&nd)) != 0) + NDINIT(&nd, DELETE, LOCKPARENT | LOCKLEAF | SOFTLOCKLEAF, + UIO_USERSPACE, SCARG(uap, path), p); + if ((error = namei(&nd)) != 0) { + if (error == EAGAIN) + goto again; return (error); + } vp = nd.ni_vp; if (vp->v_type != VDIR) { error = ENOTDIR; @@ -2812,7 +2826,7 @@ error = VOP_RMDIR(nd.ni_dvp, nd.ni_vp, &nd.ni_cnd); } out: - NDFREE(&nd, NDF_ONLY_PNBUF); + NDFREE(&nd, NDF_ONLY_PNBUF & NDF_ONLY_SOFTLOCKLEAF); if (nd.ni_dvp == vp) vrele(nd.ni_dvp); else Index: miscfs/union/union_vnops.c =================================================================== RCS file: /home/ncvs/src/sys/miscfs/union/Attic/union_vnops.c,v retrieving revision 1.72 diff -u -r1.72 union_vnops.c --- miscfs/union/union_vnops.c 1999/12/15 23:02:14 1.72 +++ miscfs/union/union_vnops.c 2001/10/02 22:48:40 @@ -1380,6 +1380,7 @@ struct vnode *fvp = ap->a_fvp; struct vnode *tdvp = ap->a_tdvp; struct vnode *tvp = ap->a_tvp; + int setsoftlock = 0; /* * Figure out what fdvp to pass to our upper or lower vnode. If we @@ -1456,6 +1457,16 @@ fvp = un->un_uppervp; VREF(fvp); vrele(ap->a_fvp); + if ((error = vsetsoftlock(fvp)) != 0) { + /* + * XXX for now do not support a retry request + */ + if (error == EAGAIN) + error = EINVAL; + goto bad; + } + setsoftlock = 1; + VREF(fvp); /* for softlock */ } /* @@ -1505,11 +1516,15 @@ } /* - * VOP_RENAME releases/vputs prior to returning, so we have no - * cleanup to do. + * VOP_RENAME releases/vputs prior to returning, except for the + * SOFTLOCK, so we have minimal cleanup to do. */ - - return (VOP_RENAME(fdvp, fvp, ap->a_fcnp, tdvp, tvp, ap->a_tcnp)); + error = VOP_RENAME(fdvp, fvp, ap->a_fcnp, tdvp, tvp, ap->a_tcnp); + if (setsoftlock) { + vclearsoftlock(fvp); + vrele(fvp); + } + return(error); /* * Error. We still have to release / vput the various elements. @@ -1517,8 +1532,13 @@ bad: vrele(fdvp); - if (fvp) + if (fvp) { + if (setsoftlock) { + vclearsoftlock(fvp); + vrele(fvp); + } vrele(fvp); + } vput(tdvp); if (tvp != NULLVP) { if (tvp != tdvp) @@ -1583,7 +1603,16 @@ if ((uppervp = union_lock_upper(un, p)) != NULLVP) { if (union_dowhiteout(un, cnp->cn_cred, p)) cnp->cn_flags |= DOWHITEOUT; - error = VOP_RMDIR(upperdvp, uppervp, ap->a_cnp); + if ((error = vsetsoftlock(upperdvp)) != 0) { + /* + * XXX for now do not support a retry request + */ + if (error == EAGAIN) + error = EINVAL; + + } else { + error = VOP_RMDIR(upperdvp, uppervp, ap->a_cnp); + } union_unlock_upper(uppervp, p); } else { error = union_mkwhiteout( Index: nfs/nfs_serv.c =================================================================== RCS file: /home/ncvs/src/sys/nfs/Attic/nfs_serv.c,v retrieving revision 1.93 diff -u -r1.93 nfs_serv.c --- nfs/nfs_serv.c 1999/12/18 19:20:05 1.93 +++ nfs/nfs_serv.c 2001/10/02 23:03:34 @@ -2194,7 +2194,7 @@ saved_uid = cred->cr_uid; fromnd.ni_cnd.cn_cred = cred; fromnd.ni_cnd.cn_nameiop = DELETE; - fromnd.ni_cnd.cn_flags = WANTPARENT | SAVESTART; + fromnd.ni_cnd.cn_flags = WANTPARENT | SAVESTART | SOFTLOCKLEAF; error = nfs_namei(&fromnd, ffhp, len, slp, nam, &md, &dpos, &fdirp, procp, (nfsd->nd_flag & ND_KERBAUTH), FALSE); if (fdirp) { @@ -2207,6 +2207,8 @@ } } if (error) { + if (error == EAGAIN) /* XXX EAGAIN not yet supported */ + error = EINVAL; nfsm_reply(2 * NFSX_WCCDATA(v3)); nfsm_srvwcc_data(fdirfor_ret, &fdirfor, fdiraft_ret, &fdiraft); nfsm_srvwcc_data(tdirfor_ret, &tdirfor, tdiraft_ret, &tdiraft); @@ -2300,13 +2302,17 @@ if (tvp) { nqsrv_getl(tvp, ND_WRITE); } + fromnd.ni_cnd.cn_flags &= ~SOFTLOCKLEAF; /* XXX hack */ error = VOP_RENAME(fromnd.ni_dvp, fromnd.ni_vp, &fromnd.ni_cnd, tond.ni_dvp, tond.ni_vp, &tond.ni_cnd); - fromnd.ni_dvp = NULL; - fromnd.ni_vp = NULL; - tond.ni_dvp = NULL; - tond.ni_vp = NULL; - if (error) { + /* XXX this is a @!#$!@#$@#$ mess */ + vclearsoftlock(fromnd.ni_vp); /* cleanup after SOFTLOCKLEAF */ + vrele(fromnd.ni_vp); /* cleanup after SOFTLOCKLEAF */ + fromnd.ni_dvp = NULL; /* clear for fall through */ + fromnd.ni_vp = NULL; /* clear for fall through */ + tond.ni_dvp = NULL; /* clear for fall through */ + tond.ni_vp = NULL; /* clear for fall through */ + if (error) { /* clear for fall through */ fromnd.ni_cnd.cn_flags &= ~HASBUF; tond.ni_cnd.cn_flags &= ~HASBUF; } @@ -2354,7 +2360,7 @@ vrele(fdirp); if (fromnd.ni_startdir) vrele(fromnd.ni_startdir); - NDFREE(&fromnd, NDF_ONLY_PNBUF); + NDFREE(&fromnd, NDF_ONLY_PNBUF & NDF_ONLY_SOFTLOCKLEAF); if (fromnd.ni_dvp) vrele(fromnd.ni_dvp); if (fromnd.ni_vp) @@ -2826,7 +2832,7 @@ nfsm_srvnamesiz(len); nd.ni_cnd.cn_cred = cred; nd.ni_cnd.cn_nameiop = DELETE; - nd.ni_cnd.cn_flags = LOCKPARENT | LOCKLEAF; + nd.ni_cnd.cn_flags = LOCKPARENT | LOCKLEAF | SOFTLOCKLEAF; error = nfs_namei(&nd, fhp, len, slp, nam, &md, &dpos, &dirp, procp, (nfsd->nd_flag & ND_KERBAUTH), FALSE); if (dirp) { @@ -2839,6 +2845,8 @@ } } if (error) { + if (error == EAGAIN) /* XXX EAGAIN not yet supported */ + error = EINVAL; nfsm_reply(NFSX_WCCDATA(v3)); nfsm_srvwcc_data(dirfor_ret, &dirfor, diraft_ret, &diraft); error = 0; @@ -2871,7 +2879,7 @@ nqsrv_getl(vp, ND_WRITE); error = VOP_RMDIR(nd.ni_dvp, nd.ni_vp, &nd.ni_cnd); } - NDFREE(&nd, NDF_ONLY_PNBUF); + NDFREE(&nd, NDF_ONLY_PNBUF & NDF_ONLY_SOFTLOCKLEAF); if (dirp) diraft_ret = VOP_GETATTR(dirp, &diraft, cred, procp); @@ -2883,7 +2891,7 @@ /* fall through */ nfsmout: - NDFREE(&nd, NDF_ONLY_PNBUF); + NDFREE(&nd, NDF_ONLY_PNBUF & NDF_ONLY_SOFTLOCKLEAF); if (dirp) vrele(dirp); if (nd.ni_dvp) { Index: nfs/nfs_subs.c =================================================================== RCS file: /home/ncvs/src/sys/nfs/Attic/nfs_subs.c,v retrieving revision 1.90.2.1 diff -u -r1.90.2.1 nfs_subs.c --- nfs/nfs_subs.c 2000/10/28 16:27:27 1.90.2.1 +++ nfs/nfs_subs.c 2001/10/02 23:01:03 @@ -1729,6 +1729,10 @@ out: if (error) { zfree(namei_zone, cnp->cn_pnbuf); + if ((cnp->cn_flags & SOFTLOCKLEAF) && ndp->ni_vp) { + vclearsoftlock(ndp->ni_vp); + vrele(ndp->ni_vp); + } ndp->ni_vp = NULL; ndp->ni_dvp = NULL; ndp->ni_startdir = NULL; Index: sys/namei.h =================================================================== RCS file: /home/ncvs/src/sys/sys/namei.h,v retrieving revision 1.29.2.2 diff -u -r1.29.2.2 namei.h --- sys/namei.h 2001/09/30 21:12:54 1.29.2.2 +++ sys/namei.h 2001/10/02 18:43:34 @@ -114,7 +114,7 @@ #define FOLLOW 0x0040 /* follow symbolic links */ #define NOOBJ 0x0080 /* don't create object */ #define NOFOLLOW 0x0000 /* do not follow symbolic links (pseudo) */ -#define MODMASK 0x00fc /* mask of operational modifiers */ +#define MODMASK (0x00fc|SOFTLOCKLEAF) /* * Namei parameter descriptors. * @@ -143,7 +143,7 @@ #define WILLBEDIR 0x080000 /* new files will be dirs; allow trailing / */ #define ISUNICODE 0x100000 /* current component name is unicode*/ #define PDIRUNLOCK 0x200000 /* file system lookup() unlocked parent dir */ -#define PARAMASK 0x1fff00 /* mask of parameter descriptors */ +#define SOFTLOCKLEAF 0x400000 /* set VSOFTLOCK in vnode */ /* * Initialization of an nameidata structure. */ @@ -180,7 +180,9 @@ #define NDF_NO_VP_PUT 0x0000000c #define NDF_NO_STARTDIR_RELE 0x00000010 #define NDF_NO_FREE_PNBUF 0x00000020 +#define NDF_NO_FREE_SOFTLOCKLEAF 0x00000040 #define NDF_ONLY_PNBUF (~NDF_NO_FREE_PNBUF) +#define NDF_ONLY_SOFTLOCKLEAF (~NDF_NO_FREE_SOFTLOCKLEAF) void NDFREE __P((struct nameidata *, const uint)); Index: sys/vnode.h =================================================================== RCS file: /home/ncvs/src/sys/sys/vnode.h,v retrieving revision 1.111.2.12 diff -u -r1.111.2.12 vnode.h --- sys/vnode.h 2001/09/22 09:21:48 1.111.2.12 +++ sys/vnode.h 2001/10/02 22:54:37 @@ -169,6 +169,7 @@ #define VTBFREE 0x100000 /* This vnode is on the to-be-freelist */ #define VONWORKLST 0x200000 /* On syncer work-list */ #define VMOUNT 0x400000 /* Mount in progress */ +#define VSOFTLOCK 0x800000 /* Soft lock on vnode (directory entry) */ /* * Vnode attributes. A field value of VNOVAL represents a field whose value @@ -630,6 +632,9 @@ void vrele __P((struct vnode *vp)); void vref __P((struct vnode *vp)); void vbusy __P((struct vnode *vp)); +int vsetsoftlock __P((struct vnode *vp)); +void vclearsoftlock __P((struct vnode *vp)); +void vagain __P((int *gc)); extern vop_t **default_vnodeop_p; extern vop_t **spec_vnodeop_p; Index: ufs/ufs/ufs_vnops.c =================================================================== RCS file: /home/ncvs/src/sys/ufs/ufs/ufs_vnops.c,v retrieving revision 1.131.2.4 diff -u -r1.131.2.4 ufs_vnops.c --- ufs/ufs/ufs_vnops.c 2001/08/28 17:28:49 1.131.2.4 +++ ufs/ufs/ufs_vnops.c 2001/10/02 19:16:40 @@ -997,13 +997,11 @@ * Avoid ".", "..", and aliases of "." for obvious reasons. */ if ((fcnp->cn_namelen == 1 && fcnp->cn_nameptr[0] == '.') || - dp == ip || (fcnp->cn_flags | tcnp->cn_flags) & ISDOTDOT || - (ip->i_flag & IN_RENAME)) { + dp == ip || (fcnp->cn_flags | tcnp->cn_flags) & ISDOTDOT) { VOP_UNLOCK(fvp, 0, p); error = EINVAL; goto abortit; } - ip->i_flag |= IN_RENAME; oldparent = dp->i_number; doingdirectory = 1; } @@ -1224,13 +1222,12 @@ return (0); } /* - * Ensure that the directory entry still exists and has not - * changed while the new name has been entered. If the source is - * a file then the entry may have been unlinked or renamed. In - * either case there is no further work to be done. If the source - * is a directory then it cannot have been rmdir'ed; the IN_RENAME - * flag ensures that it cannot be moved by another rename or removed - * by a rmdir. + * The source has been VSOFTLOCKd by the caller, preventing rename + * or rmdir, but not prevent unlink. At the moment we allow the unlink + * race and so do not panic if relookup fails or the inodes do not + * match, because files can be hardlinked and our flag is on the vnode + * rather then the directory entry in the namei cache. But source + * directories must still exist. */ if (xp != ip) { if (doingdirectory) @@ -1248,7 +1245,6 @@ cache_purge(fdvp); } error = ufs_dirremove(fdvp, xp, fcnp->cn_flags, 0); - xp->i_flag &= ~IN_RENAME; } VN_KNOTE(fvp, NOTE_RENAME); if (dp) @@ -1263,13 +1259,10 @@ vput(ITOV(xp)); vput(ITOV(dp)); out: - if (doingdirectory) - ip->i_flag &= ~IN_RENAME; if (vn_lock(fvp, LK_EXCLUSIVE, p) == 0) { ip->i_effnlink--; ip->i_nlink--; ip->i_flag |= IN_CHANGE; - ip->i_flag &= ~IN_RENAME; if (DOINGSOFTDEP(fvp)) softdep_change_linkcnt(ip); vput(fvp); @@ -1503,18 +1496,16 @@ dp = VTOI(dvp); /* - * Do not remove a directory that is in the process of being renamed. * Verify the directory is empty (and valid). Rmdir ".." will not be * valid since ".." will contain a reference to the current directory * and thus be non-empty. Do not allow the removal of mounted on * directories (this can happen when an NFS exported filesystem * tries to remove a locally mounted on directory). + * + * The syscall wrapper already protects us from attempting to remove + * a directory that is undergoing a rename. */ error = 0; - if (ip->i_flag & IN_RENAME) { - error = EINVAL; - goto out; - } if (ip->i_effnlink != 2 || !ufs_dirempty(ip, dp->i_number, cnp->cn_cred)) { error = ENOTEMPTY; To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Tue Oct 2 17: 0:30 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from bogslab.ucdavis.edu (bogslab.ucdavis.edu [169.237.68.34]) by hub.freebsd.org (Postfix) with ESMTP id 7C18037B407 for ; Tue, 2 Oct 2001 17:00:26 -0700 (PDT) Received: from thistle.bogs.org (thistle.bogs.org [198.137.203.61]) by bogslab.ucdavis.edu (8.9.3/8.9.3) with ESMTP id RAA94238 for ; Tue, 2 Oct 2001 17:00:16 -0700 (PDT) (envelope-from greg@bogslab.ucdavis.edu) Received: from thistle.bogs.org (localhost [127.0.0.1]) by thistle.bogs.org (8.11.3/8.11.3) with ESMTP id f92NvnS08486 for ; Tue, 2 Oct 2001 16:57:50 -0700 (PDT) (envelope-from greg@thistle.bogs.org) Message-Id: <200110022357.f92NvnS08486@thistle.bogs.org> To: hackers@FreeBSD.ORG X-To: Giorgos Keramidas X-Sender: owner-freebsd-hackers@FreeBSD.ORG Subject: Re: ALT- (Was: how to make 'for' understand two words as a single argumen) In-reply-to: Your message of "Wed, 03 Oct 2001 02:05:04 +0300." <20011003020504.A16924@hades.hell.gr> Reply-To: gkshenaut@ucdavis.edu Date: Tue, 02 Oct 2001 16:57:49 -0700 From: Greg Shenaut Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG In message <20011003020504.A16924@hades.hell.gr>, Giorgos Keramidas cleopede: >Greg Shenaut wrote: >> >> I just throw out the idea--as for where to enforce such a convention, >> I agree that the file-system definition may not be the best place, >> but it might be the *easiest* place (spaces could be silently mapped >> to 0xa0's). > >Please don't even think about it. When I write a space, I mean a space, and >silently doing things behind my back, is something I have not been used to >expecting from Unix. Right. Easiest is not necessarily best, in this case for exactly your reason. If you want a space in a filename, the Unix tradition clearly favors your having one. But you have to admit, space is a character that has caused many problems in Unix filenames, because of the other Unix tradition of space-delimited word record handling. I usually use an underscore, myself, if I want a space-like separation in a filename, but I could (and have) used 0xa0 for a similar purpose. Just out of curiosity, what would be an instance where you have wanted a space in a filename and wouldn't have been satisfied with 0xa0 instead of 0x20? Greg To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Tue Oct 2 17: 4:26 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from revolt.poohsticks.org (revolt.poohsticks.org [63.227.60.74]) by hub.freebsd.org (Postfix) with ESMTP id 4039937B406 for ; Tue, 2 Oct 2001 17:04:24 -0700 (PDT) Received: from revolt.poohsticks.org (localhost [127.0.0.1]) by revolt.poohsticks.org (8.11.3/8.11.3) with ESMTP id f9304Hs90401; Tue, 2 Oct 2001 18:04:17 -0600 (MDT) (envelope-from drew@revolt.poohsticks.org) Message-Id: <200110030004.f9304Hs90401@revolt.poohsticks.org> To: Dwayne.MacKinnon@xwave.com Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: Memory allocation question In-reply-to: Your message of "Tue, 02 Oct 2001 16:55:28 EDT." <3BBA29C0.5E125DAF@xwave.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <90398.1002067457.1@revolt.poohsticks.org> Date: Tue, 02 Oct 2001 18:04:17 -0600 From: Drew Eckhardt Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG In message <3BBA29C0.5E125DAF@xwave.com>, Dwayne.MacKinnon@xwave.com writes: >Hi, > > I'm creating an app where I want to use memory to store data so I >can get at it quickly. The problem is, I can't afford the delays that >would occur if the memory gets swapped out. Is there any way in FreeBSD >to allocate memory so that the VM system won't swap it out? mlock(2) To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Tue Oct 2 17:12: 2 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from mailsrv.otenet.gr (mailsrv.otenet.gr [195.170.0.5]) by hub.freebsd.org (Postfix) with ESMTP id 2423C37B40C for ; Tue, 2 Oct 2001 17:11:57 -0700 (PDT) Received: from hades.hell.gr (patr530-a047.otenet.gr [212.205.215.47]) by mailsrv.otenet.gr (8.11.5/8.11.5) with ESMTP id f930BrI14981; Wed, 3 Oct 2001 03:11:53 +0300 (EEST) Received: (from charon@localhost) by hades.hell.gr (8.11.6/8.11.6) id f930BqA18014; Wed, 3 Oct 2001 03:11:52 +0300 (EEST) (envelope-from charon@labs.gr) Date: Wed, 3 Oct 2001 03:11:50 +0300 From: Giorgos Keramidas To: Greg Shenaut Cc: hackers@FreeBSD.ORG Subject: Re: ALT- (Was: how to make 'for' understand two words as a single argumen) Message-ID: <20011003031149.B17924@hades.hell.gr> References: <20011003020504.A16924@hades.hell.gr> <200110022357.f92NvnS08486@thistle.bogs.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200110022357.f92NvnS08486@thistle.bogs.org> User-Agent: Mutt/1.3.22.1i X-GPG-Fingerprint: C1EB 0653 DB8B A557 3829 00F9 D60F 941A 3186 03B6 X-URL: http://labs.gr/~charon/ Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Greg Shenaut wrote: > > Just out of curiosity, what would be an instance where you have > wanted a space in a filename and wouldn't have been satisfied with > 0xa0 instead of 0x20? All of them. Space is so conveniently placed under the tip of my thumb. To type 0xa0 I would hav to use exotic keystroke combos like: Left_Alt + Num_1 + Num_6 + Num_0 and that's a real pain to type. -giorgos To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Tue Oct 2 17:43:58 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from wantadilla.lemis.com (wantadilla.lemis.com [192.109.197.80]) by hub.freebsd.org (Postfix) with ESMTP id 76A3137B401 for ; Tue, 2 Oct 2001 17:43:50 -0700 (PDT) Received: by wantadilla.lemis.com (Postfix, from userid 1004) id 1E5316A90F; Wed, 3 Oct 2001 10:14:39 +0930 (CST) Date: Wed, 3 Oct 2001 10:14:39 +0930 From: Greg Lehey To: Julian Elischer Cc: Peter Pentchev , Gersh , Bernd Walter , Anjali Kulkarni , freebsd-hackers@FreeBSD.ORG Subject: Re: setjmp/longjmp Message-ID: <20011003101439.K53406@wantadilla.lemis.com> References: <20011002160414.B10919@ringworld.oblivion.bg> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: ; from julian@elischer.org on Tue, Oct 02, 2001 at 12:43:54PM -0700 Organization: The FreeBSD Project Phone: +61-8-8388-8286 Fax: +61-8-8388-8725 Mobile: +61-418-838-708 WWW-Home-Page: http://www.FreeBSD.org/ X-PGP-Fingerprint: 6B 7B C3 8C 61 CD 54 AF 13 24 52 F8 6D A4 95 EF Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Tuesday, 2 October 2001 at 12:43:54 -0700, Julian Elischer wrote: > > > On Tue, 2 Oct 2001, Peter Pentchev wrote: > >> On Mon, Oct 01, 2001 at 10:56:24AM +0930, Greg Lehey wrote: >>> [Format recovered--see http://www.lemis.com/email/email-format.html] >>> >>> On Friday, 28 September 2001 at 10:12:14 -0700, Julian Elischer wrote: >>>> On Fri, 28 Sep 2001, Gersh wrote: >>>>> On Fri, 28 Sep 2001, Bernd Walter wrote: >>>>>> On Fri, Sep 28, 2001 at 07:03:51PM +0530, Anjali Kulkarni wrote: >>>>>>> Does anyone know whether it is advisable or not to use >>>>>>> setjmp/longjmp within kernel code? I could not see any >>>>>>> setjmp/longjmp in kernel source code. Is there a good reason for >>>>>>> this or can it be used? >>>>>> >>>>>> You need to look again, it's used in several places in the kernel. >>>>> >>>>> Look at sys/i386/i386/db_interface.c >>>> >>>> Yeah but it would probably be a pretty bad idea to use it without >>>> very careful thought. Especialy with the kernel becoming >>>> pre-emptable in the future.. >>> >>> Can you think of a scenario where it wouldn't work? Preemption >>> doesn't tear stacks apart, right? >> >> How about a case of a longjmp() back from under an acquired lock/mutex? >> Like function A sets up a jump buffer, calls function B, B acquires >> a lock, B calls C, C longjmp()'s back to A; what happens to the lock? >> >> It would work if A were aware of B's lock and the possibility of a code >> path that would end up with it still being held; I presume that this is >> what Julian meant by 'very careful thought'. > > pretty much... That's wrong, of course, but I don't see what this has to do with preemptive kernels. This is the same incorrect usages as performing malloc() and then longjmp()ing over the free(). Greg -- 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 Tue Oct 2 19:14:43 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from peter3.wemm.org (c1315225-a.plstn1.sfba.home.com [24.14.150.180]) by hub.freebsd.org (Postfix) with ESMTP id 8922737B409; Tue, 2 Oct 2001 19:14:35 -0700 (PDT) Received: from overcee.netplex.com.au (overcee.wemm.org [10.0.0.3]) by peter3.wemm.org (8.11.0/8.11.0) with ESMTP id f932EZM51266; Tue, 2 Oct 2001 19:14:35 -0700 (PDT) (envelope-from peter@wemm.org) Received: from wemm.org (localhost [127.0.0.1]) by overcee.netplex.com.au (Postfix) with ESMTP id 0EE48380A; Tue, 2 Oct 2001 19:14:35 -0700 (PDT) (envelope-from peter@wemm.org) X-Mailer: exmh version 2.3.1 01/18/2001 with nmh-1.0.4 To: Matt Dillon Cc: Ian Dowse , Yevgeniy Aleynikov , ache@FreeBSD.ORG, mckusick@mckusick.com, Ken Pizzini , hackers@FreeBSD.ORG Subject: Re: patch #3 (was Re: bleh. Re: ufs_rename panic) In-Reply-To: <200110022312.f92NCpp60948@earth.backplane.com> Date: Tue, 02 Oct 2001 19:14:35 -0700 From: Peter Wemm Message-Id: <20011003021435.0EE48380A@overcee.netplex.com.au> Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Matt Dillon wrote: > Here is the latest patch I have. It appears to completely solve the > problem. I have shims in unionfs and nfs for the moment. This seems rather large compared to Ian Dowse's version.. Are you sure that you're doing this the right way? Adding a whole new locking mechanism when the simple VRENAME flag to be enough seems like a bit of overkill.. I'm not criticizing your work, I am just wondering if you have considered Ian's work and feel that it is wrong or the wrong direction.. His certainly appears more elegant than yours so I want to understand why you feel yours is better than his. freebsd-hackers Message-id: <200110022152.aa36964@salmon.maths.tcd.ie> 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 Oct 2 19:24:22 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from earth.backplane.com (earth-nat-cw.backplane.com [208.161.114.67]) by hub.freebsd.org (Postfix) with ESMTP id 784DD37B406; Tue, 2 Oct 2001 19:24:19 -0700 (PDT) Received: (from dillon@localhost) by earth.backplane.com (8.11.6/8.11.2) id f932OIO62159; Tue, 2 Oct 2001 19:24:18 -0700 (PDT) (envelope-from dillon) Date: Tue, 2 Oct 2001 19:24:18 -0700 (PDT) From: Matt Dillon Message-Id: <200110030224.f932OIO62159@earth.backplane.com> To: Peter Wemm Cc: Ian Dowse , Yevgeniy Aleynikov , ache@FreeBSD.ORG, mckusick@mckusick.com, Ken Pizzini , hackers@FreeBSD.ORG Subject: Re: patch #3 (was Re: bleh. Re: ufs_rename panic) References: <20011003021435.0EE48380A@overcee.netplex.com.au> Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG : :Matt Dillon wrote: :> Here is the latest patch I have. It appears to completely solve the :> problem. I have shims in unionfs and nfs for the moment. : :This seems rather large compared to Ian Dowse's version.. Are you sure that :you're doing this the right way? Adding a whole new locking mechanism :when the simple VRENAME flag to be enough seems like a bit of overkill.. Ian's doesn't fix any of the filesystem semantics bugs, it only prevents the panic from occuring. For example, if you have two hardlinked files residing in different directories both get renamed simultaniously, one of the rename()s can fail even though there is no conflict. If you have a simultanious rmdir() and rename(), the rename() can return an unexpected error code. And so forth. If you remove the filesystem semantics fixes from my patch you essentially get Ian's patch except that I integrated the vnode flag in namei/lookup whereas Ian handles it manually in the syscall code. Also, Ian's patch only effects system calls. It doesn't do the same fixes for nfs (server side) or unionfs. -Matt :I'm not criticizing your work, I am just wondering if you have considered :Ian's work and feel that it is wrong or the wrong direction.. His certainly :appears more elegant than yours so I want to understand why you feel yours :is better than his. : :freebsd-hackers :Message-id: <200110022152.aa36964@salmon.maths.tcd.ie> : :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 Oct 2 19:38:35 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from InterJet.elischer.org (c421509-a.pinol1.sfba.home.com [24.7.86.9]) by hub.freebsd.org (Postfix) with ESMTP id AC6CB37B403 for ; Tue, 2 Oct 2001 19:38:32 -0700 (PDT) Received: from localhost (localhost.elischer.org [127.0.0.1]) by InterJet.elischer.org (8.9.1a/8.9.1) with ESMTP id UAA94255 for ; Tue, 2 Oct 2001 20:22:18 -0700 (PDT) Date: Tue, 2 Oct 2001 20:22:17 -0700 (PDT) From: Julian Elischer To: hackers@freebsd.org Subject: pkg_create help needed. Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG I need to take a directory of 'stuff' which includes a script install.sh and make it into a package.. I have had some success but it's not quite right.. What I'd like to make it do is: unpack the 'stuff' into a temporary directory somewhere. run the install script delete the install directory The trouble is that I can't work out how to get the files unpacked there and have the install script get them from there.. I can get it to unpack them into the final locations, and I can get the install script to run and find them there, but I need the install script to modify stuff and I'd rather have it all done in the temp directory if possible, and then istalled into the final location.. also I have can not make the @srcdir option work in the packing list.. does it work? (-s seems to work) julian To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Tue Oct 2 20:30: 7 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from bogslab.ucdavis.edu (bogslab.ucdavis.edu [169.237.68.34]) by hub.freebsd.org (Postfix) with ESMTP id 8C82037B403 for ; Tue, 2 Oct 2001 20:30:01 -0700 (PDT) Received: from thistle.bogs.org (thistle.bogs.org [198.137.203.61]) by bogslab.ucdavis.edu (8.9.3/8.9.3) with ESMTP id UAA94856 for ; Tue, 2 Oct 2001 20:29:59 -0700 (PDT) (envelope-from greg@bogslab.ucdavis.edu) Received: from thistle.bogs.org (localhost [127.0.0.1]) by thistle.bogs.org (8.11.3/8.11.3) with ESMTP id f933RXS08792 for ; Tue, 2 Oct 2001 20:27:33 -0700 (PDT) (envelope-from greg@thistle.bogs.org) Message-Id: <200110030327.f933RXS08792@thistle.bogs.org> To: hackers@FreeBSD.ORG X-To: Giorgos Keramidas X-Sender: owner-freebsd-hackers@FreeBSD.ORG Subject: Re: ALT- (Was: how to make 'for' understand two words as a single argumen) In-reply-to: Your message of "Wed, 03 Oct 2001 03:11:50 +0300." <20011003031149.B17924@hades.hell.gr> Reply-To: gkshenaut@ucdavis.edu Date: Tue, 02 Oct 2001 20:27:33 -0700 From: Greg Shenaut Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG In message <20011003031149.B17924@hades.hell.gr>, Giorgos Keramidas cleopede: >Greg Shenaut wrote: >> >> Just out of curiosity, what would be an instance where you have >> wanted a space in a filename and wouldn't have been satisfied with >> 0xa0 instead of 0x20? > >All of them. Space is so conveniently placed under the tip of my thumb. >To type 0xa0 I would hav to use exotic keystroke combos like: > > Left_Alt + Num_1 + Num_6 + Num_0 > >and that's a real pain to type. I just type ALT(space). It's even easier than SHIFT(-) (underscore). Anyway, I have found using 0xa0 (and underscore) very handy to prevent the kinds of contortions necessary when dealing with filenames and other text using word-oriented tools. I really don't think that space characters belong in filenames, but that's just my opinion. Greg Shenaut To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Tue Oct 2 21:27:48 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from rover.village.org (rover.bsdimp.com [204.144.255.66]) by hub.freebsd.org (Postfix) with ESMTP id 4267037B403 for ; Tue, 2 Oct 2001 21:27:45 -0700 (PDT) Received: from harmony.village.org (harmony.village.org [10.0.0.6]) by rover.village.org (8.11.3/8.11.3) with ESMTP id f934Riu76717; Tue, 2 Oct 2001 22:27:44 -0600 (MDT) (envelope-from imp@harmony.village.org) Received: from harmony.village.org (localhost [127.0.0.1]) by harmony.village.org (8.11.6/8.11.6) with ESMTP id f934Rg718394; Tue, 2 Oct 2001 22:27:43 -0600 (MDT) (envelope-from imp@harmony.village.org) Message-Id: <200110030427.f934Rg718394@harmony.village.org> To: Giorgos Keramidas Subject: Re: ALT- (Was: how to make 'for' understand two words as a single argumen) Cc: Greg Shenaut , hackers@FreeBSD.ORG In-reply-to: Your message of "Wed, 03 Oct 2001 02:05:04 +0300." <20011003020504.A16924@hades.hell.gr> References: <20011003020504.A16924@hades.hell.gr> <20011002185518.A335@firedrake.org> <200110021841.f92IfVS07537@thistle.bogs.org> Date: Tue, 02 Oct 2001 22:27:42 -0600 From: Warner Losh Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG In message <20011003020504.A16924@hades.hell.gr> Giorgos Keramidas writes: : Greg Shenaut wrote: : > : > I just throw out the idea--as for where to enforce such a convention, : > I agree that the file-system definition may not be the best place, : > but it might be the *easiest* place (spaces could be silently mapped : > to 0xa0's). : : Please don't even think about it. When I write a space, I mean a space, and : silently doing things behind my back, is something I have not been used to : expecting from Unix. Too much would break if you were to do force the filesystem to reject/map spaces like that. Warner To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Tue Oct 2 21:31: 9 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from rover.village.org (rover.bsdimp.com [204.144.255.66]) by hub.freebsd.org (Postfix) with ESMTP id 735C237B401 for ; Tue, 2 Oct 2001 21:31:05 -0700 (PDT) Received: from harmony.village.org (harmony.village.org [10.0.0.6]) by rover.village.org (8.11.3/8.11.3) with ESMTP id f934V4u76744; Tue, 2 Oct 2001 22:31:04 -0600 (MDT) (envelope-from imp@harmony.village.org) Received: from harmony.village.org (localhost [127.0.0.1]) by harmony.village.org (8.11.6/8.11.6) with ESMTP id f934V4718445; Tue, 2 Oct 2001 22:31:04 -0600 (MDT) (envelope-from imp@harmony.village.org) Message-Id: <200110030431.f934V4718445@harmony.village.org> To: gkshenaut@ucdavis.edu Subject: Re: ALT- (Was: how to make 'for' understand two words as a single argumen) Cc: hackers@FreeBSD.ORG In-reply-to: Your message of "Tue, 02 Oct 2001 16:57:49 PDT." <200110022357.f92NvnS08486@thistle.bogs.org> References: <200110022357.f92NvnS08486@thistle.bogs.org> Date: Tue, 02 Oct 2001 22:31:03 -0600 From: Warner Losh Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG In message <200110022357.f92NvnS08486@thistle.bogs.org> Greg Shenaut writes: : But you have to admit, space is a character that has caused many : problems in Unix filenames, because of the other Unix tradition of : space-delimited word record handling. I usually use an underscore, : myself, if I want a space-like separation in a filename, but I : could (and have) used 0xa0 for a similar purpose. : : Just out of curiosity, what would be an instance where you have : wanted a space in a filename and wouldn't have been satisfied with : 0xa0 instead of 0x20? Where 0xa0 doesn't exist in the local? To be honest, up until this thread I'd never heard of ASCII defining a unbreakable space as 0xa0. That's because ASCII doesn't define it (but ISO 8859-1 might). I also have a bad feeling that this might have implications for NFS file systems as well where 0xa0 and 0x20 might mean different things to the remote host. And what about '"`~<>?[]{}\|)(*&^$ as well. All of these (and maybe others) can cause problems as well. In short, fix the broken shell scripts, not the filesystem. You aren't fixing the real problem, just one small slice of it. Warner To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Tue Oct 2 22:40:51 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from guru.mired.org (okc-65-31-203-60.mmcable.com [65.31.203.60]) by hub.freebsd.org (Postfix) with SMTP id 9739037B405 for ; Tue, 2 Oct 2001 22:40:48 -0700 (PDT) Received: (qmail 32836 invoked by uid 100); 3 Oct 2001 05:40:42 -0000 From: Mike Meyer MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Message-ID: <15290.42202.766797.460932@guru.mired.org> Date: Wed, 3 Oct 2001 00:40:42 -0500 To: gkshenaut@ucdavis.edu Cc: hackers@FreeBSD.ORG Subject: Re: ALT- (Was: how to make 'for' understand two words as a single argumen) In-Reply-To: <200110021841.f92IfVS07537@thistle.bogs.org> References: <20011002185518.A335@firedrake.org> <200110021841.f92IfVS07537@thistle.bogs.org> X-Mailer: VM 6.90 under 21.1 (patch 14) "Cuyahoga Valley" XEmacs Lucid X-face: "5Mnwy%?j>IIV\)A=):rjWL~NB2aH[}Yq8Z=u~vJ`"(,&SiLvbbz2W`;h9L,Yg`+vb1>RG% *h+%X^n0EZd>TM8_IB;a8F?(Fb"lw'IgCoyM.[Lg#r\ Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Greg Shenaut types: > In message <20011002185518.A335@firedrake.org>, void cleopede: > >On Tue, Oct 02, 2001 at 07:19:37AM -0700, Greg Shenaut wrote: > >> Is there any reason why the "unbreakable space" (0xa0) shouldn't b= e > >> the only kind of space character used/allowed in filenames? > >Any character except for '/' is allowed in filenames, and I believe = it's > >been that way since the dawn of time. You can't use nul either, and both have been true since v6. > Yes, but I mention it because if 0xa0 were used instead of space > in filenames, then they wouldn't be split into several arguments > and nothing special would need to be done in "for=A0x=A0in=A0*=A0;" l= oops > or elsewhere to handle them, but the names would still look the same > to users. All the other characters that are magic to the shell - newline being the obvious example - will still cause problems. If you're going to use this to solve the problem, you need to go to something live VMS or MVS, and limit file names to alphanumerics plus a small set of delimiters. The usual solution for this kind of thing is to extend the shell. Shell scripts kept breaking trying tod deal with arguments with strange characters in them until the "$@" mechanism was added. I wonder how many scripts would break - or stop breaking :-) if we changed the shell so that "*" expanded like "$@"? =09=09=09=09http://www.mired.org/home/mwm/ Q: How do you make the gods laugh?=09=09A: Tell them your plans. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Tue Oct 2 22:52:15 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from earth.backplane.com (earth-nat-cw.backplane.com [208.161.114.67]) by hub.freebsd.org (Postfix) with ESMTP id ECD1537B405 for ; Tue, 2 Oct 2001 22:52:12 -0700 (PDT) Received: (from dillon@localhost) by earth.backplane.com (8.11.6/8.11.2) id f935q5j63360; Tue, 2 Oct 2001 22:52:05 -0700 (PDT) (envelope-from dillon) Date: Tue, 2 Oct 2001 22:52:05 -0700 (PDT) From: Matt Dillon Message-Id: <200110030552.f935q5j63360@earth.backplane.com> To: Maxime Henrion Cc: Dwayne , freebsd-hackers@FreeBSD.ORG Subject: Re: Memory allocation question References: <3BBA29C0.5E125DAF@xwave.com> <20011002233851.A1317@nebula.cybercable.fr> Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG : :Dwayne wrote: :> I'm creating an app where I want to use memory to store data so I :> can get at it quickly. The problem is, I can't afford the delays that :> would occur if the memory gets swapped out. Is there any way in FreeBSD :> to allocate memory so that the VM system won't swap it out? :> :I think mlock(2) is what you want. : :Maxime Henrion :-- :Don't be fooled by cheap finnish imitations ; BSD is the One True Code Don't use mlock(). Use SysV Shared memory segments. If you tell the kernel to use physical ram for SysV shared memory (kern.ipc.shm_use_phys=1) then any shm segments you allocate (see manual pages for shmctl, shmget, and shmat) will reside in unswappable shared memory. -Matt To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Tue Oct 2 22:55:36 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from ip.eth.net (mail.ip.eth.net [202.9.128.18]) by hub.freebsd.org (Postfix) with ESMTP id CB72D37B405; Tue, 2 Oct 2001 22:55:29 -0700 (PDT) Received: (apparently) from anjali ([61.11.16.239]) by ip.eth.net with Microsoft SMTPSVC(5.5.1877.197.19); Wed, 3 Oct 2001 11:24:46 +0530 Message-ID: <009801c14bcf$d63e5fd0$0a00a8c0@indranet> From: "Anjali Kulkarni" To: "Greg Lehey" , "Julian Elischer" Cc: "Peter Pentchev" , "Gersh" , "Bernd Walter" , References: <20011002160414.B10919@ringworld.oblivion.bg> <20011003101439.K53406@wantadilla.lemis.com> Subject: Re: setjmp/longjmp Date: Wed, 3 Oct 2001 11:24:08 +0530 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.50.4807.1700 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4807.1700 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Right, that was my question too, doesent seem connected with pre-emptive kernels... ----- Original Message ----- From: "Greg Lehey" To: "Julian Elischer" Cc: "Peter Pentchev" ; "Gersh" ; "Bernd Walter" ; "Anjali Kulkarni" ; Sent: Wednesday, October 03, 2001 6:14 AM Subject: Re: setjmp/longjmp > On Tuesday, 2 October 2001 at 12:43:54 -0700, Julian Elischer wrote: > > > > > > On Tue, 2 Oct 2001, Peter Pentchev wrote: > > > >> On Mon, Oct 01, 2001 at 10:56:24AM +0930, Greg Lehey wrote: > >>> [Format recovered--see http://www.lemis.com/email/email-format.html] > >>> > >>> On Friday, 28 September 2001 at 10:12:14 -0700, Julian Elischer wrote: > >>>> On Fri, 28 Sep 2001, Gersh wrote: > >>>>> On Fri, 28 Sep 2001, Bernd Walter wrote: > >>>>>> On Fri, Sep 28, 2001 at 07:03:51PM +0530, Anjali Kulkarni wrote: > >>>>>>> Does anyone know whether it is advisable or not to use > >>>>>>> setjmp/longjmp within kernel code? I could not see any > >>>>>>> setjmp/longjmp in kernel source code. Is there a good reason for > >>>>>>> this or can it be used? > >>>>>> > >>>>>> You need to look again, it's used in several places in the kernel. > >>>>> > >>>>> Look at sys/i386/i386/db_interface.c > >>>> > >>>> Yeah but it would probably be a pretty bad idea to use it without > >>>> very careful thought. Especialy with the kernel becoming > >>>> pre-emptable in the future.. > >>> > >>> Can you think of a scenario where it wouldn't work? Preemption > >>> doesn't tear stacks apart, right? > >> > >> How about a case of a longjmp() back from under an acquired lock/mutex? > >> Like function A sets up a jump buffer, calls function B, B acquires > >> a lock, B calls C, C longjmp()'s back to A; what happens to the lock? > >> > >> It would work if A were aware of B's lock and the possibility of a code > >> path that would end up with it still being held; I presume that this is > >> what Julian meant by 'very careful thought'. > > > > pretty much... > > That's wrong, of course, but I don't see what this has to do with > preemptive kernels. This is the same incorrect usages as performing > malloc() and then longjmp()ing over the free(). > > Greg > -- > 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 Tue Oct 2 23:10:48 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from beastie.mckusick.com (beastie.mckusick.com [209.31.233.184]) by hub.freebsd.org (Postfix) with ESMTP id 7924037B403; Tue, 2 Oct 2001 23:10:46 -0700 (PDT) Received: from beastie.mckusick.com (localhost [127.0.0.1]) by beastie.mckusick.com (8.11.4/8.9.3) with ESMTP id f936AbR11859; Tue, 2 Oct 2001 23:10:37 -0700 (PDT) (envelope-from mckusick@beastie.mckusick.com) Message-Id: <200110030610.f936AbR11859@beastie.mckusick.com> To: Ian Dowse Cc: Matt Dillon , Yevgeniy Aleynikov , peter@FreeBSD.ORG, ache@FreeBSD.ORG, Ken Pizzini , hackers@FreeBSD.ORG Subject: Re: bleh. Re: ufs_rename panic In-Reply-To: Your message of "Tue, 02 Oct 2001 21:52:48 BST." <200110022152.aa36964@salmon.maths.tcd.ie> Date: Tue, 02 Oct 2001 23:10:37 -0700 From: Kirk McKusick Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG The problems all arise from the fact that we unlock the source while we look up the destination, and when we return to relookup the source, it may have changed/moved/disappeared. The reason to unlock the source before looking up the destination was to avoid deadlocking against ourselves on a lock that we held associated with the source. Since we now allow recursive locks on vnodes, it is no longer necessary to release the source before looking up the destination. So, it seems to me that the correct fix is to *not* release the source after looking it up, but rather hold it locked while we look up the destination. We can completely get rid of relookup and lots of other hairy code and generally make rename much simpler. Am I missing something here? ~Kirk To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Tue Oct 2 23:26:13 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from earth.backplane.com (earth-nat-cw.backplane.com [208.161.114.67]) by hub.freebsd.org (Postfix) with ESMTP id BA44637B403; Tue, 2 Oct 2001 23:26:03 -0700 (PDT) Received: (from dillon@localhost) by earth.backplane.com (8.11.6/8.11.2) id f936Pq363645; Tue, 2 Oct 2001 23:25:52 -0700 (PDT) (envelope-from dillon) Date: Tue, 2 Oct 2001 23:25:52 -0700 (PDT) From: Matt Dillon Message-Id: <200110030625.f936Pq363645@earth.backplane.com> To: Kirk McKusick Cc: Ian Dowse , Yevgeniy Aleynikov , peter@FreeBSD.ORG, ache@FreeBSD.ORG, Ken Pizzini , hackers@FreeBSD.ORG Subject: Re: bleh. Re: ufs_rename panic References: <200110030610.f936AbR11859@beastie.mckusick.com> Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG :The problems all arise from the fact that we unlock the source :while we look up the destination, and when we return to relookup :the source, it may have changed/moved/disappeared. The reason to :unlock the source before looking up the destination was to avoid :deadlocking against ourselves on a lock that we held associated :with the source. Since we now allow recursive locks on vnodes, it :is no longer necessary to release the source before looking up :the destination. So, it seems to me that the correct fix is to :*not* release the source after looking it up, but rather hold it :locked while we look up the destination. We can completely get :rid of relookup and lots of other hairy code and generally make :rename much simpler. Am I missing something here? : : ~Kirk That was the first thing I thought of, but unfortunately it is still possible to deadlock against another process... for example, a process doing an (unrelated) rename in the reverse direction. -Matt To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Wed Oct 3 2:48:40 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from web20010.mail.yahoo.com (web20010.mail.yahoo.com [216.136.225.73]) by hub.freebsd.org (Postfix) with SMTP id 8D77937B407 for ; Wed, 3 Oct 2001 02:48:32 -0700 (PDT) Message-ID: <20011003094832.34929.qmail@web20010.mail.yahoo.com> Received: from [193.123.204.66] by web20010.mail.yahoo.com via HTTP; Wed, 03 Oct 2001 10:48:32 BST Date: Wed, 3 Oct 2001 10:48:32 +0100 (BST) From: =?iso-8859-1?q?Gavin=20Kenny?= Subject: Arp and two pccard NICs To: hackers@freebsd.org, net@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Hi, I have upgraded to 4.4 and I am trying to get my two pccard NICs to work at the same time. I've done some investigateing, but I'm not sure where to go next. both cards are the same make; Xircom 10/100 and both are detected and correctly configured upon insertion. I can assign IP addresses to both and ping each and get a response. xe0 works fine. xe1 has problems; first of all arp does not seem to run on this card, all I get if I try to ping another machine is a pause and then "host is down" - using tcpdump I see a single "who-has" message go out - the other machines gets it and replies but the reply is not recieved. If I manually update the arp table using arp -s and then try to ping, the echo request goes out, the other machine recieves it and responds but again the response does not seem to get through. While this is happening I get "xe1: watchdog timeout; resetting card" repeating in the console window. I've swapped cards, cables and slots (xe0 and xe1 are dependant on which card is inserted first). what am I getting wrong? Gavin p.s. please cc me as I am not a member of this list. ____________________________________________________________ Do You Yahoo!? Get your free @yahoo.co.uk address at http://mail.yahoo.co.uk or your free @yahoo.ie address at http://mail.yahoo.ie To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Wed Oct 3 4:23: 7 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from salmon.maths.tcd.ie (salmon.maths.tcd.ie [134.226.81.11]) by hub.freebsd.org (Postfix) with SMTP id 02A5A37B405; Wed, 3 Oct 2001 04:23:03 -0700 (PDT) Received: from walton.maths.tcd.ie by salmon.maths.tcd.ie with SMTP id ; 3 Oct 2001 12:23:02 +0100 (BST) To: Matt Dillon Cc: Peter Wemm , Yevgeniy Aleynikov , ache@FreeBSD.ORG, mckusick@mckusick.com, Ken Pizzini , hackers@FreeBSD.ORG Subject: Re: patch #3 (was Re: bleh. Re: ufs_rename panic) In-Reply-To: Your message of "Tue, 02 Oct 2001 19:24:18 PDT." <200110030224.f932OIO62159@earth.backplane.com> Date: Wed, 03 Oct 2001 12:23:00 +0100 From: Ian Dowse Message-ID: <200110031223.aa26174@salmon.maths.tcd.ie> Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG In message <200110030224.f932OIO62159@earth.backplane.com>, Matt Dillon writes: > >:This seems rather large compared to Ian Dowse's version.. Are you sure that >:you're doing this the right way? Adding a whole new locking mechanism >:when the simple VRENAME flag to be enough seems like a bit of overkill.. Matt addresses the problem more completely than my patch does, so the differences in patch size and files touched are to be expected. In particular, the NFS server and unionfs code need to be changed in the same way as the syscalls, and the IN_RENAME flag can be removed from the ufs code, both of which are included in Matt's patch. > Ian's doesn't fix any of the filesystem semantics bugs, it only prevents > the panic from occuring. This is certainly correct, though the IN_RENAME flag in the UFS code currently has a few such semantics bugs where EINVAL can be returned in cases that would succeed if rename() was atomic. When a vnode cannot be renamed/unlinked/rmdir'd because it is being renamed, the operation should be retried until it succeeds, sleeping as necessary. As I understand it, this is mostly dealt with by Matt's patch, but not at all by mine. > If you remove the filesystem semantics fixes from my patch you > essentially get Ian's patch except that I integrated the vnode flag > in namei/lookup whereas Ian handles it manually in the syscall code. The addition of the SOFTLOCKLEAF code is quite a major change, so it would be very useful if you could describe exactly what it does, what its semantics are, and how it fits into the rename problem. My understanding of the problem is that VOP_RENAME is quite unique in that it is the only VOP that must modify entries in two separate directories. To avoid deadlock, it is not possible (very hard anyway) to lock all 4 vnodes (source node, source parent, target node, target parent) before calling VOP_RENAME. Instead, the approach taken is to lock only the target node and its parent, and have the VOP_RENAME implementation jump back and forth between locking the source and locking the target as necessary. Hence VOP_RENAME is the only VOP that must modify a node that is passed in unlocked. Because the source node and parent are not locked, there is the possibility that the source node could be renamed or removed at any time before VOP_RENAME finally gets around to locking it and removing it. Something needs to protect the source node against being renamed/removed between the point that the source node is initially looked up and the point that it is finally locked. Both Matt's SOFTLOCKLEAF and the VRENAME flag are there to provide this protection. It is the fact that this problem is entirely unique to VOP_RENAME that leads me to think that adding the generic SOFTLOCKLEAF code is overkill. The following fragment also suggests that maybe the approach doesn't actually fit in that well: fromnd.ni_cnd.cn_flags &= ~SOFTLOCKLEAF; /* XXX hack */ error = VOP_RENAME(fromnd.ni_dvp, fromnd.ni_vp, &fromnd.ni_cnd, tond.ni_dvp, tond.ni_vp, &tond.ni_cnd); fromnd.ni_cnd.cn_flags |= SOFTLOCKLEAF; NDFREE(&fromnd, NDF_ONLY_PNBUF & NDF_ONLY_SOFTLOCKLEAF); The way that vclearsoftlock() is used to clear a flag in an unlocked vnode is also not ideal. This should probably be protected at least by v_interlock as other flags are. The syscalls that need to be changed (rename, unlink, rmdir) could possibly use vn_* style wrapper functions to reduce the amount of code that must understand the new locking mechanism, although I'm not sure if this is practical for the NFS case. It might also be a good time to remove the WILLRELE from VOP_RENAME, which would simplify some of the surrounding code. Ian To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Wed Oct 3 4:40:44 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from newsguy.com (smtp.newsguy.com [209.155.56.71]) by hub.freebsd.org (Postfix) with ESMTP id 1FA5B37B403 for ; Wed, 3 Oct 2001 04:40:42 -0700 (PDT) Received: from newsguy.com (ppp232-bsace7002.telebrasilia.net.br [200.181.81.232]) by newsguy.com (8.9.1a/8.9.1) with ESMTP id EAA51001; Wed, 3 Oct 2001 04:40:23 -0700 (PDT) Message-ID: <3BBAFA44.14AE7BC3@newsguy.com> Date: Wed, 03 Oct 2001 08:45:08 -0300 From: "Daniel C. Sobral" X-Mailer: Mozilla 4.77 [en] (Win98; U) X-Accept-Language: en,pt-BR,pt,en-GB,en-US,ja MIME-Version: 1.0 To: gkshenaut@ucdavis.edu Cc: hackers@FreeBSD.ORG Subject: Re: ALT- (Was: how to make 'for' understand two words as a single argumen) References: <200110022357.f92NvnS08486@thistle.bogs.org> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Greg Shenaut wrote: > > Right. Easiest is not necessarily best, in this case for exactly > your reason. If you want a space in a filename, the Unix tradition > clearly favors your having one. > > But you have to admit, space is a character that has caused many > problems in Unix filenames, because of the other Unix tradition of > space-delimited word record handling. I usually use an underscore, > myself, if I want a space-like separation in a filename, but I > could (and have) used 0xa0 for a similar purpose. > > Just out of curiosity, what would be an instance where you have > wanted a space in a filename and wouldn't have been satisfied with > 0xa0 instead of 0x20? What I most do not understand this is what does a-acute (0xa0) have to do with space? -- Daniel C. Sobral (8-DCS) dcs@newsguy.com dcs@freebsd.org capo@the.secret.bsdconspiracy.net wow regex humor... I'm a geek To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Wed Oct 3 7:49:16 2001 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 17CD037B406; Wed, 3 Oct 2001 07:49:09 -0700 (PDT) Received: from onyx (onyx.cs.binghamton.edu [128.226.140.171]) by bingnet2.cc.binghamton.edu (8.11.4/8.11.4) with ESMTP id f93Emmk22740; Wed, 3 Oct 2001 10:48:48 -0400 (EDT) Date: Wed, 3 Oct 2001 10:48:14 -0400 (EDT) From: Zhihui Zhang X-Sender: zzhang@onyx To: Matt Dillon Cc: Peter Wemm , Ian Dowse , Yevgeniy Aleynikov , ache@FreeBSD.ORG, mckusick@mckusick.com, Ken Pizzini , hackers@FreeBSD.ORG Subject: Re: patch #3 (was Re: bleh. Re: ufs_rename panic) In-Reply-To: <200110030224.f932OIO62159@earth.backplane.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG The rename routine is probably the most convoluted in the entire file system code (FFS). Now that everybody's memory is fresh, I would like to ask something about it: (1) I am always wondering why not use a global rename lock so that there is only one rename operation in progress at any time. This method is used by GFS and probably Linux. This could make the code simply. Maybe we can even get rid of the relookup() stuff. This may reduce concurrency, but rename should not be a frequent operation. (2) In the code of 4.3-release, we grab the source inode while holding the locks of target inodes. In ufs_rename(), we have: if ((error = vn_lock(fvp, LK_EXCLUSIVE, p)) != 0) goto abortit; I wonder whether this could cause deadlock. I think locking more than one inode should be done in some sequence (ie. order them by inode number). (3) Matt says "For example, if you have two hardlinked files residing in different directories both get renamed simultaniously, one of the rename()s can fail even though there is no conflict Can you explain this a little bit more? (4) This is not related to rename(). But ufs_mknod() reload the inode through VFS_VGET() to avoid duplicate aliases. I can not see why it is necessary. I asked this before, but have not got any satisfactory responses. Any ideas are welcome. Thanks, -Zhihui On Tue, 2 Oct 2001, Matt Dillon wrote: > > : > :Matt Dillon wrote: > :> Here is the latest patch I have. It appears to completely solve the > :> problem. I have shims in unionfs and nfs for the moment. > : > :This seems rather large compared to Ian Dowse's version.. Are you sure that > :you're doing this the right way? Adding a whole new locking mechanism > :when the simple VRENAME flag to be enough seems like a bit of overkill.. > > Ian's doesn't fix any of the filesystem semantics bugs, it only prevents > the panic from occuring. For example, if you have two hardlinked files > residing in different directories both get renamed simultaniously, one > of the rename()s can fail even though there is no conflict. If you > have a simultanious rmdir() and rename(), the rename() can return an > unexpected error code. And so forth. > > If you remove the filesystem semantics fixes from my patch you > essentially get Ian's patch except that I integrated the vnode flag > in namei/lookup whereas Ian handles it manually in the syscall code. > > Also, Ian's patch only effects system calls. It doesn't do the same > fixes for nfs (server side) or unionfs. > > -Matt > > :I'm not criticizing your work, I am just wondering if you have considered > :Ian's work and feel that it is wrong or the wrong direction.. His certainly > :appears more elegant than yours so I want to understand why you feel yours > :is better than his. > : > :freebsd-hackers > :Message-id: <200110022152.aa36964@salmon.maths.tcd.ie> > : > :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 > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Wed Oct 3 9:12:44 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from mx.wgate.com (mail.wgate.com [38.219.83.4]) by hub.freebsd.org (Postfix) with SMTP id 37AFA37B401 for ; Wed, 3 Oct 2001 09:12:39 -0700 (PDT) To: Warner Losh Cc: gkshenaut@ucdavis.edu, hackers@FreeBSD.ORG Received: From MAIL.TVOL.NET (10.1.1.4[10.1.1.4 port:1734]) by mx.wgate.comMail essentials (server 2.429) with SMTP id: <34671@mx.wgate.com>transfer for ; Wed, 3 Oct 2001 12:11:05 PM -0400 ;transfer smtpmailfrom X-MESINK_Inbound: 0 X-MESINK_MailForType: SMTP X-MESINK_SenderType: SMTP X-MESINK_Sender: msinz@wgate.com X-MESINK_MailFor: hackers@FreeBSD.ORG Received: from sinz.eng.tvol.net ([10.32.2.99]) by mail.tvol.net with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2653.13)id 4BW3ALS8; Wed, 3 Oct 2001 12:11:12 -0400 Received: from wgate.com (localhost [127.0.0.1])by sinz.eng.tvol.net (8.11.6/8.11.6) with ESMTP id f93GCNs28240;Wed, 3 Oct 2001 12:12:23 -0400 (EDT)(envelope-from msinz@wgate.com) Date: Wed, 03 Oct 2001 12:12:23 -0400 From: Michael Sinz Organization: WorldGate Communications Inc. X-Mailer: Mozilla 4.76 [en] (X11; U; FreeBSD 4.3-STABLE i386) X-Accept-Language: en Subject: Re: ALT- (Was: how to make 'for' understand two words as a singleargumen) References: <200110022357.f92NvnS08486@thistle.bogs.org> <7fffe3770386f507d1@[192.168.1.4]> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit x-receiver: hackers@FreeBSD.ORG x-sender: msinz@wgate.com MIME-Version: 1.0 Message-ID: <7ffffcf203a07007d1@[192.168.1.4]> Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Warner Losh wrote: > > In message <200110022357.f92NvnS08486@thistle.bogs.org> Greg Shenaut writes: > : But you have to admit, space is a character that has caused many > : problems in Unix filenames, because of the other Unix tradition of > : space-delimited word record handling. I usually use an underscore, > : myself, if I want a space-like separation in a filename, but I > : could (and have) used 0xa0 for a similar purpose. > : > : Just out of curiosity, what would be an instance where you have > : wanted a space in a filename and wouldn't have been satisfied with > : 0xa0 instead of 0x20? > > Where 0xa0 doesn't exist in the local? To be honest, up until this > thread I'd never heard of ASCII defining a unbreakable space as 0xa0. > That's because ASCII doesn't define it (but ISO 8859-1 might). I also > have a bad feeling that this might have implications for NFS file > systems as well where 0xa0 and 0x20 might mean different things to the > remote host. And I would hope that we don't get into the mapping of characters in the filesystem. Especially when some people read the characters of a filename and push them through something like shifjis (Japan) and get something completely different. BTW - How does your system represent a file with 0xA0 in it? An ls on FreeBSD 4.4-Stable seems to show it as: -rw-r--r-- 1 msinz msinz 0 Oct 3 12:00 foo?bar Interesting - not what I would have expected but I think "non-printables" are replaced by the "?" when ls runs. Even more interesting is this: -rw-r--r-- 1 msinz msinz 0 Oct 3 12:00 foo?bar -rw-r--r-- 1 msinz msinz 1 Oct 3 12:05 foo?bar (one has a linefeed in the name and one has a non-breaking space in the name) -- Michael Sinz ---- Worldgate Communications ---- msinz@wgate.com A master's secrets are only as good as the master's ability to explain them to others. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Wed Oct 3 10:45:34 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from earth.backplane.com (earth-nat-cw.backplane.com [208.161.114.67]) by hub.freebsd.org (Postfix) with ESMTP id EB57C37B401; Wed, 3 Oct 2001 10:45:30 -0700 (PDT) Received: (from dillon@localhost) by earth.backplane.com (8.11.6/8.11.2) id f93HjSs66866; Wed, 3 Oct 2001 10:45:28 -0700 (PDT) (envelope-from dillon) Date: Wed, 3 Oct 2001 10:45:28 -0700 (PDT) From: Matt Dillon Message-Id: <200110031745.f93HjSs66866@earth.backplane.com> To: Zhihui Zhang Cc: Peter Wemm , Ian Dowse , Yevgeniy Aleynikov , ache@FreeBSD.ORG, mckusick@mckusick.com, Ken Pizzini , hackers@FreeBSD.ORG Subject: Re: patch #3 (was Re: bleh. Re: ufs_rename panic) References: Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG :The rename routine is probably the most convoluted in the entire file :system code (FFS). Now that everybody's memory is fresh, I would like to :ask something about it: : :(1) I am always wondering why not use a global rename lock so that there : is only one rename operation in progress at any time. This method is : used by GFS and probably Linux. This could make the code simply. Maybe : we can even get rid of the relookup() stuff. : : This may reduce concurrency, but rename should not be a frequent : operation. Well, you could say that about virtually any filesystem operation. Bitmaps are shared, for example. It is a bad idea to try to code simplistic solutions to complex problems. Throughout the code history of BSDs we have had to constantly make adjustments to algorithms that were originally not designed to scale past what the authors originally believed was reasonable. :(2) In the code of 4.3-release, we grab the source inode while holding the : locks of target inodes. In ufs_rename(), we have: : : if ((error = vn_lock(fvp, LK_EXCLUSIVE, p)) != 0) : goto abortit; : : I wonder whether this could cause deadlock. I think locking more than : one inode should be done in some sequence (ie. order them by inode : number). Hmm. Yes, there might possibly be a problem there. We may be safe due to the fact that only directory scans and rename hold multiple vnodes locked, and in this case the destination directory holding the destination file is already locked. However, if the source directory/file gets ripped out from under rename() the 'new' location of the source directory/file could cause a deadlock against another process. It would be very difficult to generate it though. :(4) This is not related to rename(). But ufs_mknod() reload the inode : through VFS_VGET() to avoid duplicate aliases. I can not see why it : is necessary. I asked this before, but have not got any satisfactory : responses. :... :Any ideas are welcome. Thanks, : :-Zhihui I don't know the answer to this at the moment. -Matt To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Wed Oct 3 10:56: 6 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from earth.backplane.com (earth-nat-cw.backplane.com [208.161.114.67]) by hub.freebsd.org (Postfix) with ESMTP id 1E0C437B405; Wed, 3 Oct 2001 10:55:59 -0700 (PDT) Received: (from dillon@localhost) by earth.backplane.com (8.11.6/8.11.2) id f93HttH66964; Wed, 3 Oct 2001 10:55:55 -0700 (PDT) (envelope-from dillon) Date: Wed, 3 Oct 2001 10:55:55 -0700 (PDT) From: Matt Dillon Message-Id: <200110031755.f93HttH66964@earth.backplane.com> To: Ian Dowse Cc: Peter Wemm , Yevgeniy Aleynikov , ache@FreeBSD.ORG, mckusick@mckusick.com, Ken Pizzini , hackers@FreeBSD.ORG Subject: Re: patch #3 (was Re: bleh. Re: ufs_rename panic) References: <200110031223.aa26174@salmon.maths.tcd.ie> Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG :The addition of the SOFTLOCKLEAF code is quite a major change, so :it would be very useful if you could describe exactly what it does, :what its semantics are, and how it fits into the rename problem. Setting SOFTLOCKLEAF in namei will set the VSOFTLOCK flag in the returned vnode (whether the returned vnode is locked or not), and namei() will fail with EAGAIN if the VSOFTLOCK flag is already set. An extra reference is added to the returned vnode which either the caller must free or NDFREE must free (note that VOP_RENAME is not responsible for freeing this extra reference, so the API itself does not actually change). The caller must either call vclearsoftlock() or call NDFREE() with the appropriate flags to clear the flag and dereference the vnode. int gc = 0; vagain(&gc); vagain() is a routine that falls through the first time, initializing 'gc' to a global counter. If later on you get an EAGAIN from a SOFTLOCK failure and loop back up to the vagain(), it will block the process until whomever owns the softlock has 'probably' released it. This allows the system call to restart internally and attempt the operation again from scratch. :Because the source node and parent are not locked, there is the :possibility that the source node could be renamed or removed at :any time before VOP_RENAME finally gets around to locking it and :removing it. Something needs to protect the source node against :being renamed/removed between the point that the source node is :initially looked up and the point that it is finally locked. Both :Matt's SOFTLOCKLEAF and the VRENAME flag are there to provide this :protection. : :It is the fact that this problem is entirely unique to VOP_RENAME :that leads me to think that adding the generic SOFTLOCKLEAF code :is overkill. The following fragment also suggests that maybe the :approach doesn't actually fit in that well: Well, maybe. I have my eye on possibly seeing a way to fix the race-to-root directory scanning program too, so I decided to implement VSOFTLOCK formally rather then as a hack. :The way that vclearsoftlock() is used to clear a flag in an unlocked :vnode is also not ideal. This should probably be protected at least :by v_interlock as other flags are. : :Ian In -current, definitely. I'm not sure why v_interlock even exists in -stable. -Matt To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Wed Oct 3 11:16:36 2001 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 E3D2C37B401; Wed, 3 Oct 2001 11:16:33 -0700 (PDT) Received: from onyx (onyx.cs.binghamton.edu [128.226.140.171]) by bingnet2.cc.binghamton.edu (8.11.4/8.11.4) with ESMTP id f93IGFk24841; Wed, 3 Oct 2001 14:16:15 -0400 (EDT) Date: Wed, 3 Oct 2001 14:15:41 -0400 (EDT) From: Zhihui Zhang X-Sender: zzhang@onyx To: Ken Pizzini Cc: Matt Dillon , Peter Wemm , Ian Dowse , Yevgeniy Aleynikov , ache@FreeBSD.ORG, mckusick@mckusick.com, hackers@FreeBSD.ORG Subject: Re: patch #3 (was Re: bleh. Re: ufs_rename panic) In-Reply-To: <20011003171114.12313.qmail@nink.inspinc.ad> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Wed, 3 Oct 2001, Ken Pizzini wrote: > Zhihui Zhang wrote: > > (3) Matt says "For example, if you have two hardlinked files residing in > > different directories both get renamed simultaniously, one of the > > rename()s can fail even though there is no conflict > > > > Can you explain this a little bit more? > > Consider: > mkdir foo bar > echo fubar > foo/a > ln foo/a bar/a Should it be: ln foo/a bar/b instead? > mv foo/a foo/b & mv bar/a bar/b > > There is no reason why that last line should fail, though it could > return EINVAL under some situations using some of the proposed > patches. > > --Ken Pizzini > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Wed Oct 3 11:18: 7 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from InterJet.elischer.org (c421509-a.pinol1.sfba.home.com [24.7.86.9]) by hub.freebsd.org (Postfix) with ESMTP id 45E1A37B403; Wed, 3 Oct 2001 11:17:58 -0700 (PDT) Received: from localhost (localhost.elischer.org [127.0.0.1]) by InterJet.elischer.org (8.9.1a/8.9.1) with ESMTP id MAA97608; Wed, 3 Oct 2001 12:12:15 -0700 (PDT) Date: Wed, 3 Oct 2001 12:12:14 -0700 (PDT) From: Julian Elischer To: Anjali Kulkarni Cc: Greg Lehey , Peter Pentchev , Gersh , Bernd Walter , freebsd-hackers@FreeBSD.ORG Subject: Re: setjmp/longjmp In-Reply-To: <009801c14bcf$d63e5fd0$0a00a8c0@indranet> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG basically it's just that pre-emtion just muddies the waters more.. On Wed, 3 Oct 2001, Anjali Kulkarni wrote: > Right, that was my question too, doesent seem connected with pre-emptive > kernels... > > ----- Original Message ----- > From: "Greg Lehey" > To: "Julian Elischer" > Cc: "Peter Pentchev" ; "Gersh" ; "Bernd > Walter" ; "Anjali Kulkarni" > ; > Sent: Wednesday, October 03, 2001 6:14 AM > Subject: Re: setjmp/longjmp > > > > On Tuesday, 2 October 2001 at 12:43:54 -0700, Julian Elischer wrote: > > > > > > > > > On Tue, 2 Oct 2001, Peter Pentchev wrote: > > > > > >> On Mon, Oct 01, 2001 at 10:56:24AM +0930, Greg Lehey wrote: > > >>> [Format recovered--see http://www.lemis.com/email/email-format.html] > > >>> > > >>> On Friday, 28 September 2001 at 10:12:14 -0700, Julian Elischer wrote: > > >>>> On Fri, 28 Sep 2001, Gersh wrote: > > >>>>> On Fri, 28 Sep 2001, Bernd Walter wrote: > > >>>>>> On Fri, Sep 28, 2001 at 07:03:51PM +0530, Anjali Kulkarni wrote: > > >>>>>>> Does anyone know whether it is advisable or not to use > > >>>>>>> setjmp/longjmp within kernel code? I could not see any > > >>>>>>> setjmp/longjmp in kernel source code. Is there a good reason for > > >>>>>>> this or can it be used? > > >>>>>> > > >>>>>> You need to look again, it's used in several places in the kernel. > > >>>>> > > >>>>> Look at sys/i386/i386/db_interface.c > > >>>> > > >>>> Yeah but it would probably be a pretty bad idea to use it without > > >>>> very careful thought. Especialy with the kernel becoming > > >>>> pre-emptable in the future.. > > >>> > > >>> Can you think of a scenario where it wouldn't work? Preemption > > >>> doesn't tear stacks apart, right? > > >> > > >> How about a case of a longjmp() back from under an acquired lock/mutex? > > >> Like function A sets up a jump buffer, calls function B, B acquires > > >> a lock, B calls C, C longjmp()'s back to A; what happens to the lock? > > >> > > >> It would work if A were aware of B's lock and the possibility of a code > > >> path that would end up with it still being held; I presume that this is > > >> what Julian meant by 'very careful thought'. > > > > > > pretty much... > > > > That's wrong, of course, but I don't see what this has to do with > > preemptive kernels. This is the same incorrect usages as performing > > malloc() and then longjmp()ing over the free(). > > > > Greg > > -- > > 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 Wed Oct 3 11:24:50 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from brain.mics.net (brain.mics.net [209.41.216.21]) by hub.freebsd.org (Postfix) with ESMTP id DDDCC37B408 for ; Wed, 3 Oct 2001 11:24:44 -0700 (PDT) Received: by brain.mics.net (Postfix, from userid 150) id 1211917BD4; Wed, 3 Oct 2001 14:24:42 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by brain.mics.net (Postfix) with ESMTP id E806E15CC5; Wed, 3 Oct 2001 14:24:42 -0400 (EDT) Date: Wed, 3 Oct 2001 14:24:42 -0400 (EDT) From: David Scheidt To: gkshenaut@ucdavis.edu Cc: hackers@FreeBSD.ORG Subject: Re: ALT- (Was: how to make 'for' understand two words as a single argumen) In-Reply-To: <200110022357.f92NvnS08486@thistle.bogs.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Tue, 2 Oct 2001, Greg Shenaut wrote: > Just out of curiosity, what would be an instance where you have > wanted a space in a filename and wouldn't have been satisfied with > 0xa0 instead of 0x20? All the times my file names have actual information in them? If I want to create a file with a space or a * or & or \n in them, let me. they're my feet, I'll shoot them if I want to. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Wed Oct 3 11:44:16 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from imo-d09.mx.aol.com (imo-d09.mx.aol.com [205.188.157.41]) by hub.freebsd.org (Postfix) with ESMTP id 9F86E37B403 for ; Wed, 3 Oct 2001 11:44:14 -0700 (PDT) Received: from Bsdguru@aol.com by imo-d09.mx.aol.com (mail_out_v31_r1.7.) id n.152.1f6c317 (4413) for ; Wed, 3 Oct 2001 14:44:06 -0400 (EDT) From: Bsdguru@aol.com Message-ID: <152.1f6c317.28ecb676@aol.com> Date: Wed, 3 Oct 2001 14:44:06 EDT Subject: 4.3 vs 4.4 To: hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Mailer: AOL 5.0 for Windows sub 139 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Is there a delta/changes sheet in what 4.4 offers? To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Wed Oct 3 12:22:34 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from avocet.mail.pas.earthlink.net (avocet.mail.pas.earthlink.net [207.217.121.50]) by hub.freebsd.org (Postfix) with ESMTP id 977BA37B406 for ; Wed, 3 Oct 2001 12:22:32 -0700 (PDT) Received: from dialup-209.245.142.238.dial1.sanjose1.level3.net ([209.245.142.238] helo=mindspring.com) by avocet.mail.pas.earthlink.net with esmtp (Exim 3.32 #2) id 15orb5-0002SU-00; Wed, 03 Oct 2001 12:22:23 -0700 Message-ID: <3BBB65A0.65FE804B@mindspring.com> Date: Wed, 03 Oct 2001 12:23:12 -0700 From: Terry Lambert Reply-To: tlambert2@mindspring.com X-Mailer: Mozilla 4.7 [en]C-CCK-MCD {Sony} (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: Dwayne.MacKinnon@xwave.com Cc: freebsd-hackers@freebsd.org Subject: Re: Memory allocation question References: <3BBA29C0.5E125DAF@xwave.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Dwayne wrote: > I'm creating an app where I want to use memory to store data so I > can get at it quickly. The problem is, I can't afford the delays that > would occur if the memory gets swapped out. Is there any way in FreeBSD > to allocate memory so that the VM system won't swap it out? Allocate it at boot time in machdep.c; that's one way, but that's mostly for use in the kernel (though you could set the PG_U bit on the pages, which would double map them in both the kernel and all user space processes. Another way is to put it in a System V shared memory segment, and set the sysctl option that wires it down. Have you read the madvise() man page? -- Terry To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Wed Oct 3 12:32:11 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from milliways.chance.ru (milliways.chance.ru [195.190.107.35]) by hub.freebsd.org (Postfix) with ESMTP id DE8E637B403 for ; Wed, 3 Oct 2001 12:31:58 -0700 (PDT) Received: from do-labs.spb.ru (ppp-1.chance.ru [195.190.107.4]) by milliways.chance.ru (8.9.0/8.9.0) with SMTP id XAA10658 for ; Wed, 3 Oct 2001 23:31:38 +0400 (MSD) Received: (qmail 8786 invoked by uid 1000); 3 Oct 2001 23:34:45 -0000 Date: Wed, 3 Oct 2001 23:34:45 +0000 From: Vladimir Dozen To: Poul-Henning Kamp Cc: Matt Dillon , Vladimir Dozen , Wilko Bulte , Alfred Perlstein , hackers@FreeBSD.ORG Subject: Re: VM: file swapping (this time in libc): patch Message-ID: <20011003233444.A8637@eix.do-labs.spb.ru> References: <200109300752.f8U7qsj41649@earth.backplane.com> <909.1001839737@critter> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.4i In-Reply-To: <909.1001839737@critter>; from phk@critter.freebsd.dk on Sun, Sep 30, 2001 at 10:48:57AM +0200 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG ehlo. > I once had a patch to phkmalloc() which backed all malloc'ed VM with > hidden files in the users homedir. It was written to put the VM > usage under QUOTA control, but it had many useful side effects as well. > > I can't seem to find it right now, but it is trivial to do: just > replace the sbrk(2) with mmap(). Only downside is the needed > filedescriptor which some shells don't like. One small point -- machanical replace leads to segmentation faults since brk(tail) expected always to allocate new block ending with tail; while mmap can refuse to do it. Actually, I repeated your work, and found that mmap() refused to map block at 128M border; instead, it moved it somewhat higher. At the same time, routines in libc/stdlib/malloc.c expected exactly the same address they requested. I've patched them to get map address from map_pages(). I've added new malloc configuration flag: 'F' (turn on file swapping) and 'f' (turn off). Then I've replaced brk/sbrk in code with mmap-based emulations. It works. Currently whole my home host running with 'F' in /etc/malloc.conf. I've tested it with famous 'life' game, and it showed that performance with pure mmap() (not file swapping) increased a bit (about 2%) comparing to original sbrk() implementation, and file swapping about 5% slower than sbrk(). It depends on hardware, of course. My implementation uses single file description, but dupes it to 512 (or less) to avoid problems with shells mentioned here. Mapped file increased as neccessary and additional mmap()s called on it. Here is patch for 4.3-RELEASE-p20: /usr/src/libc/stdlib/malloc.c: ============================================= 100c100 < --- > 248,250d247 < /* my last break. */ < static void *malloc_brk; < 264a262 > 299a298,442 > * file swap options > */ > static int malloc_file_swap; > static char* malloc_file_swap_dir; > static int malloc_file_swap_num; > static int malloc_file_swap_fd; > static int malloc_file_swap_offset; > static int malloc_file_swap_size; > > /* > * mmap-based brk/sbrk emulation > */ > static char *malloc_brk; > static char* sbrk_emulation(int incr) > { > if( incr == 0 ) return malloc_brk; > wrterror("unsupported sbrk argument"); > }; > > /** > * brk emulation > * > * note that return value is different from brk! > * @result 0 allocation failed, ptr -- start of new block > * @param new_brk desired location of new top of heap > * > */ > static char* brk_emulation(char* new_brk) > { > char* p; > char buf[4096]; > int filegrow,wr,blocksize; > int stage; > int tmp_fd; > > /* size of requested block */ > blocksize = new_brk-malloc_brk; > > /* increase heap size */ > if( blocksize > 0 ) > { > if( malloc_file_swap ) > { > /* create file at first call */ > if( malloc_file_swap_num == 0 ) > { > /* where to put swap file */ > if( !malloc_file_swap_dir ) malloc_file_swap_dir = getenv("SWAPDIR"); > if( !malloc_file_swap_dir ) malloc_file_swap_dir = getenv("TMPDIR"); > if( !malloc_file_swap_dir ) malloc_file_swap_dir = "/tmp"; > > /* generate random file name and open it */ > do > { > snprintf(buf,sizeof(buf),"%s/%08x.swap", > malloc_file_swap_dir,malloc_file_swap_num); > malloc_file_swap_num *= 11; > malloc_file_swap_num += 13; > malloc_file_swap_fd = open(buf,O_CREAT|O_EXCL|O_RDWR|O_NOFOLLOW,0600); > } > while( malloc_file_swap_fd < 0 && errno == EEXIST ); > if( malloc_file_swap_fd < 0 ) return 0; > > /* > * some shell scripts (GNU configure?) can be > * unhappy if we use descriptor 4 or 5; dup descriptor > * into large enough descriptor and close original > */ > tmp_fd = 512; > while( tmp_fd >= 0 && dup2(malloc_file_swap_fd,tmp_fd) < 0 ) tmp_fd--; > if( tmp_fd < 0 ) return 0; > close(malloc_file_swap_fd); > malloc_file_swap_fd = tmp_fd; > > /* unlink file to autoremove it at last reference lost */ > unlink(buf); > } > > if( malloc_file_swap_offset+blocksize > malloc_file_swap_size ) > { > /* fill tail of file with zeroes */ > memset(buf,0,sizeof(buf)); > > /* > * grow file > * critical grow: if any error happens here, allocation fails > * supplemental grow: errors are ignored > */ > for( stage=0; stage<2; stage++ ) > { > if( stage == 0 ) filegrow = blocksize; > else filegrow = 1024*1024; > > while( filegrow > 0 ) > { > /* note that file position is always at end of file */ > wr = write(malloc_file_swap_fd, > buf,sizeof(buf) if( wr < 0 ) > { > if( errno == EINTR ) continue; > if( stage == 0 ) return 0; > break; > } > filegrow -= wr; > > /* keep file size for next time */ > malloc_file_swap_size += wr; > } > } > } > > /* map file tail into address space */ > p = mmap(malloc_brk,blocksize, > PROT_READ|PROT_WRITE, > MAP_SHARED|MAP_NOSYNC|MAP_INHERIT, > malloc_file_swap_fd, > malloc_file_swap_offset); > if( p == MAP_FAILED ) return 0; > > /* shift offset to use it next time in mmap */ > malloc_file_swap_offset += blocksize; > } > else > { > /* FIXME: we might use file swap if regular swapping failed; > * but this may only happen when limit reached; should > * we break limits with mmap()? */ > p = mmap(malloc_brk,new_brk-malloc_brk, > PROT_READ|PROT_WRITE, > MAP_ANON|MAP_PRIVATE,MMAP_FD,0); > if( p == MAP_FAILED ) return 0; > } > > malloc_brk = p+blocksize; > return p; > } > else > { > /* here we must unmap memory */ > return 0; > } > } > > /* 307c450 < result = (caddr_t)pageround((u_long)sbrk(0)); --- > result = (caddr_t)pageround((u_long)sbrk_emulation(0)); 310c453,454 < if (brk(tail)) { --- > result = brk_emulation(tail); > if( result == 0 ) { 315a460 > tail = result + (pages << malloc_pageshift); 318,321c463 < malloc_brk = tail; < < if ((last_index+1) >= malloc_ninfo && !extend_pgdir(last_index)) < return 0;; --- > if ((last_index+1) >= malloc_ninfo && !extend_pgdir(last_index)) return 0;; 430a573,574 > case 'f': malloc_file_swap = 0; break; > case 'F': malloc_file_swap = 1; break; 467c611 < malloc_origo = ((u_long)pageround((u_long)sbrk(0))) >> malloc_pageshift; --- > malloc_origo = ((u_long)pageround((u_long)sbrk_emulation(0))) >> malloc_pageshift; 481c625 < * We can sbrk(2) further back when we keep this on a low address. --- > * We can sbrk_emulation(2) further back when we keep this on a low address. 516c660 < if ((void*)pf->page >= (void*)sbrk(0)) --- > if ((void*)pf->page >= (void*)sbrk_emulation(0)) 547,548d690 < size >>= malloc_pageshift; < 550,551c692,693 < if (!p) < p = map_pages(size); --- > size >>= malloc_pageshift; > if (!p) p = map_pages(size); 923c1065 < malloc_brk == sbrk(0)) { /* ..and it's OK to do... */ --- > malloc_brk == sbrk_emulation(0)) { /* ..and it's OK to do... */ 932,933c1074,1075 < brk(pf->end); < malloc_brk = pf->end; --- > /* FIXME: here we must check returned address */ > brk_emulation(pf->end); ============================================= -- dozen @ home To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Wed Oct 3 12:32:28 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from robin.mail.pas.earthlink.net (robin.mail.pas.earthlink.net [207.217.120.65]) by hub.freebsd.org (Postfix) with ESMTP id 1E90237B406 for ; Wed, 3 Oct 2001 12:32:26 -0700 (PDT) Received: from mindspring.com (dialup-209.245.142.238.Dial1.SanJose1.Level3.net [209.245.142.238]) by robin.mail.pas.earthlink.net (8.11.5/8.9.3) with ESMTP id f93JWNP14657; Wed, 3 Oct 2001 12:32:23 -0700 (PDT) Message-ID: <3BBB67A7.BD92F6@mindspring.com> Date: Wed, 03 Oct 2001 12:31:51 -0700 From: Terry Lambert Reply-To: tlambert2@mindspring.com X-Mailer: Mozilla 4.7 [en]C-CCK-MCD {Sony} (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: Julian Elischer Cc: hackers@freebsd.org Subject: Re: pkg_create help needed. References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Julian Elischer wrote: > > I need to take a directory of 'stuff' > which includes a script install.sh > and make it into a package.. > I have had some success but it's not quite right.. > > What I'd like to make it do is: > unpack the 'stuff' into a temporary directory somewhere. > run the install script > delete the install directory > > The trouble is that I can't work out how to get the files > unpacked there and have the install script get them from there.. > > I can get it to unpack them into the final locations, and I can get the > install script to run and find them there, but I need the install script > to modify stuff and I'd rather have it all done in the temp > directory if possible, and then istalled into the final > location.. > also I have can not make the @srcdir option work in the packing list.. > does it work? > (-s seems to work) Use a preinstall script for the modifications. Yes, this means you will need two scripts. -- Terry To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Wed Oct 3 12:42:43 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from mailhub.yumyumyum.org (dsl092-171-091.wdc1.dsl.speakeasy.net [66.92.171.91]) by hub.freebsd.org (Postfix) with SMTP id E201B37B409 for ; Wed, 3 Oct 2001 12:42:39 -0700 (PDT) Received: (qmail 6986 invoked from network); 3 Oct 2001 19:42:37 -0000 Received: from ken.yumyumyum.org (HELO there) (192.168.0.2) by dsl092-171-091.wdc1.dsl.speakeasy.net with SMTP; 3 Oct 2001 19:42:37 -0000 Content-Type: text/plain; charset="iso-8859-1" From: Kenneth Culver Reply-To: culverk@wam.umd.edu To: freebsd-hackers@freebsd.org, freebsd-current@freebsd.org Subject: SIOCGIFDATA Date: Wed, 3 Oct 2001 15:42:57 -0400 X-Mailer: KMail [version 1.3] MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-Id: <20011003194239.E201B37B409@hub.freebsd.org> Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG I was wondering if anyone had thought of implementing the above ioctl. Right now from what I can tell, (from wmnet, and netstat) all stats for a network device are kvm_read out of the kernel. On my local machine (just to see if it was feasable) I wrote an ioctl and added a structure (nameifdata, which has a character array to store an if_name, and an if_data) that when given an if_name (in the nameifdata) it fills the if_data with the appropriate device's stats, and pulls it back to userland. I was wondering if anyone would be interested in committing this ioctl, mainly because for a program such as wmnet or any other program that needs stats, it's a pain to go through all the kvm stuff when a socket could just be opened, and then that data could be ioctl'd using that socket. If there is any reason why nobody has created this ioctl, please explain it to me. Ken To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Wed Oct 3 12:59:14 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from peitho.fxp.org (peitho.fxp.org [209.26.95.40]) by hub.freebsd.org (Postfix) with ESMTP id 3EE0137B403 for ; Wed, 3 Oct 2001 12:59:11 -0700 (PDT) Received: by peitho.fxp.org (Postfix, from userid 1501) id A3F2913651; Wed, 3 Oct 2001 15:59:02 -0400 (EDT) Date: Wed, 3 Oct 2001 15:59:02 -0400 From: Chris Faulhaber To: Bsdguru@aol.com Cc: hackers@freebsd.org Subject: Re: 4.3 vs 4.4 Message-ID: <20011003155902.B66712@peitho.fxp.org> References: <152.1f6c317.28ecb676@aol.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="8GpibOaaTibBMecb" Content-Disposition: inline In-Reply-To: <152.1f6c317.28ecb676@aol.com> User-Agent: Mutt/1.3.20i Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG --8GpibOaaTibBMecb Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Oct 03, 2001 at 02:44:06PM -0400, Bsdguru@aol.com wrote: >=20 > Is there a delta/changes sheet in what 4.4 offers?=20 >=20 Try the release notes. --=20 Chris D. Faulhaber - jedgar@fxp.org - jedgar@FreeBSD.org -------------------------------------------------------- FreeBSD: The Power To Serve - http://www.FreeBSD.org --8GpibOaaTibBMecb Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (FreeBSD) Comment: FreeBSD: The Power To Serve iEYEARECAAYFAju7bgUACgkQObaG4P6BelBqKQCdEBWKDoqXM26TiCW5h910mcRh 5EoAnA1uar9sCgi/BY4tQ/kH/2sxCZdX =qdka -----END PGP SIGNATURE----- --8GpibOaaTibBMecb-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Wed Oct 3 13: 7:12 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from khavrinen.lcs.mit.edu (khavrinen.lcs.mit.edu [18.24.4.193]) by hub.freebsd.org (Postfix) with ESMTP id C1DAD37B407; Wed, 3 Oct 2001 13:07:05 -0700 (PDT) Received: (from wollman@localhost) by khavrinen.lcs.mit.edu (8.11.4/8.11.4) id f93K73j95144; Wed, 3 Oct 2001 16:07:03 -0400 (EDT) (envelope-from wollman) Date: Wed, 3 Oct 2001 16:07:03 -0400 (EDT) From: Garrett Wollman Message-Id: <200110032007.f93K73j95144@khavrinen.lcs.mit.edu> To: culverk@wam.umd.edu Cc: freebsd-hackers@FreeBSD.ORG, freebsd-current@FreeBSD.ORG Subject: SIOCGIFDATA In-Reply-To: <20011003194238.7722637B406@hub.freebsd.org> References: <20011003194238.7722637B406@hub.freebsd.org> Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG < said: > I was wondering if anyone had thought of implementing the above ioctl. Right > now from what I can tell, (from wmnet, and netstat) all stats for a network > device are kvm_read out of the kernel. These applications should use sysctl instead. All of the information is available through the interface mib. -GAWollman To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Wed Oct 3 13:25: 4 2001 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 E2F1137B407 for ; Wed, 3 Oct 2001 13:25:01 -0700 (PDT) Received: from onyx (onyx.cs.binghamton.edu [128.226.140.171]) by bingnet2.cc.binghamton.edu (8.11.4/8.11.4) with ESMTP id f93KP1k00727 for ; Wed, 3 Oct 2001 16:25:01 -0400 (EDT) Date: Wed, 3 Oct 2001 16:24:26 -0400 (EDT) From: Zhihui Zhang X-Sender: zzhang@onyx To: freebsd-hackers@freebsd.org Subject: hardware watch point support Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Does FreeBSD 4.3-release support hardware watchpoint? If so, how to enable it? I tried something like: (gdb) watch * 0xc28374d0 Hardware watchpoint 4: * 3263395024 (gdb) watch * (int32_t *) 3263427792 Hardware watchpoint 5: *(int32_t *) 3263427792 But it does not seem to work well. Instead, I have to step through the code to see when a memory value is changed. Thanks, -Zhihui To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Wed Oct 3 13:33:50 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from home.krasnoyarsk.ru (free.home.krasnoyarsk.ru [195.161.57.59]) by hub.freebsd.org (Postfix) with ESMTP id C8EEA37B401; Wed, 3 Oct 2001 13:33:40 -0700 (PDT) Received: from home.krasnoyarsk.ru (localhost.home.krasnoyarsk.ru [127.0.0.1]) by home.krasnoyarsk.ru (8.9.3/8.9.3) with ESMTP id EAA01371; Thu, 4 Oct 2001 04:40:07 +0800 (KRSS) Message-ID: <3BBB77A7.5C4B129E@home.krasnoyarsk.ru> Date: Thu, 04 Oct 2001 04:40:07 +0800 From: Oleg Golovanov Organization: Home Networks of Krasnoyarsk City X-Mailer: Mozilla 4.7 [en] (X11; I; FreeBSD 2.2.8-RELEASE i386) X-Accept-Language: ru, en MIME-Version: 1.0 To: freebsd-questions@freebsd.org, freebsd-hackers@freebsd.org Subject: Question about pthread Content-Type: text/plain; charset=koi8-r Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Dear Sirs: I am using FreeBSD-2.2.8 and after calling pthread_create() my programs get sigfault (SIGSEGV) and exited with core dump. I should like to ask if somebody know the solve of this problem. My example of using pthread is included below. I ask to answer me directly on my e-mail. Oleg ---- #include #include #include #include #define socklen_t unsigned int static void *coms(void *arg) { pthread_detach(pthread_self()); write((int)arg, "Test", sizeof("test")); close((int)arg); return(NULL); } int main(int argc, char **argv) { int *confd, len, lisfd; struct sockaddr_un *client, saun; lisfd = socket(AF_UNIX, SOCK_STREAM, 0); unlink("/tmp/TS"); saun.sun_family = AF_UNIX; strcpy(saun.sun_path, "/tmp/TS"); bind(lisfd, (struct sockaddr *) &saun, sizeof(struct sockaddr_un)); listen(lisfd, 2); client = (struct sockaddr_un *)malloc(sizeof(saun)); confd = (int *)malloc(sizeof(int)); for ( ; ; ) { len = sizeof(saun); *confd = accept(lisfd, (struct sockaddr *) client, &len); pthread_create(NULL, NULL, &coms, confd); } return(0); } ---- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Wed Oct 3 14:11: 4 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from holly.dyndns.org (adsl-208-191-149-224.dsl.hstntx.swbell.net [208.191.149.224]) by hub.freebsd.org (Postfix) with ESMTP id EE01337B403; Wed, 3 Oct 2001 14:10:58 -0700 (PDT) Received: (from chris@localhost) by holly.dyndns.org (8.11.4/8.9.3) id f93L9sI70880; Wed, 3 Oct 2001 16:09:54 -0500 (CDT) (envelope-from chris) Date: Wed, 3 Oct 2001 16:09:52 -0500 From: Chris Costello To: Oleg Golovanov Cc: freebsd-questions@FreeBSD.ORG, freebsd-hackers@FreeBSD.ORG Subject: Re: Question about pthread Message-ID: <20011003160951.E57938@holly.calldei.com> Reply-To: chris@FreeBSD.ORG References: <3BBB77A7.5C4B129E@home.krasnoyarsk.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <3BBB77A7.5C4B129E@home.krasnoyarsk.ru>; from olmi@home.krasnoyarsk.ru on Thu, Oct 04, 2001 at 04:40:07AM +0800 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Thursday, October 04, 2001, Oleg Golovanov wrote: > static void *coms(void *arg) > { > pthread_detach(pthread_self()); > write((int)arg, "Test", sizeof("test")); > close((int)arg); > return(NULL); > } For starters, this function should be rewritten as static void *coms(void *arg) { int fd; fd = *(int *)arg; pthread_detach(pthread_self()); write(fd, "Test", 4); close(fd); return (NULL); } Because you're passing the _address_ of `confd', not the value. You must first cast arg to an int pointer, and then dereference it (and assign its value to `fd'). -- +-------------------+---------------------------------------------------+ | Chris Costello | CCITT - Can't Conceive Intelligent Thoughts Today | | chris@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 Oct 3 14:14:34 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from holly.dyndns.org (adsl-208-191-149-224.dsl.hstntx.swbell.net [208.191.149.224]) by hub.freebsd.org (Postfix) with ESMTP id D0BF037B401; Wed, 3 Oct 2001 14:14:29 -0700 (PDT) Received: (from chris@localhost) by holly.dyndns.org (8.11.4/8.9.3) id f93LDQ070912; Wed, 3 Oct 2001 16:13:26 -0500 (CDT) (envelope-from chris) Date: Wed, 3 Oct 2001 16:13:26 -0500 From: Chris Costello To: Oleg Golovanov Cc: freebsd-questions@FreeBSD.ORG, freebsd-hackers@FreeBSD.ORG Subject: Re: Question about pthread Message-ID: <20011003161326.F57938@holly.calldei.com> Reply-To: chris@FreeBSD.ORG References: <3BBB77A7.5C4B129E@home.krasnoyarsk.ru> <20011003160951.E57938@holly.calldei.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20011003160951.E57938@holly.calldei.com>; from chris@FreeBSD.ORG on Wed, Oct 03, 2001 at 04:09:52PM -0500 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Wednesday, October 03, 2001, Chris Costello wrote: > Because you're passing the _address_ of `confd', not the Er, sorry, `connfd' _is_ the address to a value (it's a pointer). But you're still passing an address, and I believe what I posted will solve the problem. -- +-------------------+---------------------------------------------------+ | Chris Costello | Implementation is the sincerest form of flattery. | | chris@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 Oct 3 14:31:34 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from mail.acns.ab.ca (h24-68-206-125.sbm.shawcable.net [24.68.206.125]) by hub.freebsd.org (Postfix) with ESMTP id BA0B037B405; Wed, 3 Oct 2001 14:31:29 -0700 (PDT) Received: from colnta.internal (colnta.internal [192.168.1.2]) by mail.acns.ab.ca (8.11.6/8.11.3) with ESMTP id f93LVVe02946; Wed, 3 Oct 2001 15:31:31 -0600 (MDT) (envelope-from davidc@colnta.internal) Received: (from davidc@localhost) by colnta.internal (8.11.6/8.11.3) id f93LVUT96779; Wed, 3 Oct 2001 15:31:30 -0600 (MDT) (envelope-from davidc) Date: Wed, 3 Oct 2001 15:31:30 -0600 From: Chad David To: Oleg Golovanov Cc: freebsd-questions@FreeBSD.ORG, freebsd-hackers@FreeBSD.ORG Subject: Re: Question about pthread Message-ID: <20011003153130.A96520@colnta.internal> Mail-Followup-To: Oleg Golovanov , freebsd-questions@FreeBSD.ORG, freebsd-hackers@FreeBSD.ORG References: <3BBB77A7.5C4B129E@home.krasnoyarsk.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <3BBB77A7.5C4B129E@home.krasnoyarsk.ru>; from olmi@home.krasnoyarsk.ru on Thu, Oct 04, 2001 at 04:40:07AM +0800 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Thu, Oct 04, 2001 at 04:40:07AM +0800, Oleg Golovanov wrote: > Dear Sirs: > > I am using FreeBSD-2.2.8 and after calling pthread_create() > my programs get sigfault (SIGSEGV) and exited with core dump. > > I should like to ask if somebody know the solve of this problem. > My example of using pthread is included below. > > I ask to answer me directly on my e-mail. > > Oleg > ... > pthread_create(NULL, NULL, &coms, confd); ... I am not positive about 2.2.8, but I do not think you can pass NULL as the first argument to pthread_create(). -- Chad David davidc@acns.ab.ca ACNS Inc. Calgary, Alberta Canada To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Wed Oct 3 16:11:21 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from imo-r10.mx.aol.com (imo-r10.mx.aol.com [152.163.225.106]) by hub.freebsd.org (Postfix) with ESMTP id DDA8137B401 for ; Wed, 3 Oct 2001 16:11:18 -0700 (PDT) Received: from Bsdguru@aol.com by imo-r10.mx.aol.com (mail_out_v31_r1.7.) id 4.10.136d9f77 (4240); Wed, 3 Oct 2001 19:11:14 -0400 (EDT) From: Bsdguru@aol.com Message-ID: <10.136d9f77.28ecf511@aol.com> Date: Wed, 3 Oct 2001 19:11:13 EDT Subject: Re: 4.3 vs 4.4 To: tirloni@users.sourceforge.net Cc: hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Mailer: AOL 5.0 for Windows sub 139 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG In a message dated 10/03/2001 3:55:16 PM Eastern Daylight Time, tirloni@users.sourceforge.net writes: > > Is there a delta/changes sheet in what 4.4 offers? > > http://www.freebsd.org/releases/4.4R/notes.html > > or track the CVS tree :) > Thanks for the pointer, and not to the other fellow (jedgar@fxp.org) who chose to just make a snide remark. B To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Wed Oct 3 16:15:25 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from imo-m06.mx.aol.com (imo-m06.mx.aol.com [64.12.136.161]) by hub.freebsd.org (Postfix) with ESMTP id AEDC137B405 for ; Wed, 3 Oct 2001 16:15:22 -0700 (PDT) Received: from Bsdguru@aol.com by imo-m06.mx.aol.com (mail_out_v31_r1.7.) id n.104.a2a307c (4240) for ; Wed, 3 Oct 2001 19:15:20 -0400 (EDT) From: Bsdguru@aol.com Message-ID: <104.a2a307c.28ecf608@aol.com> Date: Wed, 3 Oct 2001 19:15:20 EDT Subject: if_sf bug To: hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Mailer: AOL 5.0 for Windows sub 139 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG The if_sf driver doesnt seem to initialize itself until an address is set, which makes things like tcpdump, bridging and other promiscuous things not work. Im sure B.P. will know where the safest place to put an sf_init to fix this (I just stuffed one in on SIFFLAGS but it may not handle all cases. Bryan To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Wed Oct 3 17:14:15 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from resnet.uoregon.edu (resnet.uoregon.edu [128.223.122.47]) by hub.freebsd.org (Postfix) with ESMTP id 7B99837B40A for ; Wed, 3 Oct 2001 17:14:08 -0700 (PDT) Received: from localhost (dwhite@localhost) by resnet.uoregon.edu (8.11.3/8.10.1) with ESMTP id f940E8503221; Wed, 3 Oct 2001 17:14:08 -0700 (PDT) Date: Wed, 3 Oct 2001 17:14:08 -0700 (PDT) From: Doug White To: Cc: Subject: Re: if_sf bug In-Reply-To: <104.a2a307c.28ecf608@aol.com> Message-ID: X-All-Your-Base: are belong to us MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Wed, 3 Oct 2001 Bsdguru@aol.com wrote: > The if_sf driver doesnt seem to initialize itself until an address is set, > which makes things like tcpdump, bridging and other promiscuous things not > work. All the interfaces do that. If you want to make an invisible interface, configure it with IP 0.0.0.0. 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 Oct 3 17:49:24 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from www.kozubik.com (www.kozubik.com [216.188.96.212]) by hub.freebsd.org (Postfix) with ESMTP id 63BAE37B403 for ; Wed, 3 Oct 2001 17:49:22 -0700 (PDT) Received: from localhost (john@localhost) by www.kozubik.com (8.11.0/8.11.0) with ESMTP id f940g7a67102 for ; Wed, 3 Oct 2001 17:42:07 -0700 (PDT) (envelope-from john@kozubik.com) Date: Wed, 3 Oct 2001 17:42:07 -0700 (PDT) From: John Kozubik To: freebsd-hackers@freebsd.org Subject: bluetooth Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Is anyone working on bluetooth drivers and accompanying userland programs (bluetooth equivalents of wicontrol, etc.) ? I see nothing at freshmeat.net, release notes, or on related freebsd-* lists. I have some free time in the next few months and would like to work on them, but I would rather not duplicate anyones work. ----- John Kozubik - john@kozubik.com - http://www.kozubik.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Wed Oct 3 17:58:25 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from wantadilla.lemis.com (wantadilla.lemis.com [192.109.197.80]) by hub.freebsd.org (Postfix) with ESMTP id 36B0937B401 for ; Wed, 3 Oct 2001 17:58:20 -0700 (PDT) Received: by wantadilla.lemis.com (Postfix, from userid 1004) id 4AB736AB08; Thu, 4 Oct 2001 10:29:13 +0930 (CST) Date: Thu, 4 Oct 2001 10:29:13 +0930 From: Greg Lehey To: Julian Elischer Cc: Anjali Kulkarni , Peter Pentchev , Gersh , Bernd Walter , freebsd-hackers@FreeBSD.ORG Subject: Re: setjmp/longjmp Message-ID: <20011004102913.C69005@wantadilla.lemis.com> References: <009801c14bcf$d63e5fd0$0a00a8c0@indranet> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: ; from julian@elischer.org on Wed, Oct 03, 2001 at 12:12:14PM -0700 Organization: The FreeBSD Project Phone: +61-8-8388-8286 Fax: +61-8-8388-8725 Mobile: +61-418-838-708 WWW-Home-Page: http://www.FreeBSD.org/ X-PGP-Fingerprint: 6B 7B C3 8C 61 CD 54 AF 13 24 52 F8 6D A4 95 EF Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Wednesday, 3 October 2001 at 12:12:14 -0700, Julian Elischer wrote: > I suppose it must have been Peter Penchev who wrote: >> On Wednesday, October 03, 2001 6:14 AM, Greg Lehey wrote: >>> On Tuesday, 2 October 2001 at 12:43:54 -0700, Julian Elischer wrote: >>>> On Tue, 2 Oct 2001, Peter Pentchev wrote: >>>>> On Mon, Oct 01, 2001 at 10:56:24AM +0930, Greg Lehey wrote: >>>>>> [Format recovered--see http://www.lemis.com/email/email-format.html] >>>>>> >>>>>> On Friday, 28 September 2001 at 10:12:14 -0700, Julian Elischer wrote: >>>>>>> On Fri, 28 Sep 2001, Gersh wrote: >>>>>>>> On Fri, 28 Sep 2001, Bernd Walter wrote: >>>>>>>>> On Fri, Sep 28, 2001 at 07:03:51PM +0530, Anjali Kulkarni wrote: >>>>>>>>>> Does anyone know whether it is advisable or not to use >>>>>>>>>> setjmp/longjmp within kernel code? I could not see any >>>>>>>>>> setjmp/longjmp in kernel source code. Is there a good reason for >>>>>>>>>> this or can it be used? >>>>>>>>> >>>>>>>>> You need to look again, it's used in several places in the kernel. >>>>>>>> >>>>>>>> Look at sys/i386/i386/db_interface.c >>>>>>> >>>>>>> Yeah but it would probably be a pretty bad idea to use it without >>>>>>> very careful thought. Especialy with the kernel becoming >>>>>>> pre-emptable in the future.. >>>>>> >>>>>> Can you think of a scenario where it wouldn't work? Preemption >>>>>> doesn't tear stacks apart, right? >>>>> >>>>> How about a case of a longjmp() back from under an acquired lock/mutex? >>>>> Like function A sets up a jump buffer, calls function B, B acquires >>>>> a lock, B calls C, C longjmp()'s back to A; what happens to the lock? >>>>> >>>>> It would work if A were aware of B's lock and the possibility of a code >>>>> path that would end up with it still being held; I presume that this is >>>>> what Julian meant by 'very careful thought'. >>>> >>>> pretty much... >>> >>> That's wrong, of course, but I don't see what this has to do with >>> preemptive kernels. This is the same incorrect usages as performing >>> malloc() and then longjmp()ing over the free(). >> >> Right, that was my question too, doesent seem connected with pre-emptive >> kernels... > > basically it's just that pre-emtion just muddies the waters more.. Or statements which aren't backed up with examples? Greg -- 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 Wed Oct 3 18: 3:50 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from rover.village.org (rover.bsdimp.com [204.144.255.66]) by hub.freebsd.org (Postfix) with ESMTP id 2A95E37B403 for ; Wed, 3 Oct 2001 18:03:47 -0700 (PDT) Received: from harmony.village.org (harmony.village.org [10.0.0.6]) by rover.village.org (8.11.3/8.11.3) with ESMTP id f9413ju80626; Wed, 3 Oct 2001 19:03:45 -0600 (MDT) (envelope-from imp@harmony.village.org) Received: from harmony.village.org (localhost [127.0.0.1]) by harmony.village.org (8.11.6/8.11.6) with ESMTP id f9413j724568; Wed, 3 Oct 2001 19:03:45 -0600 (MDT) (envelope-from imp@harmony.village.org) Message-Id: <200110040103.f9413j724568@harmony.village.org> To: Bsdguru@aol.com Subject: Re: 4.3 vs 4.4 Cc: hackers@FreeBSD.org In-reply-to: Your message of "Wed, 03 Oct 2001 14:44:06 EDT." <152.1f6c317.28ecb676@aol.com> References: <152.1f6c317.28ecb676@aol.com> Date: Wed, 03 Oct 2001 19:03:45 -0600 From: Warner Losh Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG In message <152.1f6c317.28ecb676@aol.com> Bsdguru@aol.com writes: : Is there a delta/changes sheet in what 4.4 offers? http://www.freebsd.org/ has a link to the release notes. Warner To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Wed Oct 3 18: 9: 3 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from rover.village.org (rover.bsdimp.com [204.144.255.66]) by hub.freebsd.org (Postfix) with ESMTP id 96AC437B407 for ; Wed, 3 Oct 2001 18:09:00 -0700 (PDT) Received: from harmony.village.org (harmony.village.org [10.0.0.6]) by rover.village.org (8.11.3/8.11.3) with ESMTP id f9418xu80645; Wed, 3 Oct 2001 19:08:59 -0600 (MDT) (envelope-from imp@harmony.village.org) Received: from harmony.village.org (localhost [127.0.0.1]) by harmony.village.org (8.11.6/8.11.6) with ESMTP id f9418w724611; Wed, 3 Oct 2001 19:08:59 -0600 (MDT) (envelope-from imp@harmony.village.org) Message-Id: <200110040108.f9418w724611@harmony.village.org> To: John Kozubik Subject: Re: bluetooth Cc: freebsd-hackers@FreeBSD.ORG In-reply-to: Your message of "Wed, 03 Oct 2001 17:42:07 PDT." References: Date: Wed, 03 Oct 2001 19:08:58 -0600 From: Warner Losh Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG In message John Kozubik writes: : Is anyone working on bluetooth drivers and accompanying userland programs : (bluetooth equivalents of wicontrol, etc.) ? I tried to get a bluetooth pcmcia card, but I haven't been able to win one on ebay or find one availble through more normal channels. I've also had no luck finding datasheets on the bluetooth stuff, but to be honest I haven't tried too hard. Warner To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Wed Oct 3 18:24: 9 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from imo-m07.mx.aol.com (imo-m07.mx.aol.com [64.12.136.162]) by hub.freebsd.org (Postfix) with ESMTP id DC84D37B401 for ; Wed, 3 Oct 2001 18:24:06 -0700 (PDT) Received: from Bsdguru@aol.com by imo-m07.mx.aol.com (mail_out_v31_r1.7.) id f.127.50f2d20 (4411); Wed, 3 Oct 2001 21:23:41 -0400 (EDT) From: Bsdguru@aol.com Message-ID: <127.50f2d20.28ed141c@aol.com> Date: Wed, 3 Oct 2001 21:23:40 EDT Subject: Re: if_sf bug To: dwhite@resnet.uoregon.edu Cc: hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Mailer: AOL 5.0 for Windows sub 139 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG In a message dated 10/03/2001 8:14:30 PM Eastern Daylight Time, dwhite@resnet.uoregon.edu writes: > > The if_sf driver doesnt seem to initialize itself until an address is set, > > which makes things like tcpdump, bridging and other promiscuous things not > > work. > > All the interfaces do that. If you want to make an invisible interface, > configure it with IP 0.0.0.0. > They dont "all do that". the fxp and dc drivers work fine when setting promiscuous mode from within the kernel,the sf doesnt. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Wed Oct 3 19:15: 4 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from www.kozubik.com (www.kozubik.com [216.188.96.212]) by hub.freebsd.org (Postfix) with ESMTP id 3112937B405 for ; Wed, 3 Oct 2001 19:15:01 -0700 (PDT) Received: from localhost (john@localhost) by www.kozubik.com (8.11.0/8.11.0) with ESMTP id f9427go67284; Wed, 3 Oct 2001 19:07:42 -0700 (PDT) (envelope-from john@kozubik.com) Date: Wed, 3 Oct 2001 19:07:42 -0700 (PDT) From: John Kozubik To: Warner Losh Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: bluetooth In-Reply-To: <200110040108.f9418w724611@harmony.village.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG I had a feeling if anyone was looking into it that you were - if nobody else is looking at it, I'll start working. I have a 3com and a xircom. Please keep this in mind if you hear of anyone on (or starting on) a similar track, and I will watch -mobile. ----- John Kozubik - john@kozubik.com - http://www.kozubik.com On Wed, 3 Oct 2001, Warner Losh wrote: > In message John Kozubik writes: > : Is anyone working on bluetooth drivers and accompanying userland programs > : (bluetooth equivalents of wicontrol, etc.) ? > > I tried to get a bluetooth pcmcia card, but I haven't been able to win > one on ebay or find one availble through more normal channels. > > I've also had no luck finding datasheets on the bluetooth stuff, but > to be honest I haven't tried too hard. > > Warner > > 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 Wed Oct 3 19:16:33 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from owa-sj-1.digisle.com (owa-sj-1.digisle.com [167.216.153.124]) by hub.freebsd.org (Postfix) with ESMTP id 4B2E737B403 for ; Wed, 3 Oct 2001 19:16:31 -0700 (PDT) Received: from VWALL-SJ-1.digisle.com ([167.216.153.118]) by owa-sj-1.digisle.com with Microsoft SMTPSVC(5.0.2195.2966); Wed, 3 Oct 2001 19:17:48 -0700 Received: from 206.220.227.145 by VWALL-SJ-1.digisle.com (InterScan E-Mail VirusWall NT); Wed, 03 Oct 2001 19:16:30 -0700 Message-ID: <3BBBC67E.2FDFA927@digisle.net> Date: Wed, 03 Oct 2001 19:16:30 -0700 From: Maksim Yevmenkin Organization: Digital Island X-Mailer: Mozilla 4.78 [en] (X11; U; SunOS 5.7 sun4u) X-Accept-Language: en MIME-Version: 1.0 To: John Kozubik Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: bluetooth References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 04 Oct 2001 02:17:48.0807 (UTC) FILETIME=[C3389170:01C14C7A] Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG > Is anyone working on bluetooth drivers and accompanying userland programs > (bluetooth equivalents of wicontrol, etc.) ? ok :) i'm actually working on BlueTooth stack for FreeBSD. so far i have some code that implements basic functionality for HCI layer. the implementation is based on Netgraph and supposed to be completely optional. thanks, max To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Wed Oct 3 19:35:22 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from rover.village.org (rover.bsdimp.com [204.144.255.66]) by hub.freebsd.org (Postfix) with ESMTP id 8BEC237B401 for ; Wed, 3 Oct 2001 19:35:19 -0700 (PDT) Received: from harmony.village.org (harmony.village.org [10.0.0.6]) by rover.village.org (8.11.3/8.11.3) with ESMTP id f942ZFu80820; Wed, 3 Oct 2001 20:35:15 -0600 (MDT) (envelope-from imp@harmony.village.org) Received: from harmony.village.org (localhost [127.0.0.1]) by harmony.village.org (8.11.6/8.11.6) with ESMTP id f942ZE724958; Wed, 3 Oct 2001 20:35:14 -0600 (MDT) (envelope-from imp@harmony.village.org) Message-Id: <200110040235.f942ZE724958@harmony.village.org> To: John Kozubik Subject: Re: bluetooth Cc: freebsd-hackers@FreeBSD.ORG In-reply-to: Your message of "Wed, 03 Oct 2001 19:07:42 PDT." References: Date: Wed, 03 Oct 2001 20:35:14 -0600 From: Warner Losh Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG In message John Kozubik writes: : I had a feeling if anyone was looking into it that you were - if nobody : else is looking at it, I'll start working. I have a 3com and a xircom. : Please keep this in mind if you hear of anyone on (or starting on) a : similar track, and I will watch -mobile. Will do. Warner To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Wed Oct 3 20: 0:19 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from saturn.bsdhome.com (unknown [24.25.2.113]) by hub.freebsd.org (Postfix) with ESMTP id 1F5FB37B401 for ; Wed, 3 Oct 2001 20:00:15 -0700 (PDT) Received: from neutrino.bsdhome.com (jupiter [192.168.220.13]) by saturn.bsdhome.com (8.11.3nb1/8.11.4) with ESMTP id f942xpk23967; Wed, 3 Oct 2001 22:59:52 -0400 (EDT) Received: (from bsd@localhost) by neutrino.bsdhome.com (8.11.6/8.11.6) id f942xjn01741; Wed, 3 Oct 2001 22:59:45 -0400 (EDT) (envelope-from bsd) Date: Wed, 3 Oct 2001 22:59:45 -0400 From: Brian Dean To: Zhihui Zhang Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: hardware watch point support Message-ID: <20011003225945.A94118@neutrino.bsdhome.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: ; from zzhang@cs.binghamton.edu on Wed, Oct 03, 2001 at 04:24:26PM -0400 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Seems to work ok for a simple test case I just tried with 4-STABLE (post 4.4-RELEASE). I don't have a 4.3-RELEASE box to test, but it should work there too. -Brian On Wed, Oct 03, 2001 at 04:24:26PM -0400, Zhihui Zhang wrote: > Does FreeBSD 4.3-release support hardware watchpoint? If so, how to enable > it? I tried something like: > > (gdb) watch * 0xc28374d0 > Hardware watchpoint 4: * 3263395024 > (gdb) watch * (int32_t *) 3263427792 > Hardware watchpoint 5: *(int32_t *) 3263427792 > > But it does not seem to work well. Instead, I have to step through the > code to see when a memory value is changed. > > Thanks, > > -Zhihui To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Wed Oct 3 22:12:35 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from kzsu.stanford.edu (KZSU.Stanford.EDU [171.66.118.90]) by hub.freebsd.org (Postfix) with ESMTP id 4B9C637B401 for ; Wed, 3 Oct 2001 22:12:32 -0700 (PDT) Received: (from romain@localhost) by kzsu.stanford.edu (8.11.6/8.11.4) id f945CWh39009 for hackers@FreeBSD.ORG; Wed, 3 Oct 2001 22:12:32 -0700 (PDT) (envelope-from romain) Date: Wed, 3 Oct 2001 22:12:32 -0700 (PDT) From: Romain Kang Message-Id: <200110040512.f945CWh39009@kzsu.stanford.edu> To: hackers@FreeBSD.ORG Subject: 4.2 pkg_add/pkg_delete inconsistency Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Has anyone else noticed the following inconsistency? Some packages have been having problems related to @exec and @unexec statements and the %D sequence. I think this happens because contrary to the pkg_create man page, it appears that %D is expanded for @exec, but not for @unexec. (This seems to be a pkg_delete bug, but I haven't been able to look in the FreeBSD CVS server to figure out if/when @unexec last supported %D). @exec needs an absolute pathname, and using %D fulfill this requirement. @unexec commands take place in the directory specfied by @cwd, so leaving off %D seems to be the easiest way for @unexec to access paths that were set up by @exec. To use an example from the database package: @cwd /usr ... npdatabase/dbcheck ... @exec ln -sf %D/npdatabase/dbcheck %D/local/etc/rc.d/dbcheck.sh @unexec rm -f local/etc/rc.d/dbcheck.sh When the package is added: - npdatabase/dbcheck is installed as /usr/npdatabase/dbcheck - /usr/npdatabase/dbcheck is linked to /usr/local/etc/rc.d/dbcheck.sh When the package is deleted: - /usr/local/etc/rc.d/dbcheck.sh is removed Both @exec and @unexec could use just absolute pathnames (/usr/local/etc/rc.d/dbcheck.sh), but this would prevent relocation of the package. It's not important at the moment, but package relocation could be used in the future to help generate system disk images on manufacturing stands without disturbing the manufacturing machine's installed software. Regards, Romain Kang Disclaimer: I speak for myself alone, romain@kzsu.stanford.edu except when indicated otherwise. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Wed Oct 3 23:41:31 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from squall.waterspout.com (squall.waterspout.com [208.13.56.12]) by hub.freebsd.org (Postfix) with ESMTP id 89F4337B407 for ; Wed, 3 Oct 2001 23:41:29 -0700 (PDT) Received: by squall.waterspout.com (Postfix, from userid 1050) id 5C3569B08; Thu, 4 Oct 2001 01:40:57 -0500 (EST) Date: Thu, 4 Oct 2001 01:40:57 -0500 From: Will Andrews To: Bsdguru@aol.com Cc: hackers@FreeBSD.org Subject: Re: 4.3 vs 4.4 Message-ID: <20011004014057.I24038@squall.waterspout.com> Reply-To: Will Andrews References: <10.136d9f77.28ecf511@aol.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <10.136d9f77.28ecf511@aol.com> User-Agent: Mutt/1.3.22.1i X-Operating-System: FreeBSD 4.3-STABLE i386 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Wed, Oct 03, 2001 at 07:11:13PM -0400, Bsdguru@aol.com wrote: > Thanks for the pointer, and not to the other fellow (jedgar@fxp.org) who > chose to just make a snide remark. Snide? That's what you call snide? Wow, I'd hate to hear what you consider only to be the doing of a true jerk. Next time if you don't know where something is just ask, don't be a blue meanie like this to someone who was only trying to help. Geez. What's happened to courtesy in this world...!? -- wca To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Wed Oct 3 23:50: 7 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from distortion.dk (distortion.dk [195.249.147.156]) by hub.freebsd.org (Postfix) with ESMTP id 1F4E137B403 for ; Wed, 3 Oct 2001 23:50:02 -0700 (PDT) Received: from petri2000 ([194.192.131.98]) by distortion.dk (8.9.3/8.9.1) with SMTP id IAA92636; Thu, 4 Oct 2001 08:58:09 +0200 (CEST) (envelope-from freebsd@petri.cc) Message-ID: <006901c14ca0$c1e6c7d0$8632a8c0@atomic.dk> From: "Nicolai Petri" To: "Warner Losh" Cc: References: <200110040108.f9418w724611@harmony.village.org> Subject: Re: bluetooth Date: Thu, 4 Oct 2001 08:49:46 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Hi Warner, I've seen cards for sale on http://www.digianswer.dk (Motorola's Bluetooth center), the price is 200$ for a retail pccard. Best regards, - Nicolai Petri ----- Original Message ----- From: "Warner Losh" To: "John Kozubik" Cc: Sent: Thursday, October 04, 2001 3:08 AM Subject: Re: bluetooth > In message John Kozubik writes: > : Is anyone working on bluetooth drivers and accompanying userland programs > : (bluetooth equivalents of wicontrol, etc.) ? > > I tried to get a bluetooth pcmcia card, but I haven't been able to win > one on ebay or find one availble through more normal channels. > > I've also had no luck finding datasheets on the bluetooth stuff, but > to be honest I haven't tried too hard. > > Warner > > 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 Oct 4 0:34:45 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from mta02-svc.ntlworld.com (mta02-svc.ntlworld.com [62.253.162.42]) by hub.freebsd.org (Postfix) with ESMTP id EBFCA37B405 for ; Thu, 4 Oct 2001 00:34:41 -0700 (PDT) Received: from dmlb.org ([62.253.135.228]) by mta02-svc.ntlworld.com (InterMail vM.4.01.03.00 201-229-121) with ESMTP id <20011004073440.CLNX29790.mta02-svc.ntlworld.com@dmlb.org>; Thu, 4 Oct 2001 08:34:40 +0100 Received: from dmlb by dmlb.org with local (Exim 3.03 #1) id 15p31j-0001La-00; Thu, 04 Oct 2001 08:34:39 +0100 Message-ID: X-Mailer: XFMail 1.3 [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: <3BBBC67E.2FDFA927@digisle.net> Date: Thu, 04 Oct 2001 08:34:39 +0100 (BST) From: Duncan Barclay To: Maksim Yevmenkin Subject: Re: bluetooth Cc: freebsd-hackers@FreeBSD.ORG, John Kozubik Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Hi I might be worth talking to the people at http://www.blueaid.com/ Bill Munday has written and architected a number of the Bluetooth stacks various vendors use. He does free consulting and knows a _lot_ of people in the Bluetooth world. He is likely to know about other Bluetooth efforts for Linux. I can also help out with concepts/overviews etc. I have designed RFICs for Bluetooth and am part of the SIG writing version 1.2 of the standard (and no, I didn't do any of version 1.1 so don't hassle me!). Duncan On 04-Oct-01 Maksim Yevmenkin wrote: > >> Is anyone working on bluetooth drivers and accompanying userland programs >> (bluetooth equivalents of wicontrol, etc.) ? > > ok :) i'm actually working on BlueTooth stack for FreeBSD. so far > i have some code that implements basic functionality for HCI layer. > the implementation is based on Netgraph and supposed to be completely > optional. > > thanks, > max > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-hackers" in the body of the message > --- ________________________________________________________________________ Duncan Barclay | God smiles upon the little children, dmlb@dmlb.org | the alcoholics, and the permanently stoned. dmlb@freebsd.org| Steven King To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Thu Oct 4 7:59:32 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from www.kozubik.com (www.kozubik.com [216.188.96.212]) by hub.freebsd.org (Postfix) with ESMTP id 0E96637B406 for ; Thu, 4 Oct 2001 07:59:24 -0700 (PDT) Received: from localhost (john@localhost) by www.kozubik.com (8.11.0/8.11.0) with ESMTP id f94EpwM68669; Thu, 4 Oct 2001 07:51:58 -0700 (PDT) (envelope-from john@kozubik.com) Date: Thu, 4 Oct 2001 07:51:58 -0700 (PDT) From: John Kozubik To: Nicolai Petri Cc: Warner Losh , freebsd-hackers@FreeBSD.ORG Subject: Re: bluetooth In-Reply-To: <006901c14ca0$c1e6c7d0$8632a8c0@atomic.dk> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG I found my cards at pricewatch.com - just type bluetooth into the top search textbox - you should see 3com and xircom cards come up for $120 - $150. ----- John Kozubik - john@kozubik.com - http://www.kozubik.com On Thu, 4 Oct 2001, Nicolai Petri wrote: > Hi Warner, > > I've seen cards for sale on http://www.digianswer.dk (Motorola's Bluetooth > center), the price is 200$ for a retail pccard. > > Best regards, > - Nicolai Petri > > ----- Original Message ----- > From: "Warner Losh" > To: "John Kozubik" > Cc: > Sent: Thursday, October 04, 2001 3:08 AM > Subject: Re: bluetooth > > > > In message John > Kozubik writes: > > : Is anyone working on bluetooth drivers and accompanying userland > programs > > : (bluetooth equivalents of wicontrol, etc.) ? > > > > I tried to get a bluetooth pcmcia card, but I haven't been able to win > > one on ebay or find one availble through more normal channels. > > > > I've also had no luck finding datasheets on the bluetooth stuff, but > > to be honest I haven't tried too hard. > > > > Warner > > > > 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 > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Thu Oct 4 8:54:10 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from owa-sj-1.digisle.com (owa-sj-1.digisle.com [167.216.153.124]) by hub.freebsd.org (Postfix) with ESMTP id DB6F437B407 for ; Thu, 4 Oct 2001 08:54:04 -0700 (PDT) Received: from VWALL-SJ-1.digisle.com ([167.216.153.118]) by owa-sj-1.digisle.com with Microsoft SMTPSVC(5.0.2195.2966); Thu, 4 Oct 2001 08:55:17 -0700 Received: from 206.220.227.145 by VWALL-SJ-1.digisle.com (InterScan E-Mail VirusWall NT); Thu, 04 Oct 2001 08:53:58 -0700 Message-ID: <3BBC8616.67094EF7@digisle.net> Date: Thu, 04 Oct 2001 08:53:58 -0700 From: Maksim Yevmenkin Organization: Digital Island X-Mailer: Mozilla 4.78 [en] (X11; U; SunOS 5.7 sun4u) X-Accept-Language: en MIME-Version: 1.0 To: Duncan Barclay Cc: freebsd-hackers@FreeBSD.ORG, John Kozubik Subject: Re: bluetooth References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 04 Oct 2001 15:55:17.0646 (UTC) FILETIME=[F69B72E0:01C14CEC] Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Duncan > I might be worth talking to the people at > > http://www.blueaid.com/ Thanks for the info! > Bill Munday has written and architected a number of the Bluetooth stacks > various vendors use. He does free consulting and knows a _lot_ of people > in the Bluetooth world. He is likely to know about other Bluetooth > efforts for Linux. Again thanks for the name :) As far as Linux concern, i'm aware of two BlueTooth stacks for Linux 1) AXIS OpenBT stack (http://sourceforge.net/projects/openbt/) 2) Bluez (http://bluez.sourceforge.net/) (i actually know the Bluez author. Great programmer, we use to work together.) > I can also help out with concepts/overviews etc. I have designed RFICs > for Bluetooth and am part of the SIG writing version 1.2 of the standard > (and no, I didn't do any of version 1.1 so don't hassle me!). Well, i would like to take this opportunity and tell a little bit more about current status :) If anyone feels that it is not appropriate place or time please let me know. [...] > > the implementation is based on Netgraph and supposed to be completely > > optional. The current design goals are: 1) Minimal changes to FreeBSD kernel code. It should be possible to maintain stack outside of FreeBSD code if required. 2) Stack must be optional. Do not want it - do not use it. 3) Stack must be flexible. Parts of the stack must be replaceable. 4) Stack must provide access to all protocol layers. 5) Try to avoid (if possible) kernel threads and try to reduce or eliminate extra overhead on synchronization. 6) Stack must provide option to configure each unit in "special" way to work around possible hardware bugs. 7) Try to stay within Netgraph infrastructure and reuse most of Netgraph tools (ngctl etc). i want to do something different rather than "classic" network stack. That is why i decided to try Netgraph framework. It is highly experimental code (proof of concept, if you will :) So far things looks like this. Please note i'm still working on this and there might be other "oop"es and "gotcha"s :) x x | | User space /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\ | | Kernel / | sco | acl \ +--V-----------------V--+ / | | cmd \ | Netgraph HCI node <---------------/--> "btd" | | \ daemon. +----------^------------+ / Controls BlueTooth | drv \ unit | | | right Kernel space / User space +----------V------------+ \ | |---------------/--> | Netgraph "tee" node | righ2left \ "btdump" | |---------------/--> utility +----------^------------+ left2right \ Dumps all packets | left / "a-la" tcpdump | | | hook +----------V------------+ | | | BlueTooth unit driver | | (Netgraph node) | | | +-----------------------+ New instance of a HCI node are created for each BlueTooth unit. The participating nodes are connected as described above. The HCI node exports three hooks: 1) acl - ACL data (Data) 2) sco - SCO data (Voice) 3) cmd - special hook that allows to send HCI commands to the unit. All HCI commands and events are mapped to Netgraph control messages. One HCI command/event - one control message. The "tee" node is used to provide access to raw data and if this is not required may be omitted. The current model is one user space process per BlueTooth unit. However it might be converted to thread per process model. Control daemon "btd" is responsible for initialization and control of the unit. When daemon starts it sends set of HCI commands to recognize unit and then sends another set of HCI commands to perform actual intialization. Results are reported back in form of Netgraph control messages. The initialization sequence may vary depending on specific unit (to work around possible hardware bugs) and daemon must decide if it was successful or not. The control daemon also may implement additional features such as management of pin codes and link keys etc. In the near future there will be L2CAP node that will be attached to "acl" hook. But for now it is possible to implement L2CAP procotol as user space daemon, and then convert it to Netgraph node. The same is true for RFCOMM, SDP and TCP (Telephony Control Protocol :) nodes. thanks, max To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Thu Oct 4 9: 4: 2 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from gvr.gvr.org (gvr.gvr.org [212.61.40.17]) by hub.freebsd.org (Postfix) with ESMTP id 13FBA37B403 for ; Thu, 4 Oct 2001 09:03:59 -0700 (PDT) Received: by gvr.gvr.org (Postfix, from userid 657) id D3A33586C; Thu, 4 Oct 2001 18:03:56 +0200 (CEST) Date: Thu, 4 Oct 2001 18:03:56 +0200 From: Guido van Rooij To: freebsd-hackers@freebsd.org Subject: grep memory footage Message-ID: <20011004180356.A76896@gvr.gvr.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG When fgrepping a huge file (say 10GB) for a non-existing string, fgrep's memory size skyrockets. At a certain point in time its SIZE was 391M (RSS was about 30MB) and the system got rather unreponsive. The string was about 12 bytes big, and we fail to see why grep would need so much. Is there a good explanation for this? -Guido To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Thu Oct 4 9: 4:21 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from avocet.mail.pas.earthlink.net (avocet.mail.pas.earthlink.net [207.217.121.50]) by hub.freebsd.org (Postfix) with ESMTP id C2EE437B405 for ; Thu, 4 Oct 2001 09:04:19 -0700 (PDT) Received: from pool0208.cvx4-bradley.dialup.earthlink.net ([209.178.146.208] helo=sm.socccd.cc.ca.us) by avocet.mail.pas.earthlink.net with esmtp (Exim 3.32 #2) id 15pAyk-0003eJ-00; Thu, 04 Oct 2001 09:04:07 -0700 Message-ID: <3BBC8937.44A77CF9@sm.socccd.cc.ca.us> Date: Thu, 04 Oct 2001 09:07:19 -0700 From: Farooq Mela X-Mailer: Mozilla 4.76 [en] (X11; U; FreeBSD 4.4-STABLE i386) X-Accept-Language: en MIME-Version: 1.0 To: "Andrew L. Neporada" Cc: Bakul Shah , freebsd-hackers@freebsd.org Subject: Re: current strstr(3) implementation is slow References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG "Andrew L. Neporada" wrote: > to Algorithms" book (AKA CLR) by MIT Press, more precisely "Knuth, Morris > and Pratt algorithm". Hmm, sounds good, much better than naive string matching algorithm. However I think it would be a good idea to check if the length of the pattern <= architecture's word size (i386 is 32, alpha is 64, etc), and if so use shift-or matching [Baeza-Yates & Gonnet, "A New Approach to Text Searching," CACM 35, Oct. 1992, 74-82]. Shift-or matching only requires an array of 256 * word size bits which can be on the stack, but KMP matching needs O(M) which must be malloc'ed. Shift-or is usually considerably faster than KMP algorithm, see paper for details. -- farooq To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Thu Oct 4 9:38:34 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from milliways.chance.ru (milliways.chance.ru [195.190.107.35]) by hub.freebsd.org (Postfix) with ESMTP id D6DB937B401 for ; Thu, 4 Oct 2001 09:38:19 -0700 (PDT) Received: from do-labs.spb.ru (ppp-2.chance.ru [195.190.107.5]) by milliways.chance.ru (8.9.0/8.9.0) with SMTP id UAA04706 for ; Thu, 4 Oct 2001 20:37:58 +0400 (MSD) Received: (qmail 3107 invoked by uid 1000); 4 Oct 2001 20:40:24 -0000 Date: Thu, 4 Oct 2001 20:40:24 +0000 From: Vladimir Dozen To: hackers@freebsd.org Cc: Poul-Henning Kamp , Matt Dillon , Wilko Bulte , Alfred Perlstein Subject: Re: VM: file swapping (this time in libc): patch Message-ID: <20011004204023.C2422@eix.do-labs.spb.ru> References: <200109300752.f8U7qsj41649@earth.backplane.com> <909.1001839737@critter> <20011003233444.A8637@eix.do-labs.spb.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.4i In-Reply-To: <20011003233444.A8637@eix.do-labs.spb.ru>; from vladimir-dozen@mail.ru on Wed, Oct 03, 2001 at 11:34:45PM +0000 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG ehlo. I was told that diff format I used is unappropriate for most cases, so I redo it in unified (-u) format. Purpose: to allow developers of large applications to use system memory allocation routines for allocating in mmap()ed file instead of writing own ones. Also, allow to run applications that may use huge amount of memory (like Gimp) without reconfiguring swap. Patch description: the patch implements file-backed memory allocation for regular malloc() routine. If 'F' flag is set in malloc options, instead of doing mmap(MAP_ANON), malloc() maps regions from temporal file. File is growed as neccessary, and new regions are mapped from the same file. Details: to avoid using two methods of allocation (brk() and mmap()) in the same file, regular allocation altered to use mmap(). This is done by writing emulators (brk_emulator() and sbrk_emulator()). File allocator uses single descriptor (usually fd==512). File is created in directory specified by $SWAPDIR, $TMPDIR or "/tmp" (in this order). $SWAPDIR is introduced since often people use memory file system for /tmp. Temporal file is unlinked after creation, so it will be deleted automatically at exit. Informal testing shows no performance hit comparing with old-style brk() allocation, and small hit when using file-backed allocation. Here the patch (made on 4.3-RELEASE-p20) =============================== --- malloc.c.old Tue Oct 2 12:52:25 2001 +++ malloc.c Thu Oct 4 20:05:52 2001 @@ -97,7 +97,7 @@ #include #include #include - + /* * This structure describes a page worth of chunks. */ @@ -245,9 +245,6 @@ #define UTRACE(a,b,c) #endif /* HAS_UTRACE */ -/* my last break. */ -static void *malloc_brk; - /* one location cache for free-list holders */ static struct pgfree *px; @@ -262,6 +259,7 @@ mmap(0, (size), PROT_READ|PROT_WRITE, MAP_ANON|MAP_PRIVATE, \ MMAP_FD, 0); + /* * Necessary function declarations */ @@ -297,6 +295,167 @@ } /* + * file swap options + */ +static int malloc_file_swap; +static char* malloc_file_swap_dir; +static int malloc_file_swap_num; +static int malloc_file_swap_fd; +static int malloc_file_swap_offset; +static int malloc_file_swap_size; + +/* + * mmap-based brk/sbrk emulation + */ +static char *malloc_brk; +static char* sbrk_emulation(int incr) +{ + if( incr == 0 ) return malloc_brk; + wrterror("unsupported sbrk argument"); +}; + +/** + * brk emulation + * + * note that return value is different from brk! + * @result 0 allocation failed, ptr -- start of new block + * @param new_brk desired location of new top of heap + * + */ +static char* brk_emulation(char* new_brk) +{ + char* p; + char buf[4096]; + int filegrow,wr,blocksize; + int stage; + int tmp_fd; + + /* size of requested block */ + blocksize = new_brk-malloc_brk; + + /* increase heap size */ + if( blocksize > 0 ) + { + if( malloc_file_swap ) + { + /* create file at first call */ + if( malloc_file_swap_num == 0 ) + { + /* where to put swap file */ + if( !malloc_file_swap_dir ) malloc_file_swap_dir = getenv("SWAPDIR"); + if( !malloc_file_swap_dir ) malloc_file_swap_dir = getenv("TMPDIR"); + if( !malloc_file_swap_dir ) malloc_file_swap_dir = "/tmp"; + + /* generate random file name and open it */ + do + { + snprintf(buf,sizeof(buf),"%s/%08x.swap", + malloc_file_swap_dir,malloc_file_swap_num); + malloc_file_swap_num *= 11; + malloc_file_swap_num += 13; + malloc_file_swap_fd = open(buf,O_CREAT|O_EXCL|O_RDWR|O_NOFOLLOW,0600); + } + while( malloc_file_swap_fd < 0 && errno == EEXIST ); + if( malloc_file_swap_fd < 0 ) return 0; + + /* + * some shell scripts (GNU configure?) can be + * unhappy if we use descriptor 4 or 5; also qmail-send + * uses descriptors up to 6 in normal mode. + * so we dup descriptor into large enough and close original + */ + tmp_fd = 512; + while( tmp_fd >= 0 && dup2(malloc_file_swap_fd,tmp_fd) < 0 ) tmp_fd--; + if( tmp_fd < 0 ) return 0; + close(malloc_file_swap_fd); + malloc_file_swap_fd = tmp_fd; + + /* unlink file to autoremove it at last reference lost */ + unlink(buf); + } + + if( malloc_file_swap_offset+blocksize > malloc_file_swap_size ) + { + /* fill tail of file with zeroes */ + memset(buf,0,sizeof(buf)); + + /* + * grow file + * critical grow: + * allocate requested size; if any error happens here, + * whole allocation fails; + * supplemental grow: + * pre-allocate one more megabyte; errors are ignored + */ + for( stage=0; stage<2; stage++ ) + { + if( stage == 0 ) filegrow = blocksize; + else filegrow = 1024*1024; + + while( filegrow > 0 ) + { + /* note that file position is always at end of file */ + wr = write(malloc_file_swap_fd, + buf,sizeof(buf)= malloc_ninfo && !extend_pgdir(last_index)) - return 0;; + if ((last_index+1) >= malloc_ninfo && !extend_pgdir(last_index)) return 0;; return result; } @@ -428,6 +586,8 @@ case 'X': malloc_xmalloc = 1; break; case 'z': malloc_zero = 0; break; case 'Z': malloc_zero = 1; break; + case 'f': malloc_file_swap = 0; break; + case 'F': malloc_file_swap = 1; break; default: j = malloc_abort; malloc_abort = 0; @@ -464,7 +624,7 @@ * We need a maximum of malloc_pageshift buckets, steal these from the * front of the page_directory; */ - malloc_origo = ((u_long)pageround((u_long)sbrk(0))) >> malloc_pageshift; + malloc_origo = ((u_long)pageround((u_long)sbrk_emulation(0))) >> malloc_pageshift; malloc_origo -= malloc_pageshift; malloc_ninfo = malloc_pagesize / sizeof *page_dir; @@ -478,7 +638,7 @@ /* * This is a nice hack from Kaleb Keithly (kaleb@x.org). - * We can sbrk(2) further back when we keep this on a low address. + * We can sbrk_emulation(2) further back when we keep this on a low address. */ px = (struct pgfree *) imalloc (sizeof *px); @@ -513,7 +673,7 @@ wrterror("(ES): zero entry on free_list\n"); if (pf->page > pf->end) wrterror("(ES): sick entry on free_list\n"); - if ((void*)pf->page >= (void*)sbrk(0)) + if ((void*)pf->page >= (void*)sbrk_emulation(0)) wrterror("(ES): entry on free_list past brk\n"); if (page_dir[ptr2index(pf->page)] != MALLOC_FREE) wrterror("(ES): non-free first page on free-list\n"); @@ -544,11 +704,9 @@ wrterror("(ES): allocated non-free page on free-list\n"); #endif /* EXTRA_SANITY */ - size >>= malloc_pageshift; - /* Map new pages */ - if (!p) - p = map_pages(size); + size >>= malloc_pageshift; + if (!p) p = map_pages(size); if (p) { @@ -920,7 +1078,7 @@ if (!pf->next && /* If we're the last one, */ pf->size > malloc_cache && /* ..and the cache is full, */ pf->end == malloc_brk && /* ..and none behind us, */ - malloc_brk == sbrk(0)) { /* ..and it's OK to do... */ + malloc_brk == sbrk_emulation(0)) { /* ..and it's OK to do... */ /* * Keep the cache intact. Notice that the '>' above guarantees that @@ -929,8 +1087,8 @@ pf->end = (char *)pf->page + malloc_cache; pf->size = malloc_cache; - brk(pf->end); - malloc_brk = pf->end; + /* FIXME: here we must check returned address */ + brk_emulation(pf->end); index = ptr2index(pf->end); last_index = index - 1; =============================== -- dozen @ home To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Thu Oct 4 9:45:54 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from mailout06.sul.t-online.de (mailout06.sul.t-online.com [194.25.134.19]) by hub.freebsd.org (Postfix) with ESMTP id 760D937B401; Thu, 4 Oct 2001 09:45:46 -0700 (PDT) Received: from fwd03.sul.t-online.de by mailout06.sul.t-online.de with smtp id 15pBcq-0005RF-06; Thu, 04 Oct 2001 18:45:32 +0200 Received: from giskard.foundation.hs (320048919767-0001@[217.81.134.253]) by fmrl03.sul.t-online.com with esmtp id 15pBca-0F7gm0C; Thu, 4 Oct 2001 18:45:16 +0200 Received: from daneel.foundation.hs (daneel.foundation.hs [192.168.20.2]) by giskard.foundation.hs (8.9.3/8.9.3) with ESMTP id SAA76058; Thu, 4 Oct 2001 18:44:44 +0200 (CEST) (envelope-from hschaefer@fto.de) Date: Thu, 4 Oct 2001 18:43:29 +0200 (CEST) From: Heiko Schaefer X-X-Sender: To: "Long, Scott" Cc: "'Daniel O'Connor'" , Guenter Bartsch , , Robert Edmonds , , xine-user Subject: RE: [xine-user] xine on freebsd? In-Reply-To: <50486691668CD511BB660000D11ABE92147246@btcexc01.btc.adaptec.com> Message-ID: <20011004184208.I50599-100000@daneel.foundation.hs> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Sender: 320048919767-0001@t-dialin.net Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Hey everyone, > > Also, are you sure that you have enough shared memory on the freebsd box? > By > > default the amount of shm you can use is fairly small, and if you use > GNOME it > > will easily eat it all. > > I can't agree with this statement more. Gnome/GTK is a pig on SHM, and the > FreeBSD default make relatively low amounts of memory and segments > available. There are various kernel options and tunables that can be set to > ajust this. is there anything expect for kern.ipc.shmmax=67108864 kern.ipc.shmall=32768 that is worth looking into !? xine's documentation says to set these values already for a very long time, as without such a setting xine won't run at all. Heiko To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Thu Oct 4 10:28:40 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from imo-r03.mx.aol.com (imo-r03.mx.aol.com [152.163.225.99]) by hub.freebsd.org (Postfix) with ESMTP id 1355E37B403 for ; Thu, 4 Oct 2001 10:28:37 -0700 (PDT) Received: from Bsdguru@aol.com by imo-r03.mx.aol.com (mail_out_v31_r1.7.) id n.137.296ca27 (4241) for ; Thu, 4 Oct 2001 13:28:25 -0400 (EDT) From: Bsdguru@aol.com Message-ID: <137.296ca27.28edf63e@aol.com> Date: Thu, 4 Oct 2001 13:28:30 EDT Subject: 64bit Ethernet Card (if_sf driver) To: hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Mailer: AOL 5.0 for Windows sub 139 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG I've been testing the adaptec 64044 card (if_sf driver) which is a 64bit 66Mhz 4 port ethernet. I can have come to one of two conclusions: 1) the card sucks 2) the driver sucks or both. A 32bit Dlink 4 port card outperforms it by a wide margin, as do 32bit eepro100s. "wide margin" being defined as about 40%. Given that bus resources are not easily measureable..Im quoting cpu usage for handling the same number of pps. But its pretty difficult to justify using a 64bit slot and rather expensive card with such lousy performance. I cant even justify the bus-bandwidth saving with a card that cant route more than 250Mb/s. I guess my question has to do with whether the board is just a dog or the driver needs substantial optimization. The folks at adaptec aren't dopes generally, so I cant imagine that they chose a chipset that was so inferior to the one on their 32bit adapter (which uses the same as the Dlink). Anyone with experience or ideas? Bryan To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Thu Oct 4 10:43: 6 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from flood.ping.uio.no (flood.ping.uio.no [129.240.78.31]) by hub.freebsd.org (Postfix) with ESMTP id D02C137B403 for ; Thu, 4 Oct 2001 10:43:02 -0700 (PDT) Received: (from des@localhost) by flood.ping.uio.no (8.9.3/8.9.3) id TAA52996; Thu, 4 Oct 2001 19:42:58 +0200 (CEST) (envelope-from des@ofug.org) X-URL: http://www.ofug.org/~des/ X-Disclaimer: The views expressed in this message do not necessarily coincide with those of any organisation or company with which I am or have been affiliated. To: Doug White Cc: , Subject: Re: if_sf bug References: From: Dag-Erling Smorgrav Date: 04 Oct 2001 19:42:57 +0200 In-Reply-To: Message-ID: Lines: 13 User-Agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Doug White writes: > On Wed, 3 Oct 2001 Bsdguru@aol.com wrote: > > The if_sf driver doesnt seem to initialize itself until an address is set, > > which makes things like tcpdump, bridging and other promiscuous things not > > work. > All the interfaces do that. If you want to make an invisible interface, > configure it with IP 0.0.0.0. I believe 'ifconfig foo0 up' is sufficient. DES -- Dag-Erling Smorgrav - des@ofug.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Thu Oct 4 10:52:45 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from flood.ping.uio.no (flood.ping.uio.no [129.240.78.31]) by hub.freebsd.org (Postfix) with ESMTP id D36CB37B401 for ; Thu, 4 Oct 2001 10:52:40 -0700 (PDT) Received: (from des@localhost) by flood.ping.uio.no (8.9.3/8.9.3) id TAA53045; Thu, 4 Oct 2001 19:52:36 +0200 (CEST) (envelope-from des@ofug.org) X-URL: http://www.ofug.org/~des/ X-Disclaimer: The views expressed in this message do not necessarily coincide with those of any organisation or company with which I am or have been affiliated. To: Michael Sinz Cc: Warner Losh , gkshenaut@ucdavis.edu, hackers@FreeBSD.ORG Subject: Re: ALT- (Was: how to make 'for' understand two words as a singleargumen) References: <200110022357.f92NvnS08486@thistle.bogs.org> <7fffe3770386f507d1@[192.168.1.4]> <7ffffcf203a07007d1@[192.168.1.4]> From: Dag-Erling Smorgrav Date: 04 Oct 2001 19:52:36 +0200 In-Reply-To: <7ffffcf203a07007d1@[192.168.1.4]> Message-ID: Lines: 23 User-Agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Michael Sinz writes: > BTW - How does your system represent a file with 0xA0 in it? An ls on > FreeBSD 4.4-Stable seems to show it as: > > -rw-r--r-- 1 msinz msinz 0 Oct 3 12:00 foo?bar > > Interesting - not what I would have expected but I think "non-printables" > are replaced by the "?" when ls runs. > > Even more interesting is this: > > -rw-r--r-- 1 msinz msinz 0 Oct 3 12:00 foo?bar > -rw-r--r-- 1 msinz msinz 1 Oct 3 12:05 foo?bar > > (one has a linefeed in the name and one has a non-breaking space in the name) This is only "interesting" (in the sense in which you seem to use the word) to someone who has not read the ls(1) manual page, and does not know of the -q and -B options... DES -- Dag-Erling Smorgrav - des@ofug.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Thu Oct 4 10:59:56 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from flood.ping.uio.no (flood.ping.uio.no [129.240.78.31]) by hub.freebsd.org (Postfix) with ESMTP id 11E6537B403 for ; Thu, 4 Oct 2001 10:59:53 -0700 (PDT) Received: (from des@localhost) by flood.ping.uio.no (8.9.3/8.9.3) id TAA53079; Thu, 4 Oct 2001 19:59:31 +0200 (CEST) (envelope-from des@ofug.org) X-URL: http://www.ofug.org/~des/ X-Disclaimer: The views expressed in this message do not necessarily coincide with those of any organisation or company with which I am or have been affiliated. To: Zhihui Zhang Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: Make a kernel in a different directory References: From: Dag-Erling Smorgrav Date: 04 Oct 2001 19:59:30 +0200 In-Reply-To: Message-ID: Lines: 12 User-Agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Zhihui Zhang writes: > I put the whole kernel code under /test by the following command: > [...] > I go to the directory and there is nothing except Makefile there: The object files and the compiled module are located in /test/sys/compile/TRY/modules/test/sys/modules/accf_http (unless you've done something funky with symlinks). DES -- Dag-Erling Smorgrav - des@ofug.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Thu Oct 4 11:24:32 2001 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 7CD9337B406 for ; Thu, 4 Oct 2001 11:24:29 -0700 (PDT) Received: from onyx (onyx.cs.binghamton.edu [128.226.140.171]) by bingnet2.cc.binghamton.edu (8.11.4/8.11.4) with ESMTP id f94IOPD08768; Thu, 4 Oct 2001 14:24:25 -0400 (EDT) Date: Thu, 4 Oct 2001 14:23:51 -0400 (EDT) From: Zhihui Zhang X-Sender: zzhang@onyx To: Dag-Erling Smorgrav Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: Make a kernel in a different directory In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Thanks for your reply. I check the directories. You are right. Normally, it is under /usr/src/sys/compile/TFS/modules/usr/src/sys/modules/accf_http. Do I have to set up some symbolic links or modify some environment variable to make "make install" work in my case (find the KLDs under TRY/modules/test/... not under the normal patch)? -Zhihui On 4 Oct 2001, Dag-Erling Smorgrav wrote: > Zhihui Zhang writes: > > I put the whole kernel code under /test by the following command: > > [...] > > I go to the directory and there is nothing except Makefile there: > > The object files and the compiled module are located in > /test/sys/compile/TRY/modules/test/sys/modules/accf_http (unless > you've done something funky with symlinks). > > DES > -- > Dag-Erling Smorgrav - des@ofug.org > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Thu Oct 4 11:30:57 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from c527597-a.cstvl1.sfba.home.com (c527597-a.cstvl1.sfba.home.com [24.176.204.87]) by hub.freebsd.org (Postfix) with ESMTP id 8612A37B406 for ; Thu, 4 Oct 2001 11:30:49 -0700 (PDT) Received: (from bmah@localhost) by c527597-a.cstvl1.sfba.home.com (8.11.6/8.11.6) id f94IUhR73033; Thu, 4 Oct 2001 11:30:43 -0700 (PDT) (envelope-from bmah) Message-Id: <200110041830.f94IUhR73033@c527597-a.cstvl1.sfba.home.com> X-Mailer: exmh version 2.5 07/13/2001 with nmh-1.0.4 To: Dag-Erling Smorgrav Cc: Doug White , Bsdguru@aol.com, hackers@FreeBSD.ORG Subject: Re: if_sf bug In-Reply-To: References: Comments: In-reply-to Dag-Erling Smorgrav message dated "04 Oct 2001 19:42:57 +0200." From: "Bruce A. Mah" Reply-To: bmah@FreeBSD.ORG X-Face: g~c`.{#4q0"(V*b#g[i~rXgm*w;:nMfz%_RZLma)UgGN&=j`5vXoU^@n5v4:OO)c["!w)nD/!!~e4Sj7LiT'6*wZ83454H""lb{CC%T37O!!'S$S&D}sem7I[A 2V%N&+ X-Image-Url: http://www.employees.org/~bmah/Images/bmah-cisco-small.gif X-Url: http://www.employees.org/~bmah/ Mime-Version: 1.0 Content-Type: multipart/signed; boundary="==_Exmh_1798317949P"; micalg=pgp-sha1; protocol="application/pgp-signature" Content-Transfer-Encoding: 7bit Date: Thu, 04 Oct 2001 11:30:43 -0700 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG --==_Exmh_1798317949P Content-Type: text/plain; charset=us-ascii If memory serves me right, Dag-Erling Smorgrav wrote: > Doug White writes: > > On Wed, 3 Oct 2001 Bsdguru@aol.com wrote: > > > The if_sf driver doesnt seem to initialize itself until an address is set > , > > > which makes things like tcpdump, bridging and other promiscuous things no > t > > > work. > > All the interfaces do that. If you want to make an invisible interface, > > configure it with IP 0.0.0.0. > > I believe 'ifconfig foo0 up' is sufficient. Confirming data point: "ifconfig dc0 up" allowed tcpdump in promiscuous mode when I tried it. Bruce. --==_Exmh_1798317949P Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (FreeBSD) Comment: Exmh version 2.3.1+ 05/14/2001 iD8DBQE7vKrS2MoxcVugUsMRAjx+AKCKGXJ2DGa+buTBcH+Yye9A9OYvwwCfVjSH U7qNncTSMURUWENjvLHANIM= =xQ6c -----END PGP SIGNATURE----- --==_Exmh_1798317949P-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Thu Oct 4 11:39:51 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from mass.dis.org (mass.dis.org [216.240.45.41]) by hub.freebsd.org (Postfix) with ESMTP id 799ED37B401 for ; Thu, 4 Oct 2001 11:39:48 -0700 (PDT) Received: from mass.dis.org (localhost [127.0.0.1]) by mass.dis.org (8.11.6/8.11.3) with ESMTP id f94InnE01299; Thu, 4 Oct 2001 11:49:50 -0700 (PDT) (envelope-from msmith@mass.dis.org) Message-Id: <200110041849.f94InnE01299@mass.dis.org> X-Mailer: exmh version 2.1.1 10/15/1999 To: Guido van Rooij Cc: freebsd-hackers@freebsd.org Subject: Re: grep memory footage In-reply-to: Your message of "Thu, 04 Oct 2001 18:03:56 +0200." <20011004180356.A76896@gvr.gvr.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Thu, 04 Oct 2001 11:49:49 -0700 From: Mike Smith Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG > > When fgrepping a huge file (say 10GB) for a non-existing string, > fgrep's memory size skyrockets. At a certain point in time its SIZE was 391M > (RSS was about 30MB) and the system got rather unreponsive. The > string was about 12 bytes big, and we fail to see why grep would > need so much. > > Is there a good explanation for this? It's a known bug in grep; there are probably a bunch of PRs outstanding on it. We need grep to be updated. -- ... every activity meets with opposition, everyone who acts has his rivals and unfortunately opponents also. But not because people want to be opponents, rather because the tasks and relationships force people to take different points of view. [Dr. Fritz Todt] V I C T O R Y N O T V E N G E A N C E To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Thu Oct 4 12: 2:33 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from whale.sunbay.crimea.ua (whale.sunbay.crimea.ua [212.110.138.65]) by hub.freebsd.org (Postfix) with ESMTP id 3D72B37B406; Thu, 4 Oct 2001 12:02:25 -0700 (PDT) Received: (from ru@localhost) by whale.sunbay.crimea.ua (8.11.6/8.11.2) id f94J2KE17608; Thu, 4 Oct 2001 22:02:20 +0300 (EEST) (envelope-from ru) Date: Thu, 4 Oct 2001 22:02:20 +0300 From: Ruslan Ermilov To: Mike Smith Cc: Guido van Rooij , freebsd-hackers@FreeBSD.ORG Subject: Re: grep memory footage Message-ID: <20011004220220.A17190@sunbay.com> References: <20011004180356.A76896@gvr.gvr.org> <200110041849.f94InnE01299@mass.dis.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <200110041849.f94InnE01299@mass.dis.org>; from msmith@FreeBSD.ORG on Thu, Oct 04, 2001 at 11:49:49AM -0700 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Thu, Oct 04, 2001 at 11:49:49AM -0700, Mike Smith wrote: > > > > When fgrepping a huge file (say 10GB) for a non-existing string, > > fgrep's memory size skyrockets. At a certain point in time its SIZE was 391M > > (RSS was about 30MB) and the system got rather unreponsive. The > > string was about 12 bytes big, and we fail to see why grep would > > need so much. > > > > Is there a good explanation for this? > > It's a known bug in grep; there are probably a bunch of PRs outstanding > on it. We need grep to be updated. > The sad thing is that GNU Grep has recently lost his maintainer. Let me know if you want additional details. Cheers, -- Ruslan Ermilov Oracle Developer/DBA, ru@sunbay.com Sunbay Software AG, ru@FreeBSD.org FreeBSD committer, +380.652.512.251 Simferopol, Ukraine http://www.FreeBSD.org The Power To Serve http://www.oracle.com Enabling The Information Age To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Thu Oct 4 12: 6:48 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from msgbas1.cos.agilent.com (msgbas1x.cos.agilent.com [192.25.240.36]) by hub.freebsd.org (Postfix) with ESMTP id E5D2A37B409 for ; Thu, 4 Oct 2001 12:06:46 -0700 (PDT) Received: from msgrel1.cos.agilent.com (msgrel1.cos.agilent.com [130.29.152.77]) by msgbas1.cos.agilent.com (Postfix) with ESMTP id 78DFE2FCC for ; Thu, 4 Oct 2001 13:06:46 -0600 (MDT) Received: from axcsbh2.cos.agilent.com (axcsbh2.cos.agilent.com [130.29.152.144]) by msgrel1.cos.agilent.com (Postfix) with SMTP id 5465354F for ; Thu, 4 Oct 2001 13:06:46 -0600 (MDT) Received: from 130.29.152.144 by axcsbh2.cos.agilent.com (InterScan E-Mail VirusWall NT); Thu, 04 Oct 2001 13:06:46 -0600 Received: by axcsbh2.cos.agilent.com with Internet Mail Service (5.5.2653.19) id ; Thu, 4 Oct 2001 13:06:46 -0600 Message-ID: <0D9185CE635BD511ACA50090277A6FCF1358E4@axcs18.cos.agilent.com> From: "DOROVSKOY,IGOR (A-Portsmouth,ex1)" To: freebsd-hackers@FreeBSD.ORG Subject: GA621 ? Date: Thu, 4 Oct 2001 13:06:44 -0600 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: text/plain; charset="iso-8859-1" Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Is anyone got running Netgear gigabit nic GA621 in 4.4? cheers, Igor To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Thu Oct 4 12:40:21 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from mx.wgate.com (mail.wgate.com [38.219.83.4]) by hub.freebsd.org (Postfix) with SMTP id B452037B405 for ; Thu, 4 Oct 2001 12:40:16 -0700 (PDT) Cc: hackers@FreeBSD.ORG Received: From MAIL.TVOL.NET (10.1.1.4[10.1.1.4 port:3366]) by mx.wgate.comMail essentials (server 2.429) with SMTP id: <48899@mx.wgate.com>transfer for ; Thu, 4 Oct 2001 3:38:28 PM -0400 ;transfer smtpmailfrom X-MESINK_Inbound: 0 X-MESINK_MailForType: SMTP X-MESINK_SenderType: SMTP X-MESINK_Sender: msinz@wgate.com X-MESINK_MailFor: hackers@FreeBSD.ORG Received: from sinz.eng.tvol.net ([10.32.2.99]) by mail.tvol.net with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2653.13)id 4BW3BPAM; Thu, 4 Oct 2001 15:38:38 -0400 Received: from wgate.com (localhost [127.0.0.1])by sinz.eng.tvol.net (8.11.6/8.11.6) with ESMTP id f94Jdms30919for ; Thu, 4 Oct 2001 15:39:49 -0400 (EDT)(envelope-from msinz@wgate.com) Date: Thu, 04 Oct 2001 15:39:48 -0400 From: Michael Sinz Organization: WorldGate Communications Inc. X-Mailer: Mozilla 4.76 [en] (X11; U; FreeBSD 4.3-STABLE i386) X-Accept-Language: en Subject: Re: ALT- (Was: how to make 'for' understand two words as asingleargumen) References: <200110022357.f92NvnS08486@thistle.bogs.org><7fffe3770386f507d1@[192.168.1.4]> <7ffffcf203a07007d1@[192.168.1.4]> <898df21204da4607d1@[192.168.1.4]> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit x-receiver: hackers@FreeBSD.ORG x-sender: msinz@wgate.com MIME-Version: 1.0 Message-ID: <89efc3b204df3107d1@[192.168.1.4]> Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Dag-Erling Smorgrav wrote: > > Michael Sinz writes: > > BTW - How does your system represent a file with 0xA0 in it? An ls on > > FreeBSD 4.4-Stable seems to show it as: > > > > -rw-r--r-- 1 msinz msinz 0 Oct 3 12:00 foo?bar > > > > Interesting - not what I would have expected but I think "non-printables" > > are replaced by the "?" when ls runs. > > > > Even more interesting is this: > > > > -rw-r--r-- 1 msinz msinz 0 Oct 3 12:00 foo?bar > > -rw-r--r-- 1 msinz msinz 1 Oct 3 12:05 foo?bar > > > > This is only "interesting" (in the sense in which you seem to use the > word) to someone who has not read the ls(1) manual page, and does not > know of the -q and -B options... This was within the context of alt-space replacing spaces in file names. As things stand now, it is not even easily usable as the main tool used to list the files in a directory does not show it correctly. (As far as the non-printables, I agree that LS is supposed to do, but is non-breaking space really a non-printable?) -- Michael Sinz ---- Worldgate Communications ---- msinz@wgate.com A master's secrets are only as good as the master's ability to explain them to others. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Thu Oct 4 13: 2:32 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from gvr.gvr.org (gvr.gvr.org [212.61.40.17]) by hub.freebsd.org (Postfix) with ESMTP id 2C9AF37B40D; Thu, 4 Oct 2001 13:02:29 -0700 (PDT) Received: by gvr.gvr.org (Postfix, from userid 657) id 958A0586C; Thu, 4 Oct 2001 22:02:27 +0200 (CEST) Date: Thu, 4 Oct 2001 22:02:27 +0200 From: Guido van Rooij To: Mike Smith Cc: freebsd-hackers@freebsd.org Subject: Re: grep memory footage Message-ID: <20011004220227.A78588@gvr.gvr.org> References: <20011004180356.A76896@gvr.gvr.org> <200110041849.f94InnE01299@mass.dis.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200110041849.f94InnE01299@mass.dis.org>; from msmith@freebsd.org on Thu, Oct 04, 2001 at 11:49:49AM -0700 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Thu, Oct 04, 2001 at 11:49:49AM -0700, Mike Smith wrote: > > It's a known bug in grep; there are probably a bunch of PRs outstanding > on it. We need grep to be updated. > From looking at the source, it seems that the lates version still seems to have the same problem. The problem seems to be in grep.c:grep(), where the variable save seems to ever increase. But the code is so amazingly hairy that I cannot figure out why. -Guido To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Thu Oct 4 13: 8:59 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from mta01-svc.ntlworld.com (mta01-svc.ntlworld.com [62.253.162.41]) by hub.freebsd.org (Postfix) with ESMTP id 7545737B401 for ; Thu, 4 Oct 2001 13:08:56 -0700 (PDT) Received: from witchspace.com ([213.105.80.222]) by mta01-svc.ntlworld.com (InterMail vM.4.01.03.00 201-229-121) with ESMTP id <20011004200855.VSLT15984.mta01-svc.ntlworld.com@witchspace.com> for ; Thu, 4 Oct 2001 21:08:55 +0100 Message-ID: <3BBCC288.DE8CD20B@witchspace.com> Date: Thu, 04 Oct 2001 21:11:52 +0100 From: Jonathan Belson X-Mailer: Mozilla 4.78 [en] (X11; U; Linux 2.2.12 i386) X-Accept-Language: en MIME-Version: 1.0 To: freebsd-hackers@freebsd.org Subject: [Q] Information on fb/vesa mode programming Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Hiya I've been trying to find out some information on programming the fb/vesa interface, eg. set_video_mode() and friends. From the few examples I've seen, it appears that you have to muck about with banks rather than use a pointer to linear frame buffer (logo_saver.c, splash.c). Is there no way to access the fb linearly? Does anyone know of any resources giving more information on fb programming? Thanks, -- C-YA Jon To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Thu Oct 4 13:32:12 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from imo-m04.mx.aol.com (imo-m04.mx.aol.com [64.12.136.7]) by hub.freebsd.org (Postfix) with ESMTP id 9E8E037B401 for ; Thu, 4 Oct 2001 13:32:08 -0700 (PDT) Received: from Bsdguru@aol.com by imo-m04.mx.aol.com (mail_out_v31_r1.7.) id 4.66.154c9b6d (4410); Thu, 4 Oct 2001 16:31:31 -0400 (EDT) From: Bsdguru@aol.com Message-ID: <66.154c9b6d.28ee2123@aol.com> Date: Thu, 4 Oct 2001 16:31:31 EDT Subject: Re: if_sf bug To: des@ofug.org Cc: hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Mailer: AOL 5.0 for Windows sub 139 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG In a message dated 10/04/2001 1:43:27 PM Eastern Daylight Time, des@ofug.org writes: > > > The if_sf driver doesnt seem to initialize itself until an address is set, > > > > which makes things like tcpdump, bridging and other promiscuous things > not > > > work. > > All the interfaces do that. If you want to make an invisible interface, > > configure it with IP 0.0.0.0. > > I believe 'ifconfig foo0 up' is sufficient. > That is what SHOULD work. But it seems that some of BPs drivers dont do an if_init until an address is set. The driver should be ready to send and accept raw frames when IFF_UP and IFF_RUNNING are set, which implies that if_init() at minimum should be done when flags are set. The if_sk driver has the same problem. B To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Thu Oct 4 13:33:37 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from imo-d02.mx.aol.com (imo-d02.mx.aol.com [205.188.157.34]) by hub.freebsd.org (Postfix) with ESMTP id D889537B40B for ; Thu, 4 Oct 2001 13:33:34 -0700 (PDT) Received: from Bsdguru@aol.com by imo-d02.mx.aol.com (mail_out_v31_r1.7.) id n.87.110726ee (4410) for ; Thu, 4 Oct 2001 16:33:29 -0400 (EDT) From: Bsdguru@aol.com Message-ID: <87.110726ee.28ee2198@aol.com> Date: Thu, 4 Oct 2001 16:33:28 EDT Subject: Re: if_sf bug To: hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Mailer: AOL 5.0 for Windows sub 139 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG In a message dated 10/04/2001 2:30:51 PM Eastern Daylight Time, bmah@FreeBSD.ORG writes: > > > All the interfaces do that. If you want to make an invisible interface, > > > configure it with IP 0.0.0.0. > > > > I believe 'ifconfig foo0 up' is sufficient. > > Confirming data point: "ifconfig dc0 up" allowed tcpdump in promiscuous > mode when I tried it. > Thats because the dc driver doesnt have the bug that im talking about :-) B To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Thu Oct 4 13:44:46 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from bogslab.ucdavis.edu (bogslab.ucdavis.edu [169.237.68.34]) by hub.freebsd.org (Postfix) with ESMTP id EE64E37B40A for ; Thu, 4 Oct 2001 13:44:37 -0700 (PDT) Received: from thistle.bogs.org (thistle.bogs.org [198.137.203.61]) by bogslab.ucdavis.edu (8.9.3/8.9.3) with ESMTP id NAA03516 for ; Thu, 4 Oct 2001 13:44:30 -0700 (PDT) (envelope-from greg@bogslab.ucdavis.edu) Received: from thistle.bogs.org (localhost [127.0.0.1]) by thistle.bogs.org (8.11.3/8.11.3) with ESMTP id f94KgCS15225 for ; Thu, 4 Oct 2001 13:42:13 -0700 (PDT) (envelope-from greg@thistle.bogs.org) Message-Id: <200110042042.f94KgCS15225@thistle.bogs.org> To: hackers@FreeBSD.ORG X-To: Michael Sinz X-Sender: owner-freebsd-hackers@FreeBSD.ORG Subject: Re: ALT- (Was: how to make 'for' understand two words as asingleargumen) In-reply-to: Your message of "Thu, 04 Oct 2001 15:39:48 EDT." <89efc3b204df3107d1@[192.168.1.4]> Reply-To: gkshenaut@ucdavis.edu Date: Thu, 04 Oct 2001 13:42:12 -0700 From: Greg Shenaut Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG In message <89efc3b204df3107d1@[192.168.1.4]>, Michael Sinz cleopede: >This was within the context of alt-space replacing spaces in file names. >As things stand now, it is not even easily usable as the main tool used >to list the files in a directory does not show it correctly. (As far as >the non-printables, I agree that LS is supposed to do, but is non-breaking >space really a non-printable?) touch "altspace" "regularspace" env LANG=fr_FR.ISO_8859-1 ls alt space regular space env LANG= ls alt?space regular space I believe that most (not quite all) character sets in which 0xa0 is defined at all use it for unbreakable space. (But it is not defined in 7-bit ASCII, which is the FreeBSD default.) Greg Shenaut To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Thu Oct 4 14:27:24 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from mass.dis.org (mass.dis.org [216.240.45.41]) by hub.freebsd.org (Postfix) with ESMTP id ACD5537B401 for ; Thu, 4 Oct 2001 14:27:22 -0700 (PDT) Received: from mass.dis.org (localhost [127.0.0.1]) by mass.dis.org (8.11.6/8.11.3) with ESMTP id f94LbPE02749; Thu, 4 Oct 2001 14:37:25 -0700 (PDT) (envelope-from msmith@mass.dis.org) Message-Id: <200110042137.f94LbPE02749@mass.dis.org> To: Jonathan Belson Cc: freebsd-hackers@freebsd.org Subject: Re: [Q] Information on fb/vesa mode programming In-Reply-To: Message from Jonathan Belson of "Thu, 04 Oct 2001 21:11:52 BST." <3BBCC288.DE8CD20B@witchspace.com> Date: Thu, 04 Oct 2001 14:37:25 -0700 From: Mike Smith Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG > I've been trying to find out some information on programming the > fb/vesa interface, eg. set_video_mode() and friends. Try the Vesa 3.0 document (google is your friend). > From the few examples I've seen, it appears that you have to > muck about with banks rather than use a pointer to linear > frame buffer (logo_saver.c, splash.c). Is there no way to > access the fb linearly? The video memory organisation varies from mode to mode. The splash code tries to work with several different organisations, including the lowest-common-denominator banked/interleaved modes. > Does anyone know of any resources giving more information > on fb programming? Most DOS games/graphics books should at least try to discuss the use of VESA video modes. Regards, Mike To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Thu Oct 4 14:41: 6 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from ambrisko.com (adsl-64-174-51-42.dsl.snfc21.pacbell.net [64.174.51.42]) by hub.freebsd.org (Postfix) with ESMTP id 9840037B408 for ; Thu, 4 Oct 2001 14:41:03 -0700 (PDT) Received: (from ambrisko@localhost) by ambrisko.com (8.11.6/8.11.3) id f94LeTT02809; Thu, 4 Oct 2001 14:40:29 -0700 (PDT) (envelope-from ambrisko) From: Doug Ambrisko Message-Id: <200110042140.f94LeTT02809@ambrisko.com> Subject: Re: 64bit Ethernet Card (if_sf driver) In-Reply-To: <137.296ca27.28edf63e@aol.com> To: Bsdguru@aol.com Date: Thu, 4 Oct 2001 14:40:28 -0700 (PDT) Cc: hackers@FreeBSD.ORG X-Mailer: ELM [version 2.4ME+ PL92 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Bsdguru@aol.com writes: | I've been testing the adaptec 64044 card (if_sf driver) which is a 64bit | 66Mhz 4 port ethernet. I can have come to one of two conclusions: | | 1) the card sucks | 2) the driver sucks | | or both. A 32bit Dlink 4 port card outperforms it by a wide margin, as do | 32bit eepro100s. "wide margin" being defined as about 40%. | | Given that bus resources are not easily measureable..Im quoting cpu usage for | handling the same number of pps. But its pretty difficult to justify using a | 64bit slot and rather expensive card with such lousy performance. I cant even | justify the bus-bandwidth saving with a card that cant route more than | 250Mb/s. | | I guess my question has to do with whether the board is just a dog or the | driver needs substantial optimization. The folks at adaptec aren't dopes | generally, so I cant imagine that they chose a chipset that was so inferior | to the one on their 32bit adapter (which uses the same as the Dlink). | | Anyone with experience or ideas? I can just confirm your observations. I found that having it in a 64bit slot or 32bit made no difference. I hope it is a driver problem since Adaptec was selling a DEC based 4 port card that they got when they bought Cogent. I find it hard to believe that they would replace that with a poorer performance card that probably cost them more to make. Doug A. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Thu Oct 4 15:54:59 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from duke.cs.duke.edu (duke.cs.duke.edu [152.3.140.1]) by hub.freebsd.org (Postfix) with ESMTP id E7B7B37B406 for ; Thu, 4 Oct 2001 15:54:56 -0700 (PDT) Received: from grasshopper.cs.duke.edu (grasshopper.cs.duke.edu [152.3.145.30]) by duke.cs.duke.edu (8.9.3/8.9.3) with ESMTP id SAA29004; Thu, 4 Oct 2001 18:54:52 -0400 (EDT) Received: (from gallatin@localhost) by grasshopper.cs.duke.edu (8.11.3/8.9.1) id f94MsQm36777; Thu, 4 Oct 2001 18:54:26 -0400 (EDT) (envelope-from gallatin@cs.duke.edu) From: Andrew Gallatin MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15292.59554.280315.109732@grasshopper.cs.duke.edu> Date: Thu, 4 Oct 2001 18:54:26 -0400 (EDT) To: Bsdguru@aol.com Cc: hackers@freebsd.org Subject: Re: 64bit Ethernet Card (if_sf driver) In-Reply-To: <137.296ca27.28edf63e@aol.com> References: <137.296ca27.28edf63e@aol.com> X-Mailer: VM 6.75 under 21.1 (patch 12) "Channel Islands" XEmacs Lucid Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Bsdguru@aol.com writes: > > Anyone with experience or ideas? > Because of the aligment constraints of the card, its copying every single packet the driver recvs. This is required on alpha (and possibly other platforms) to prevent an unlaligned access. In a forwarding situation on an x86, it is suboptimal. Try making the m_devget in the rcv handler conditional on !i386 (see http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/dev/nge/if_nge.c.diff?r1=1.13.2.2&r2=1.13.2.3 for an example of how to change this) I'd be interestd to hear (quantitatively) how much your perf changes. Drew To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Thu Oct 4 15:57:31 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from spitfire.velocet.net (spitfire.velocet.net [216.138.223.227]) by hub.freebsd.org (Postfix) with ESMTP id 882A137B401 for ; Thu, 4 Oct 2001 15:57:28 -0700 (PDT) Received: from office.tor.velocet.net (trooper.velocet.net [216.138.242.2]) by spitfire.velocet.net (Postfix) with ESMTP id 7C5CE44AAD9 for ; Thu, 4 Oct 2001 18:57:27 -0400 (EDT) Received: (from dgilbert@localhost) by office.tor.velocet.net (8.11.4/8.9.3) id f94MvRO35756; Thu, 4 Oct 2001 18:57:27 -0400 (EDT) (envelope-from dgilbert) From: David Gilbert MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15292.59734.934412.353194@trooper.velocet.net> Date: Thu, 4 Oct 2001 18:57:26 -0400 To: freebsd-hackers@freebsd.org Subject: NFS swap and locking X-Mailer: VM 6.92 under 20.4 "Emerald" XEmacs Lucid Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG If you've been following the situation, we have many diskless nodes that swap over NFS. We're using a patch (kindly provided to us) that allows swapon to specify a string to mount NFS swap after boot. I've been told (and it looks like) that it calls the same set of functions that the nfs swap option in the kernel would glean from DHCP, were we using that route. That's the background. Now, if I configure a swap-backed md disk (another patch we received) on the system and use it heavily with a particular application I get a locking panic from process id 4 (bufdaemon). panic: lockmgr pid 4 not exclusive lock holder unlocking 520 Any ideas? Dave. -- ============================================================================ |David Gilbert, Velocet Communications. | Two things can only be | |Mail: dgilbert@velocet.net | equal if and only if they | |http://www.velocet.net/~dgilbert | are precisely opposite. | =========================================================GLO================ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Thu Oct 4 16:28:15 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from mozone.net (mail.mozone.net [206.165.200.53]) by hub.freebsd.org (Postfix) with ESMTP id 27B1137B405 for ; Thu, 4 Oct 2001 16:28:12 -0700 (PDT) Received: (from mki@localhost) by mozone.net (8.11.2/8.11.2) id f94NS5C06684 for freebsd-hackers@FreeBSD.org; Thu, 4 Oct 2001 16:28:05 -0700 Date: Thu, 4 Oct 2001 16:28:05 -0700 From: mki To: freebsd-hackers@FreeBSD.org Subject: 4.4-stable, savecore and integer overflow in get_dumpsize() Message-ID: <20011004162805.C1671@cyclonus.mozone.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG It appears that get_dumpsize is b0rked in that the following returns a negative number for systems with large memory/swap configs: void get_dumpsize() { int kdumpsize; /* Read the dump size. */ DumpRead(dumpfd, &kdumpsize, sizeof(kdumpsize), (off_t)(dumplo + ok(dump_nl[X_DUMPSIZE].n_value)), L_SET); dumpsize = kdumpsize * getpagesize(); } the dumpsize = kdumpsize * getpagesize() produces a negative number when kdumpsize = 1032192; resulting in savecore exiting without actually performing the dump in save_core(). Here's the patch to address it: --- savecore.c.old Thu Oct 4 16:22:16 2001 +++ savecore.c Thu Oct 4 16:25:07 2001 @@ -601,7 +601,7 @@ /* Read the dump size. */ DumpRead(dumpfd, &kdumpsize, sizeof(kdumpsize), (off_t)(dumplo + ok(dump_nl[X_DUMPSIZE].n_value)), L_SET); - dumpsize = kdumpsize * getpagesize(); + dumpsize = (off_t) kdumpsize * (off_t) getpagesize(); } /* can someone please commit this fix? thanks -mohan To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Thu Oct 4 16:32:19 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from hotmail.com (f5.law9.hotmail.com [64.4.9.5]) by hub.freebsd.org (Postfix) with ESMTP id 3222837B405 for ; Thu, 4 Oct 2001 16:32:17 -0700 (PDT) Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Thu, 4 Oct 2001 16:32:17 -0700 Received: from 207.195.92.134 by lw9fd.law9.hotmail.msn.com with HTTP; Thu, 04 Oct 2001 23:32:16 GMT X-Originating-IP: [207.195.92.134] From: "Thierry Black" To: freebsd-hackers@freebsd.org Subject: chroot Date: Thu, 04 Oct 2001 17:32:16 -0600 Mime-Version: 1.0 Content-Type: text/html Message-ID: X-OriginalArrivalTime: 04 Oct 2001 23:32:17.0038 (UTC) FILETIME=[CDD6A2E0:01C14D2C] Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG
hello...
 
I am writing one simple network server, and can make the daemon and network code work ok, but I want my server to chroot during the initialization.  The problem is this server by design is designed to be installed and run by normal users, and chroot() can only be called by superuser. Because normal users might compile & install it, the server cant be made suid root. (I know normal procedure is to run as root, chroot and drop privileges, but that wont work).
 
I have 2 questions:
Why can superuser only use chroot()? (What if normal users could only chroot() to directories in current chroot() environment?)
 
Is there anything I can do to restrict directory acacess in my program, or simulate chroot in some other way?
 
If possible I want my solution to work on otehr bsd platforms as much as possible too.
 
thank you
 
 
 
thierry
 


Get your FREE download of MSN Explorer at http://explorer.msn.com
To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Thu Oct 4 17:56:23 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from InterJet.elischer.org (c421509-a.pinol1.sfba.home.com [24.7.86.9]) by hub.freebsd.org (Postfix) with ESMTP id 2F01437B401 for ; Thu, 4 Oct 2001 17:56:21 -0700 (PDT) Received: from localhost (localhost.elischer.org [127.0.0.1]) by InterJet.elischer.org (8.9.1a/8.9.1) with ESMTP id SAA04473 for ; Thu, 4 Oct 2001 18:42:44 -0700 (PDT) Date: Thu, 4 Oct 2001 18:42:43 -0700 (PDT) From: Julian Elischer To: hackers@freebsd.org Subject: odd behaviour from loader/kernel Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Running 4.4-RELEASE I have a kernel with the cyclades driver (cy) which I want to use on several machines. On on eof the machines however, having that kernel with no cyclades card results in a page fault in cyprobe(). The simple answer is to just disable the cy driver.. (I really don't want a separate kernel for this machine) If I boot -c I can type "dis cy0" and all works sweet. But I can't be there to type that all the time. I've tried adding hint.cy.0.disabled="1" to both loader .conf and /boot/device.hints (which didn't exist before) but when I do a boot -c I see that it is still enabled, and the system still crashes during boot. It appears that this is a 5.x feature. (gee how we forget) Is there something I need to do to get thes dammned device to disable? Is there somethign I can type in a file somewhere?, Which file? what do I type at the boot loader prompt to disable the device? (can I do that? other than boot -c..... disable cy0) Julian To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Thu Oct 4 18:16:20 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from InterJet.elischer.org (c421509-a.pinol1.sfba.home.com [24.7.86.9]) by hub.freebsd.org (Postfix) with ESMTP id A9D9A37B405 for ; Thu, 4 Oct 2001 18:16:17 -0700 (PDT) Received: from localhost (localhost.elischer.org [127.0.0.1]) by InterJet.elischer.org (8.9.1a/8.9.1) with ESMTP id TAA04604 for ; Thu, 4 Oct 2001 19:14:26 -0700 (PDT) Date: Thu, 4 Oct 2001 19:14:24 -0700 (PDT) From: Julian Elischer To: hackers@freebsd.org Subject: Re: [answer] odd behaviour from loader/kernel In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG oh hell.. now that I posted this I remembered how it's done in 4.x (kernel.conf) ignore this.. On Thu, 4 Oct 2001, Julian Elischer wrote: > > Running 4.4-RELEASE > > > I have a kernel with the cyclades driver (cy) which I want > to use on several machines. On on eof the machines however, having > that kernel with no cyclades card results in a page fault in cyprobe(). > The simple answer is to just disable the cy driver.. (I really don't > want a separate kernel for this machine) > > If I boot -c I can type "dis cy0" > and all works sweet. But I can't be there to type that all the time. > I've tried adding > hint.cy.0.disabled="1" to both > loader .conf and /boot/device.hints (which didn't exist before) > but when I do a boot -c I see that it is still enabled, and the system > still crashes during boot. It appears that this is a 5.x feature. > (gee how we forget) > > Is there something I need to do to get thes dammned device to disable? > Is there somethign I can type in a file somewhere?, Which file? > what do I type at the boot loader prompt to disable the device? > (can I do that? other than boot -c..... disable cy0) > > Julian > > > > 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 Oct 4 18:57: 6 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from coffee.q9media.com (coffee.q9media.com [216.94.229.19]) by hub.freebsd.org (Postfix) with ESMTP id C16CF37B401; Thu, 4 Oct 2001 18:56:48 -0700 (PDT) Received: (from mike@localhost) by coffee.q9media.com (8.11.6/8.11.6) id f951v6K34846; Thu, 4 Oct 2001 21:57:06 -0400 (EDT) (envelope-from mike) Date: Thu, 4 Oct 2001 21:57:06 -0400 From: Mike Barcroft To: audit@FreeBSD.org Subject: strnstr(3) - New libc function for review Message-ID: <20011004215706.B34530@coffee.q9media.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="HcAYCG3uE/tztfnV" Content-Disposition: inline Organization: The FreeBSD Project Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG --HcAYCG3uE/tztfnV Content-Type: text/plain; charset=us-ascii Content-Disposition: inline [BCC'd to -hackers for additional comments.] Hello, I would appreciate comments/reviews of the following new addition to libc. It is largely based off the current strstr(3) implementation. Patch attached and also available at: http://people.FreeBSD.org/~mike/patches/strnstr.diff Best regards, Mike Barcroft --HcAYCG3uE/tztfnV Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="strnstr.diff" strnstr.diff Add a new libc function, strnstr(3), which allows one to limit the number of characters that are searched. This is especially useful with file operations and non-NUL terminated strings. Index: lib/libc/string/Makefile.inc =================================================================== RCS file: /cvs/src/lib/libc/string/Makefile.inc,v retrieving revision 1.23 diff -u -r1.23 Makefile.inc --- lib/libc/string/Makefile.inc 31 Jul 2001 16:34:52 -0000 1.23 +++ lib/libc/string/Makefile.inc 5 Oct 2001 00:30:43 -0000 @@ -10,6 +10,7 @@ memcpy.c memmove.c memset.c rindex.c strcasecmp.c strcat.c strchr.c \ strcmp.c strcoll.c strcpy.c strcspn.c strdup.c strerror.c \ strlcat.c strlcpy.c strlen.c strmode.c strncat.c strncmp.c strncpy.c \ + strnstr.c \ strpbrk.c strrchr.c strsep.c strsignal.c strspn.c strstr.c strtok.c \ strxfrm.c swab.c wcscat.c wcschr.c wcscmp.c wcscpy.c wcscspn.c \ wcslcat.c wcslcpy.c wcslen.c wcsncat.c wcsncmp.c wcsncpy.c wcspbrk.c \ @@ -36,6 +37,7 @@ MLINKS+=strerror.3 perror.3 strerror.3 sys_errlist.3 strerror.3 sys_nerr.3 MLINKS+=strlcpy.3 strlcat.3 MLINKS+=strtok.3 strtok_r.3 +MLINKS+=strstr.3 strnstr.3 MLINKS+=wmemchr.3 wmemcmp.3 wmemchr.3 wmemcpy.3 \ wmemchr.3 wmemmove.3 wmemchr.3 wmemset.3 \ wmemchr.3 wcscat.3 wmemchr.3 wcschr.3 \ --- /dev/null Thu Oct 4 21:11:00 2001 +++ lib/libc/string/strnstr.c Thu Oct 4 20:37:01 2001 @@ -0,0 +1,70 @@ +/*- + * Copyright (c) 2001 Mike Barcroft + * Copyright (c) 1990, 1993 + * The Regents of the University of California. All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * Chris Torek. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__RCSID("@(#)strstr.c 8.1 (Berkeley) 6/4/93"); +__FBSDID("$FreeBSD$"); + +#include + +/* + * Find the first occurrence of find in s, where the search is limited to the + * first slen characters of s. + */ +char * +strnstr(s, find, slen) + const char *s; + const char *find; + size_t slen; +{ + char c, sc; + size_t len; + + if ((c = *find++) != '\0') { + len = strlen(find); + do { + do { + if ((sc = *s++) == '\0' || slen-- < 1) + return (NULL); + } while (sc != c); + if (len > slen) + return (NULL); + } while (strncmp(s, find, len) != 0); + s--; + } + return ((char *)s); +} Index: lib/libc/string/strstr.3 =================================================================== RCS file: /cvs/src/lib/libc/string/strstr.3,v retrieving revision 1.7 diff -u -r1.7 strstr.3 --- lib/libc/string/strstr.3 1 Oct 2001 16:09:00 -0000 1.7 +++ lib/libc/string/strstr.3 5 Oct 2001 01:18:13 -0000 @@ -1,3 +1,4 @@ +.\" Copyright (c) 2001 Mike Barcroft .\" Copyright (c) 1990, 1991, 1993 .\" The Regents of the University of California. All rights reserved. .\" @@ -40,7 +41,7 @@ .Dt STRSTR 3 .Os .Sh NAME -.Nm strstr +.Nm strstr , strnstr .Nd locate a substring in a string .Sh LIBRARY .Lb libc @@ -48,6 +49,8 @@ .In string.h .Ft char * .Fn strstr "const char *big" "const char *little" +.Ft char * +.Fn strnstr "const char *big" "const char *little" "size_t len" .Sh DESCRIPTION The .Fn strstr @@ -56,22 +59,58 @@ .Fa little in the null-terminated string .Fa big . +.Pp +The +.Fn strnstr +function +locates the first occurrence of the null-terminated string +.Fa little +in the string +.Fa big , +where only the first number of characters, identified by +.Fa len , +are searched. +.Sh RETURN VALUES If .Fa little -is the empty string, -.Fn strstr -returns -.Fa big ; +is an empty string, +.Fa big +is returned; if .Fa little occurs nowhere in .Fa big , -.Fn strstr -returns NULL; -otherwise -.Fn strstr -returns a pointer to the first character of the first occurrence of -.Fa little . +NULL is returned; +otherwise a pointer to the first character of the first occurrence of +.Fa little +is returned. +.Sh EXAMPLES +The following sets the pointer +.Va ptr +to the +.Dq Li Bar Baz +portion of +.Va largestring : +.Bd -literal -offset indent +const char *largestring = "Foo Bar Baz"; +const char *smallstring = "Bar"; +char *ptr; + +ptr = strstr(largestring, smallstring); +.Ed +.Pp +The following sets the pointer +.Va ptr +to NULL, because only the first 4 characters of +.Va largestring +are searched: +.Bd -literal -offset indent +const char *largestring = "Foo Bar Baz"; +const char *smallstring = "Bar"; +char *ptr; + +ptr = strnstr(largestring, smallstring, 4); +.Ed .Sh SEE ALSO .Xr memchr 3 , .Xr strchr 3 , Index: include/string.h =================================================================== RCS file: /cvs/src/include/string.h,v retrieving revision 1.6 diff -u -r1.6 string.h --- include/string.h 16 Aug 1999 06:53:13 -0000 1.6 +++ include/string.h 5 Oct 2001 00:34:03 -0000 @@ -87,6 +87,7 @@ size_t strlcpy __P((char *, const char *, size_t)); void strmode __P((int, char *)); int strncasecmp __P((const char *, const char *, size_t)); +char *strnstr __P((const char *, const char *, size_t)); char *strsep __P((char **, const char *)); char *strsignal __P((int)); char *strtok_r __P((char *, const char *, char **)); --HcAYCG3uE/tztfnV-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Fri Oct 5 1:31:42 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from albatross.prod.itd.earthlink.net (albatross.mail.pas.earthlink.net [207.217.120.120]) by hub.freebsd.org (Postfix) with ESMTP id 870C737B40B; Fri, 5 Oct 2001 01:31:35 -0700 (PDT) Received: from mindspring.com (dialup-209.247.136.36.Dial1.SanJose1.Level3.net [209.247.136.36]) by albatross.prod.itd.earthlink.net (EL-8_9_3_3/8.9.3) with ESMTP id BAA06264; Fri, 5 Oct 2001 01:31:29 -0700 (PDT) Message-ID: <3BBD7013.997C025B@mindspring.com> Date: Fri, 05 Oct 2001 01:32:19 -0700 From: Terry Lambert Reply-To: tlambert2@mindspring.com X-Mailer: Mozilla 4.7 [en]C-CCK-MCD {Sony} (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: Oleg Golovanov Cc: freebsd-questions@freebsd.org, freebsd-hackers@freebsd.org Subject: Re: Question about pthread References: <3BBB77A7.5C4B129E@home.krasnoyarsk.ru> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Oleg Golovanov wrote: > > Dear Sirs: > > I am using FreeBSD-2.2.8 and after calling pthread_create() > my programs get sigfault (SIGSEGV) and exited with core dump. > > I should like to ask if somebody know the solve of this problem. > My example of using pthread is included below. > > I ask to answer me directly on my e-mail. [ ... ] > pthread_create(NULL, NULL, &coms, confd); 2.2.8 is a pre draft 4 standard pthreads implementation. void coms( void *confdp) { int confd = *(int *)confdp; ... } main() { pthread_t id; /* REQUIRED */ ... /* Note: "coms", _NOT_ "&coms"... */ pthread_create( &id, NULL, coms, (void *)&confd); ... } -- Terry To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Fri Oct 5 4:48:42 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from svr-ganmtc-appserv-mgmt.ncf.coxexpress.com (svr-ganmtc-appserv-mgmt.ncf.coxexpress.com [24.136.46.5]) by hub.freebsd.org (Postfix) with ESMTP id 4563C37B408 for ; Fri, 5 Oct 2001 04:48:39 -0700 (PDT) Received: from sushi.wanmine.com (cpe-oca-24-136-59-202-cmcpe.ncf.coxexpress.com [24.136.59.202]) by svr-ganmtc-appserv-mgmt.ncf.coxexpress.com (8.11.4/8.11.4) with ESMTP id f95BmSL25065; Fri, 5 Oct 2001 07:48:28 -0400 Received: by sushi.wanmine.com (Postfix, from userid 1000) id DEF7F3E1F; Fri, 5 Oct 2001 07:48:25 -0400 (EDT) Date: Fri, 5 Oct 2001 07:48:25 -0400 From: Chris Faulhaber To: Bsdguru@aol.com Cc: hackers@freebsd.org Subject: Re: 4.3 vs 4.4 Message-ID: <20011005074825.A84486@sushi.wanmine.com> References: <10.136d9f77.28ecf511@aol.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="DocE+STaALJfprDB" Content-Disposition: inline In-Reply-To: <10.136d9f77.28ecf511@aol.com> User-Agent: Mutt/1.3.22.1i Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG --DocE+STaALJfprDB Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Oct 03, 2001 at 07:11:13PM -0400, Bsdguru@aol.com wrote: > In a message dated 10/03/2001 3:55:16 PM Eastern Daylight Time,=20 > tirloni@users.sourceforge.net writes: >=20 > > > Is there a delta/changes sheet in what 4.4 offers? > > =20 > > http://www.freebsd.org/releases/4.4R/notes.html > > =20 > > or track the CVS tree :) > > =20 >=20 > Thanks for the pointer, and not to the other fellow (jedgar@fxp.org) who= =20 > chose to just make a snide remark. >=20 No, 'Try the release notes' is being helpful, reminding you that simple questions like this probably belong on -questions would have been snide. --=20 Chris D. Faulhaber - jedgar@fxp.org - jedgar@FreeBSD.org -------------------------------------------------------- FreeBSD: The Power To Serve - http://www.FreeBSD.org --DocE+STaALJfprDB Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (FreeBSD) Comment: FreeBSD: The Power To Serve iEYEARECAAYFAju9ngkACgkQObaG4P6BelAYyQCfZfTKQu2JV3wU+1aR4WHzBrER XG8AnRDJIIR0TGiC0g0El39qv7cai8fc =RtMa -----END PGP SIGNATURE----- --DocE+STaALJfprDB-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Fri Oct 5 7:20: 9 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from a.mx.everquick.net (a.mx.everquick.net [216.89.137.3]) by hub.freebsd.org (Postfix) with ESMTP id DF18F37B401 for ; Fri, 5 Oct 2001 07:20:04 -0700 (PDT) Received: from localhost (eddy@localhost) by a.mx.everquick.net (8.10.2/8.10.2) with ESMTP id f95EJwg28919 for ; Fri, 5 Oct 2001 14:19:58 GMT X-EverQuick-No-Abuse: Report any e-mail abuse to Date: Fri, 5 Oct 2001 14:19:58 +0000 (GMT) From: "E.B. Dreger" To: hackers@freebsd.org Subject: AIO issues... or not? Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Greetings all, When using aio_* calls, I received ENOSYS. I grepped LINT, and found that I'd forgotten to "OPTIONS VFS_AIO". Simple enough. However, there's a rather ominous and non-descriptive warning present: "There are numerous stability issues in the current aio code that make it unsuitable for inclusion on shell boxes." Can anyone please elaborate? Is this admonition outdated? Seen on 4.3-R. TIA, Eddy P.S. -- Please leave me CCed. I'm currently not subscribed. --------------------------------------------------------------------------- Brotsman & Dreger, Inc. - EverQuick Internet Division Phone: +1 (316) 794-8922 Wichita/(Inter)national Phone: +1 (785) 865-5885 Lawrence --------------------------------------------------------------------------- Date: Mon, 21 May 2001 11:23:58 +0000 (GMT) From: A Trap To: blacklist@brics.com Subject: Please ignore this portion of my mail signature. These last few lines are a trap for address-harvesting spambots. Do NOT send mail to , or you are likely to be blocked. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Fri Oct 5 7:25:17 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from cn.com (207-237-233-167.c3-0.nyr-ubr2.nyr.ny.cable.rcn.com [207.237.233.167]) by hub.freebsd.org (Postfix) with ESMTP id 6F06637B409 for ; Fri, 5 Oct 2001 07:25:09 -0700 (PDT) Received: (from bgross@localhost) by cn.com (8.11.6/8.11.6) id f95EPmN03546; Fri, 5 Oct 2001 10:25:48 -0400 (EDT) (envelope-from bgross1@rcn.com) X-Authentication-Warning: dhcp-515-2.cable.rcn.com: bgross set sender to bgross1@rcn.com using -f From: Benjamin Gross MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15293.49899.815826.179411@dhcp-515-2.cable.rcn.com> Date: Fri, 5 Oct 2001 10:25:47 -0400 To: freebsd-hackers@freebsd.org Subject: serial ports X-Mailer: VM 6.96 under Emacs 20.7.1 Reply-To: bgross1@rcn.com Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG what device file represents port 1 on a pc ? To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Fri Oct 5 7:43:51 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from elm.phenome.org (elm.phenome.org [194.153.169.3]) by hub.freebsd.org (Postfix) with ESMTP id 13A0137B405 for ; Fri, 5 Oct 2001 07:43:48 -0700 (PDT) Received: from localhost (joshua@localhost [127.0.0.1]) by localhost (8.12.0.Beta19/8.12.0.Beta19/Debian 8.12.0.Beta19) with ESMTP id f95EhG8A009148; Fri, 5 Oct 2001 15:43:24 +0100 Date: Fri, 5 Oct 2001 15:43:16 +0100 (BST) From: Joshua Goodall X-X-Sender: To: Farooq Mela Cc: "Andrew L. Neporada" , Bakul Shah , Subject: Re: current strstr(3) implementation is slow In-Reply-To: <3BBC8937.44A77CF9@sm.socccd.cc.ca.us> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Thu, 4 Oct 2001, Farooq Mela wrote: > "Andrew L. Neporada" wrote: > > to Algorithms" book (AKA CLR) by MIT Press, more precisely "Knuth, Morris > > and Pratt algorithm". > > Hmm, sounds good, much better than naive string matching algorithm. Unless strstr gains an efficient (and elegant) way to remember preprocessed strings, most calls to strstr would probably end up spending more actual CPU preprocessing than any saving from fewer comparisons. A brief glimpse through the FreeBSD source shows few places that might possibly benefit from a KMP matcher, and many that I would expect to run slower than the naive in real cases. This correlates with my general experience with string matching in systems programming. There is no use of strstr in the kernel, by the looks. Code that intrinsically calls for a good algorithm generally includes its own (e.g. perl, grep, awk). Personally I find better results in such cases from fgetln with a Horspool than I do from fgrep. The folks that implement libc's are, I would hope, already aware of the many alternatives and have reached similar conclusions to my own. The possibility of extending libc to include alternative algorithms under new names, I leave to others to debate. Joshua To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Fri Oct 5 8:14:46 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from buffoon.automagic.org (buffoon.automagic.org [208.185.30.208]) by hub.freebsd.org (Postfix) with SMTP id 1705837B406 for ; Fri, 5 Oct 2001 08:14:44 -0700 (PDT) Received: (qmail 46425 invoked by uid 1000); 5 Oct 2001 15:14:43 -0000 Date: Fri, 5 Oct 2001 11:14:43 -0400 From: Joe Abley To: Benjamin Gross Cc: freebsd-hackers@freebsd.org Subject: Re: serial ports Message-ID: <20011005111442.W44908@buffoon.automagic.org> References: <15293.49899.815826.179411@dhcp-515-2.cable.rcn.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <15293.49899.815826.179411@dhcp-515-2.cable.rcn.com> User-Agent: Mutt/1.3.22.1i Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Fri, Oct 05, 2001 at 10:25:47AM -0400, Benjamin Gross wrote: > what device file represents port 1 on a pc ? Assuming you mean "the lowest-numbered port on a PC" (the one commonly found at IRQ4 on the ISA bus): /dev/ttyd0 for callin ports /dev/ttyid0 corresponding callin initial-state device /dev/ttyld0 corresponding callin lock-state device /dev/cuaa0 for callout ports /dev/cuaaia0 corresponding callout initial-state device /dev/cuaala0 corresponding callout lock-state device See sio(4). To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Fri Oct 5 8:45:25 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from blacklamb.mykitchentable.net (ekgr-dsl3-t103.citlink.net [207.173.248.103]) by hub.freebsd.org (Postfix) with ESMTP id 7F21137B408 for ; Fri, 5 Oct 2001 08:45:22 -0700 (PDT) Received: from tagalong (unknown [165.107.42.205]) by blacklamb.mykitchentable.net (Postfix) with SMTP id AFEDEEE623 for ; Fri, 5 Oct 2001 08:45:12 -0700 (PDT) From: "Drew Tomlinson" To: Subject: FW: How To Recreate /var Files? Date: Fri, 5 Oct 2001 08:42:45 -0700 Message-ID: <5CD46247635BD511B6B100A0CC3F023925A10E@ldcmsx01.lc.ca.gov> MIME-Version: 1.0 Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook CWS, Build 9.0.2416 (9.0.2911.0) X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 Importance: Normal Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG I posted a message to Questions and received the response below which resolved half of the problem. I *can* reinstall FBSD without much pain as it was a (mostly) fresh install before I ruined it. But I would *really* like to learn how to fix this as opposed to starting over. I believe there is some part of the install process that creates the default files. What is it and can I run just that part? I thank you for your time! Drew ------------------------------------------------------ "Mikko Tyolajarvi" wrote in message news:200110050004.f9504fk85972@mikko.rsa.com... > In local.freebsd.questions you write: > >> In my on-going quest to master FreeBSD, I have made another big mistake. :) >> I was trying to move /var to /usr/var but have only succeeded in deleting >> /var. It's a new install so all I really want to do is recreate the default >> directory structure that is included in a normal install. I have source >> code on the system. What is the way I can do this short of reinstalling >> everything? > > Try something like: > > # cd /var > # mtree -uf /etc/mtree/BSD.var Thank you very much. This worked to create the directory structure but it did not create the default files in the structure. Is there some way to do that? Thanks again, Drew To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" 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 Oct 5 8:55:19 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from proxy.centtech.com (moat.centtech.com [206.196.95.10]) by hub.freebsd.org (Postfix) with ESMTP id 06FAA37B403 for ; Fri, 5 Oct 2001 08:55:13 -0700 (PDT) Received: from sprint.centtech.com (sprint.centtech.com [10.177.173.31]) by proxy.centtech.com (8.11.6/8.11.6) with ESMTP id f95FtC422042; Fri, 5 Oct 2001 10:55:12 -0500 (CDT) Received: from centtech.com (proton [10.177.173.77]) by sprint.centtech.com (8.9.3+Sun/8.9.3) with ESMTP id KAA20891; Fri, 5 Oct 2001 10:55:12 -0500 (CDT) Message-ID: <3BBDD7AC.A699AAE3@centtech.com> Date: Fri, 05 Oct 2001 10:54:20 -0500 From: Eric Anderson Reply-To: anderson@centtech.com Organization: Centaur Technology X-Mailer: Mozilla 4.78 [en] (X11; U; Linux 2.2.12 i386) X-Accept-Language: en MIME-Version: 1.0 To: Drew Tomlinson Cc: hackers@freebsd.org Subject: Re: FW: How To Recreate /var Files? References: <5CD46247635BD511B6B100A0CC3F023925A10E@ldcmsx01.lc.ca.gov> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Look on your install cd, under /bin for the install.sh file. You should get some hints there. Eric Drew Tomlinson wrote: > > I posted a message to Questions and received the response below which > resolved half of the problem. I *can* reinstall FBSD without much pain as > it was a (mostly) fresh install before I ruined it. But I would *really* > like to learn how to fix this as opposed to starting over. > > I believe there is some part of the install process that creates the default > files. What is it and can I run just that part? I thank you for your time! > > Drew > > ------------------------------------------------------ > "Mikko Tyolajarvi" wrote in message > news:200110050004.f9504fk85972@mikko.rsa.com... > > In local.freebsd.questions you write: > > > >> In my on-going quest to master FreeBSD, I have made another big mistake. > :) > >> I was trying to move /var to /usr/var but have only succeeded in deleting > >> /var. It's a new install so all I really want to do is recreate the > default > >> directory structure that is included in a normal install. I have source > >> code on the system. What is the way I can do this short of reinstalling > >> everything? > > > > Try something like: > > > > # cd /var > > # mtree -uf /etc/mtree/BSD.var > > Thank you very much. This worked to create the directory structure > but it did not create the default files in the structure. Is there > some way to do that? > > Thanks again, > > Drew > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-questions" in the body of the message > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-hackers" in the body of the message -- ------------------------------------------------------------- Eric Anderson anderson@centtech.com Centaur Technology # rm -rf /bin/laden ------------------------------------------------------------- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Fri Oct 5 9:16:57 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from rover.village.org (rover.bsdimp.com [204.144.255.66]) by hub.freebsd.org (Postfix) with ESMTP id BF37B37B405 for ; Fri, 5 Oct 2001 09:16:53 -0700 (PDT) Received: from harmony.village.org (harmony.village.org [10.0.0.6]) by rover.village.org (8.11.3/8.11.3) with ESMTP id f95GGpu88529; Fri, 5 Oct 2001 10:16:51 -0600 (MDT) (envelope-from imp@harmony.village.org) Received: from harmony.village.org (localhost [127.0.0.1]) by harmony.village.org (8.11.6/8.11.6) with ESMTP id f95GGo737587; Fri, 5 Oct 2001 10:16:50 -0600 (MDT) (envelope-from imp@harmony.village.org) Message-Id: <200110051616.f95GGo737587@harmony.village.org> To: bgross1@rcn.com Subject: Re: serial ports Cc: freebsd-hackers@FreeBSD.ORG In-reply-to: Your message of "Fri, 05 Oct 2001 10:25:47 EDT." <15293.49899.815826.179411@dhcp-515-2.cable.rcn.com> References: <15293.49899.815826.179411@dhcp-515-2.cable.rcn.com> Date: Fri, 05 Oct 2001 10:16:50 -0600 From: Warner Losh Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG In message <15293.49899.815826.179411@dhcp-515-2.cable.rcn.com> Benjamin Gross writes: : what device file represents port 1 on a pc ? What DOS Calls COM1 is /dev/cuaa0. What DOS Calls COM2 is /dev/cuaa1. What you mean by port 1, I don't know (since some machines number from 0 (eg 0, 1) while others do it from 1 (eg 1, 2)). Warner To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Fri Oct 5 9:23:26 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from mail.cicely.de (ppp95.uni-duisburg.de [134.91.19.95]) by hub.freebsd.org (Postfix) with ESMTP id 6638837B401 for ; Fri, 5 Oct 2001 09:23:22 -0700 (PDT) Received: (from ticso@localhost) by mail.cicely.de (8.11.0/8.11.0) id f95GNSY08652; Fri, 5 Oct 2001 18:23:28 +0200 (CEST) Date: Fri, 5 Oct 2001 18:23:27 +0200 From: Bernd Walter To: Thierry Black Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: chroot Message-ID: <20011005182327.C8483@cicely20.cicely.de> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: ; from thierryblack@hotmail.com on Thu, Oct 04, 2001 at 05:32:16PM -0600 X-Operating-System: NetBSD cicely20.cicely.de 1.5 sparc Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Thu, Oct 04, 2001 at 05:32:16PM -0600, Thierry Black wrote: Your chances to get an answer would be increased if you would write html. -- B.Walter COSMO-Project http://www.cosmo-project.de ticso@cicely.de Usergroup info@cosmo-project.de To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Fri Oct 5 9:54: 0 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from canonware.com (dsl081-058-209.sfo1.dsl.speakeasy.net [64.81.58.209]) by hub.freebsd.org (Postfix) with ESMTP id BDC6C37B41D for ; Fri, 5 Oct 2001 09:53:57 -0700 (PDT) Received: by canonware.com (Postfix, from userid 1001) id 335D3DF; Fri, 5 Oct 2001 10:03:41 -0700 (PDT) Date: Fri, 5 Oct 2001 10:03:41 -0700 From: Jason Evans To: "E.B. Dreger" Cc: hackers@freebsd.org Subject: Re: AIO issues... or not? Message-ID: <20011005100340.T76373@canonware.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: ; from eddy+public+spam@noc.everquick.net on Fri, Oct 05, 2001 at 02:19:58PM +0000 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Fri, Oct 05, 2001 at 02:19:58PM +0000, E.B. Dreger wrote: > > However, there's a rather ominous and non-descriptive warning > present: "There are numerous stability issues in the current aio > code that make it unsuitable for inclusion on shell boxes." Can > anyone please elaborate? Is this admonition outdated? > > Seen on 4.3-R. Alan Cox has done a lot of work to make aio stable over the past year, and I'm guessing that it's reasonably stable as of 4.2 or 4.3. That warning can likely be removed. Jason To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Fri Oct 5 11:58:43 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from elvis.mu.org (elvis.mu.org [216.33.66.196]) by hub.freebsd.org (Postfix) with ESMTP id DA9A337B41A for ; Fri, 5 Oct 2001 11:58:27 -0700 (PDT) Received: by elvis.mu.org (Postfix, from userid 1192) id C6D1781D09; Fri, 5 Oct 2001 13:58:22 -0500 (CDT) Date: Fri, 5 Oct 2001 13:58:22 -0500 From: Alfred Perlstein To: Jason Evans Cc: "E.B. Dreger" , hackers@freebsd.org Subject: Re: AIO issues... or not? Message-ID: <20011005135822.F59854@elvis.mu.org> References: <20011005100340.T76373@canonware.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20011005100340.T76373@canonware.com>; from jasone@canonware.com on Fri, Oct 05, 2001 at 10:03:41AM -0700 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG * Jason Evans [011005 11:54] wrote: > On Fri, Oct 05, 2001 at 02:19:58PM +0000, E.B. Dreger wrote: > > > > However, there's a rather ominous and non-descriptive warning > > present: "There are numerous stability issues in the current aio > > code that make it unsuitable for inclusion on shell boxes." Can > > anyone please elaborate? Is this admonition outdated? > > > > Seen on 4.3-R. > > Alan Cox has done a lot of work to make aio stable over the past year, and > I'm guessing that it's reasonably stable as of 4.2 or 4.3. That warning > can likely be removed. Where was the warning (so it can be removed)? -- -Alfred Perlstein [alfred@freebsd.org] 'Instead of asking why a piece of software is using "1970s technology," start asking why software is ignoring 30 years of accumulated wisdom.' To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Fri Oct 5 12:17:30 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from gull.mail.pas.earthlink.net (gull.mail.pas.earthlink.net [207.217.121.85]) by hub.freebsd.org (Postfix) with ESMTP id 8AFEF37B408 for ; Fri, 5 Oct 2001 12:17:27 -0700 (PDT) Received: from blossom.cjclark.org (dialup-209.247.136.241.Dial1.SanJose1.Level3.net [209.247.136.241]) by gull.mail.pas.earthlink.net (EL-8_9_3_3/8.9.3) with ESMTP id MAA14673; Fri, 5 Oct 2001 12:17:05 -0700 (PDT) Received: (from cjc@localhost) by blossom.cjclark.org (8.11.6/8.11.3) id f95JGJk01129; Fri, 5 Oct 2001 12:16:19 -0700 (PDT) (envelope-from cjc) Date: Fri, 5 Oct 2001 12:16:14 -0700 From: "Crist J. Clark" To: Drew Tomlinson Cc: hackers@FreeBSD.ORG Subject: Re: FW: How To Recreate /var Files? Message-ID: <20011005121614.D310@blossom.cjclark.org> Reply-To: cjclark@alum.mit.edu References: <5CD46247635BD511B6B100A0CC3F023925A10E@ldcmsx01.lc.ca.gov> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <5CD46247635BD511B6B100A0CC3F023925A10E@ldcmsx01.lc.ca.gov>; from drew@mykitchentable.net on Fri, Oct 05, 2001 at 08:42:45AM -0700 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Fri, Oct 05, 2001 at 08:42:45AM -0700, Drew Tomlinson wrote: > I posted a message to Questions and received the response below which > resolved half of the problem. I *can* reinstall FBSD without much pain as > it was a (mostly) fresh install before I ruined it. But I would *really* > like to learn how to fix this as opposed to starting over. > > I believe there is some part of the install process that creates the default > files. What is it and can I run just that part? I thank you for your time! Run mergemaster(8) and look at the contents of the var/ it creates under its temproot. Make sure that any log files that you may have added to your syslog.conf(5) are touched. -- Crist J. Clark cjclark@alum.mit.edu cjclark@jhu.edu cjc@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 Oct 5 12:41:43 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from tomts11-srv.bellnexxia.net (tomts11.bellnexxia.net [209.226.175.55]) by hub.freebsd.org (Postfix) with ESMTP id B386037B406; Fri, 5 Oct 2001 12:41:15 -0700 (PDT) Received: from khan.anarcat.dyndns.org ([65.92.161.107]) by tomts11-srv.bellnexxia.net (InterMail vM.4.01.03.16 201-229-121-116-20010115) with ESMTP id <20011005194114.YJZB19737.tomts11-srv.bellnexxia.net@khan.anarcat.dyndns.org>; Fri, 5 Oct 2001 15:41:14 -0400 Received: from shall.anarcat.dyndns.org (shall.anarcat.dyndns.org [192.168.0.1]) by khan.anarcat.dyndns.org (Postfix) with ESMTP id 789EF1B30; Fri, 5 Oct 2001 15:41:09 -0400 (EDT) Received: by shall.anarcat.dyndns.org (Postfix, from userid 1000) id 2705020BE1; Fri, 5 Oct 2001 15:41:27 -0400 (EDT) Date: Fri, 5 Oct 2001 15:41:27 -0400 From: The Anarcat To: gnats-admin@FreeBSD.org, freebsd-bugs@FreeBSD.org Cc: "Crist J. Clark" , freebsd-hackers@freebsd.org Subject: Re: bin/31029: syslogd remote logging back down Message-ID: <20011005154126.B7418@shall.anarcat.dyndns.org> Mime-Version: 1.0 Content-Type: application/pgp; x-action=sign; format=text Content-Disposition: inline; filename="msg.pgp" In-Reply-To: <200110040830.f948U1O13043@freefall.freebsd.org> User-Agent: Mutt/1.3.22.1i Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 [cc'ed to -hackers since it is what I think is the relevant list, please correct me if I'm wrong] [[note that I welcome style and function comments]] Note that this fix "works" in the sense that syslogd will eventually be able to reach to remote server again, but the delays of the checks are dependent on the frequency of the outgoing log lines. For example, say the initial delay is 30 seconds. If the algorithm was "clean", there would be some kind of check made on the remote server at 30, 30+60=90, 90+120=210, etc, seconds after the failure. But the check is only made when a log has to be sent out. So if no log is sent out for (say) 5 minutes, the delay (f_delay) won't be changed to take into account the delay taken to have a new log to send. This might not be an undesirable behavior, BTW. :) That way, if a remote host doesn't usually receive much logs, it has more chances of being checked each time a new log is sent. On the other hand, if a host receives much logs, most will be discarded, and the host will be checked at regular, exponentially expanding intervals, until it becomes available again. Also, note that the patch inserts 2 more time_t fields in the filed struct. I don't know exactly how the struct filed* pointers are initialized in the fprintlog function. Actually, one must assume that f_unreach is initialized to 0. If the field is filled with arbitrary value, the algorithm leads to undefined behavior. The worst that can happen is that syslogd will not *try* to send the log to this host, even if it is reachable, as the f_unreach field is also a "flag". Also, all this won't work very well if something like this isn't applied after: (warning: cut'n'paste) - --- /usr/src/usr.sbin/syslogd/syslogd.c Thu Oct 4 00:06:49 2001 +++ syslogd.c Fri Oct 5 15:31:28 2001 @@ -1064,6 +1064,8 @@ f->f_type = F_UNUSED; break; } + } else { /* no error from sendto */ + f->f_unreach = 0; /* clear unreach error flag */ } } break; I could swear I saw my router's patched syslogd recover from "host down" even without that extra patch (using only the orinigal pr's patch), but anyways.. For convenience, I also put here a full patch that has the dprintf's removed: - --- /usr/src/usr.sbin/syslogd/syslogd.c.orig Wed Oct 3 15:56:32 2001 +++ syslogd.c Fri Oct 5 15:37:57 2001 @@ -142,6 +142,9 @@ #define MARK 0x008 /* this message is a mark */ #define ISKERNEL 0x010 /* kernel generated message */ +#define DELAY_MUL 2 /* delay multiplier */ +#define DELAY_INIT 30 /* initial delay in seconds */ + /* * This structure represents the files that will have log * copies printed. @@ -159,6 +162,9 @@ #define PRI_EQ 0x2 #define PRI_GT 0x4 char *f_program; /* program this applies to */ + /* should this be part of the union? */ + time_t f_unreach; /* time since last unreach */ + time_t f_delay; /* backoff time */ union { char f_uname[MAXUNAMES][UT_NAMESIZE+1]; struct { @@ -999,6 +1005,11 @@ l = MAXLINE; if (finet) { + /* XXX: must make sure this is initialized to 0 */ + if ((f->f_unreach) && + ((now - f->f_unreach) < f->f_delay)) { + break; /* do not send */ + } for (r = f->f_un.f_forw.f_addr; r; r = r->ai_next) { for (i = 0; i < *finet; i++) { #if 0 @@ -1019,10 +1030,34 @@ } if (lsent != l) { int e = errno; - - (void)close(f->f_file); - - errno = e; - - f->f_type = F_UNUSED; logerror("sendto"); + errno = e; + switch (errno) { + case EHOSTUNREACH: + case EHOSTDOWN: + if (f->f_unreach) + f->f_delay *= DELAY_MUL; + else { + f->f_unreach = now; + f->f_delay = DELAY_INIT; + } + break; + /* case EBADF: */ + /* case EACCES: */ + /* case ENOTSOCK: */ + /* case EFAULT: */ + /* case EMSGSIZE: */ + /* case EAGAIN: */ + /* case ENOBUFS: */ + /* case ECONNREFUSED: */ + default: + (void)close(f->f_file); + errno = e; + f->f_type = F_UNUSED; + break; + } + } else { /* no error from sendto */ + f->f_unreach = 0; /* clear unreach error flag */ } } break; A. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (FreeBSD) Comment: Pour information voir http://www.gnupg.org iEYEARECAAYFAju+DOUACgkQttcWHAnWiGcsVgCeI7L2H3xD5GRN65mDdW4ZLvwe sfkAnAjESC9zhuC7wlobnXpm14MZ00Ik =h9I5 -----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 Oct 5 13:30:50 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from a.mx.everquick.net (a.mx.everquick.net [216.89.137.3]) by hub.freebsd.org (Postfix) with ESMTP id 53F0737B403 for ; Fri, 5 Oct 2001 13:30:44 -0700 (PDT) Received: from localhost (eddy@localhost) by a.mx.everquick.net (8.10.2/8.10.2) with ESMTP id f95KUOv32359; Fri, 5 Oct 2001 20:30:25 GMT X-EverQuick-No-Abuse: Report any e-mail abuse to Date: Fri, 5 Oct 2001 20:30:24 +0000 (GMT) From: "E.B. Dreger" To: Alfred Perlstein Cc: Jason Evans , hackers@freebsd.org Subject: Re: AIO issues... or not? In-Reply-To: <20011005135822.F59854@elvis.mu.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG > Date: Fri, 5 Oct 2001 13:58:22 -0500 > From: Alfred Perlstein [ snip ] > Where was the warning (so it can be removed)? /usr/src/sys/i386/conf/LINT Not sure about Alpha. Eddy --------------------------------------------------------------------------- Brotsman & Dreger, Inc. - EverQuick Internet Division Phone: +1 (316) 794-8922 Wichita/(Inter)national Phone: +1 (785) 865-5885 Lawrence --------------------------------------------------------------------------- Date: Mon, 21 May 2001 11:23:58 +0000 (GMT) From: A Trap To: blacklist@brics.com Subject: Please ignore this portion of my mail signature. These last few lines are a trap for address-harvesting spambots. Do NOT send mail to , or you are likely to be blocked. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Fri Oct 5 14:57:30 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from smtp.bmi.net (smtp.bmi.net [204.57.191.31]) by hub.freebsd.org (Postfix) with ESMTP id 6870337B403 for ; Fri, 5 Oct 2001 14:57:25 -0700 (PDT) Received: from johncoop.MSHOME (drumheller-router.bmi.net [206.63.201.3] (may be forged)) by smtp.bmi.net (Pro-8.9.3/Pro-8.9.3) with ESMTP id WAA05596; Fri, 5 Oct 2001 22:03:56 -0700 Date: Fri, 5 Oct 2001 14:56:57 -0700 From: John Merryweather Cooper To: Alfred Perlstein Cc: Jason Evans , "E . B . Dreger" , hackers@freebsd.org Subject: Re: AIO issues... or not? Message-ID: <20011005145657.A40957@johncoop.MSHOME> References: <20011005100340.T76373@canonware.com> <20011005135822.F59854@elvis.mu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit In-Reply-To: <20011005135822.F59854@elvis.mu.org>; from bright@mu.org on Fri, Oct 05, 2001 at 11:58:22 -0700 X-Mailer: Balsa 1.2.0 Lines: 39 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On 2001.10.05 11:58 Alfred Perlstein wrote: > * Jason Evans [011005 11:54] wrote: > > On Fri, Oct 05, 2001 at 02:19:58PM +0000, E.B. Dreger wrote: > > > > > > However, there's a rather ominous and non-descriptive warning > > > present: "There are numerous stability issues in the current aio > > > code that make it unsuitable for inclusion on shell boxes." Can > > > anyone please elaborate? Is this admonition outdated? > > > > > > Seen on 4.3-R. > > > > Alan Cox has done a lot of work to make aio stable over the past > year, and > > I'm guessing that it's reasonably stable as of 4.2 or 4.3. That > warning > > can likely be removed. > > Where was the warning (so it can be removed)? > It's in LINT. > -- > -Alfred Perlstein [alfred@freebsd.org] > 'Instead of asking why a piece of software is using "1970s > technology," > start asking why software is ignoring 30 years of accumulated wisdom.' > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-hackers" in the body of the message > -- jmc MacroHard -- the perfection of form over substance, marketing over performance, and greed over design . . . To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Fri Oct 5 16:17:20 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from jim.go2net.com (jim.go2net.com [64.50.65.22]) by hub.freebsd.org (Postfix) with SMTP id 5431C37B406 for ; Fri, 5 Oct 2001 16:17:17 -0700 (PDT) Received: (qmail 20388 invoked from network); 5 Oct 2001 23:17:53 -0000 Received: from unknown (HELO ketel.go2net.com) (10.200.10.75) by jim.go2net.com with SMTP; 5 Oct 2001 23:17:53 -0000 Received: (qmail 21059 invoked from network); 5 Oct 2001 23:17:14 -0000 Received: from hunches.go2net.com (HELO infospace.com) (@[10.225.33.32]) (envelope-sender ) by ketel.go2net.com (qmail-ldap-1.03) with SMTP for ; 5 Oct 2001 23:17:14 -0000 Message-ID: <3BBE3F7A.98FBC714@infospace.com> Date: Fri, 05 Oct 2001 16:17:14 -0700 From: Yevgeniy Aleynikov Reply-To: eugene@infospace.com X-Mailer: Mozilla 4.78 [en] (X11; U; Linux 2.2.17 i686) X-Accept-Language: ru, en MIME-Version: 1.0 To: Kirk McKusick Cc: Ian Dowse , Matt Dillon , peter@FreeBSD.ORG, ache@FreeBSD.ORG, Ken Pizzini , hackers@FreeBSD.ORG Subject: Re: bleh. Re: ufs_rename panic References: <200110030610.f936AbR11859@beastie.mckusick.com> Content-Type: text/plain; charset=koi8-r Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG It seems like there's no activity on this subject. This is local DoS, guys. if it gets on public (which is probably gonna be soon) everything everywhere will be crashing, and there's no stable fix ready. How can i help to accelerate this problem solution? .... And why FreeBSD security officer's email address always bounces my mail? Thanks! Kirk McKusick wrote: > > The problems all arise from the fact that we unlock the source > while we look up the destination, and when we return to relookup > the source, it may have changed/moved/disappeared. The reason to > unlock the source before looking up the destination was to avoid > deadlocking against ourselves on a lock that we held associated > with the source. Since we now allow recursive locks on vnodes, it > is no longer necessary to release the source before looking up > the destination. So, it seems to me that the correct fix is to > *not* release the source after looking it up, but rather hold it > locked while we look up the destination. We can completely get > rid of relookup and lots of other hairy code and generally make > rename much simpler. Am I missing something here? > > ~Kirk -- Yevgeniy Aleynikov Infospace, Inc. SysAdmin, USE Work: (206)357-4594 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Fri Oct 5 16:20:10 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from earth.backplane.com (earth-nat-cw.backplane.com [208.161.114.67]) by hub.freebsd.org (Postfix) with ESMTP id 9C15237B406; Fri, 5 Oct 2001 16:20:07 -0700 (PDT) Received: (from dillon@localhost) by earth.backplane.com (8.11.6/8.11.2) id f95NK6685878; Fri, 5 Oct 2001 16:20:06 -0700 (PDT) (envelope-from dillon) Date: Fri, 5 Oct 2001 16:20:06 -0700 (PDT) From: Matt Dillon Message-Id: <200110052320.f95NK6685878@earth.backplane.com> To: Yevgeniy Aleynikov Cc: Kirk McKusick , Ian Dowse , peter@FreeBSD.ORG, ache@FreeBSD.ORG, Ken Pizzini , hackers@FreeBSD.ORG Subject: Re: bleh. Re: ufs_rename panic References: <200110030610.f936AbR11859@beastie.mckusick.com> <3BBE3F7A.98FBC714@infospace.com> Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG : :It seems like there's no activity on this subject. :This is local DoS, guys. if it gets on public (which is probably gonna :be soon) everything everywhere will be crashing, and there's no stable :fix ready. :How can i help to accelerate this problem solution? : :.... And why FreeBSD security officer's email address always bounces my :mail? : :Thanks! My most recently posted patch will solve your problem. I am reworking it as per Ian's suggestions before I commit, and will also implement the same feature in rename() (for files). Then I will do a standard commit-to-current-wait-commit-to-stable sequence. But due to the complexity of the changes (even after simplifying them), it is going to be another few days before anything gets into -stable officially. -Matt To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Fri Oct 5 21:20:35 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from smtpout1.compass.net.nz (smtpout1.compass.net.nz [203.97.100.150]) by hub.freebsd.org (Postfix) with ESMTP id 2ED5737B406 for ; Fri, 5 Oct 2001 21:20:32 -0700 (PDT) Received: from attwood.co.nz ([203.97.125.83]) by smtpout1.compass.net.nz (8.9.3/8.8.7) with ESMTP id QAA00622 for ; Sat, 6 Oct 2001 16:20:23 +1200 Date: Sat, 6 Oct 2001 16:20:23 +1200 Received: from mail.bigfoot.com [65.193.182.244] by attwood.co.nz [127.0.0.1] with SMTP (MDaemon.v3.5.7.R) for ; Sat, 06 Oct 2001 16:15:14 +1200 From: "jtl@bigfoot.com" To: "0505@msn.com" <0505@msn.com> Message-ID: <1002341723.0235279168@mail.bigfoot.com> Subject: Try it, you'll like it Cc: john@freeborg.com Cc: pmennen@freebornpeters.com Cc: jmiller@freebornpeters.com Cc: jburgett@freebornpeters.com Cc: tohlms@freebornpeters.com Cc: mdolson@freebornpeters.com Cc: husker@freebox.com Cc: sergio@freebsd.first.gmd.de Cc: alc@freebsd.org Cc: freebsd-hackers@freebsd.org Cc: phantom@freebsd.org Cc: asp34771@hotmail.com Content-Type: text/plain; charset="us-ascii";format=flowed Content-Transfer-Encoding: 7bit X-MDRemoteIP: 65.193.182.244 X-Return-Path: jtl@bigfoot.com X-MDaemon-Deliver-To: freebsd-hackers@freebsd.org Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG **MOST THINK THE ECONOMY WILL ONLY GET WORSE** How long are you going to wait to get control our your finances and get out of debt! Free debt anaylsis http://www.20freemb.com/~formposting/ . <-*->us$8i_AFFOsA 0,szI|zF88F8i_AFFOsA8|F3FA=0,szIuz[SSFAi_AFFOsA8|F3FA=0,szIuOnA F33i_AFFOsA8|F3FA=0,szI3s$Sz=i_AFFOsA8|F3FA=0,szIz9sS=s8i_AFFOsA8|F3FA=0,szI$n=@FAi_AFFOs*0,szI=FA [si_AFFO=90_[A=30 z909FIdS,i_AFFO=90sA I_AFFO=9Z$d,@FA=i_AFFO=90sA I|$d83szi_AFFO=90sA Id=|%W22mi$s3zd[S0,sz<-*-> To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Fri Oct 5 23:27: 0 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from guru.mired.org (okc-65-31-203-60.mmcable.com [65.31.203.60]) by hub.freebsd.org (Postfix) with SMTP id 0461C37B409 for ; Fri, 5 Oct 2001 23:26:58 -0700 (PDT) Received: (qmail 28190 invoked by uid 100); 6 Oct 2001 06:26:57 -0000 From: Mike Meyer MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15294.42033.468134.438184@guru.mired.org> Date: Sat, 6 Oct 2001 01:26:57 -0500 To: hackers@freebsd.org Subject: Looking for sample X code. X-Mailer: VM 6.90 under 21.1 (patch 14) "Cuyahoga Valley" XEmacs Lucid X-face: "5Mnwy%?j>IIV\)A=):rjWL~NB2aH[}Yq8Z=u~vJ`"(,&SiLvbbz2W`;h9L,Yg`+vb1>RG% *h+%X^n0EZd>TM8_IB;a8F?(Fb"lw'IgCoyM.[Lg#r\ Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG I've got an application written for Linux that compiles and mostly works on FreeBSD. However, one feature isn't working. At one point, it wants to make the application owning a specific window think that a specific key was pressed. The original author wasn't quite sure how to do this, as witness the comment: /* I am not sure which of the following fields I have to fill in or what to fill them in with (rcy) I wouldnt be suprised if this breaks in some cases. */ Well, FreeBSD using XFree86-4 seems to be one of the cases, as debugging output shows the XSendEvent being run, but the underlying applications don't react to the key. Could an X guru provide a correct example of faking a key press event? Thanx, http://www.mired.org/home/mwm/ Q: How do you make the gods laugh? A: Tell them your plans. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sat Oct 6 1:46: 2 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from pintail.mail.pas.earthlink.net (pintail.mail.pas.earthlink.net [207.217.120.122]) by hub.freebsd.org (Postfix) with ESMTP id 2AF6837B403; Sat, 6 Oct 2001 01:45:58 -0700 (PDT) Received: from mindspring.com (dialup-209.245.136.251.Dial1.SanJose1.Level3.net [209.245.136.251]) by pintail.mail.pas.earthlink.net (EL-8_9_3_3/8.9.3) with ESMTP id BAA03103; Sat, 6 Oct 2001 01:45:56 -0700 (PDT) Message-ID: <3BBEC4F7.D15FF792@mindspring.com> Date: Sat, 06 Oct 2001 01:46:47 -0700 From: Terry Lambert Reply-To: tlambert2@mindspring.com X-Mailer: Mozilla 4.7 [en]C-CCK-MCD {Sony} (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: hackers@freebsd.org Cc: net@freebsd.org Subject: IPSEC sucking up memory Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG While investigating a problem, I noticed that the IPSEC code is initializing the sp -- even when no one is using IPSEC. Is there a good reason why this is not late-bound, and the IPSEC code is initializing and copying and checking the security policy pointer, even in the absense of actual use of security over socket links? It turns out that this really, really bloats the per socket memory requirements, with the only real result being a lot of extra processing that could be replaced by a pointer is not NULL check. It seems to me that this could be handled in the TCP, UDP, and IP userreq code by only initializing the thing in the case that a policy has been set. Is there some reason why this can't be done? -- Terry To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sat Oct 6 1:50:34 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from pintail.mail.pas.earthlink.net (pintail.mail.pas.earthlink.net [207.217.120.122]) by hub.freebsd.org (Postfix) with ESMTP id 50D1137B407; Sat, 6 Oct 2001 01:50:30 -0700 (PDT) Received: from mindspring.com (dialup-209.245.136.251.Dial1.SanJose1.Level3.net [209.245.136.251]) by pintail.mail.pas.earthlink.net (EL-8_9_3_3/8.9.3) with ESMTP id BAA09318; Sat, 6 Oct 2001 01:50:29 -0700 (PDT) Message-ID: <3BBEC607.CC098104@mindspring.com> Date: Sat, 06 Oct 2001 01:51:19 -0700 From: Terry Lambert Reply-To: tlambert2@mindspring.com X-Mailer: Mozilla 4.7 [en]C-CCK-MCD {Sony} (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: hackers@freebsd.org Cc: net@freebsd.org Subject: IPSEC code error Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On a related topic, there appears to be a code error in the IPSEC code. Specifically, the priv flag is set to 1 if the user is root and the socket is non-null (this lets the code be called from the bridging code as well, so ignore the first half of the "if" test, and concentrate on the "uid == 0" test). In the code that examines this flag, the comment is that it is looking at whether or not the port is a priviledged port, not whether or not the user who owns it is root. This implies that the "rootness" check improperly flags any ports opened by root, regardless of whether or not they are priviledged ports. Is the code where the flag is initialized correct, or is the comment where the flag is observed correct? -- Terry To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sat Oct 6 4:58:27 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from ip.eth.net (mail.ip.eth.net [202.9.128.18]) by hub.freebsd.org (Postfix) with ESMTP id C054C37B405 for ; Sat, 6 Oct 2001 04:58:21 -0700 (PDT) Received: (apparently) from anjali ([61.11.16.239]) by ip.eth.net with Microsoft SMTPSVC(5.5.1877.467.46); Sat, 6 Oct 2001 17:28:18 +0530 Message-ID: <002401c14e5e$1c0d2380$0a00a8c0@indranet> From: "Anjali Kulkarni" To: Subject: scheduling Date: Sat, 6 Oct 2001 17:27:40 +0530 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0021_01C14E8C.333A6EE0" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4807.1700 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4807.1700 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG This is a multi-part message in MIME format. ------=_NextPart_000_0021_01C14E8C.333A6EE0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi, I am trying to use the sched_yield/ksched_yield function in the kernel, = and it returns a success value, but actually does not yield to another = process. I suppose this is because the kernel process is higher priority = than any user level process??(Like I try and login from another terminal = but it has hanged, untill the kernel process returns, I cannot use any = other screen.) Thanks, Anjali ------=_NextPart_000_0021_01C14E8C.333A6EE0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Hi,
 
I am trying to use the = sched_yield/ksched_yield=20  function in the kernel, and it returns a success value, but = actually does=20 not yield to another process. I suppose this is because the kernel = process is=20 higher priority than any user level process??(Like I try and login from = another=20 terminal but it has hanged, untill the kernel process returns, I cannot = use any=20 other screen.)
 
Thanks,
Anjali
------=_NextPart_000_0021_01C14E8C.333A6EE0-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sat Oct 6 5:33:58 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from ip.eth.net (mail.ip.eth.net [202.9.128.18]) by hub.freebsd.org (Postfix) with ESMTP id D003037B403 for ; Sat, 6 Oct 2001 05:33:53 -0700 (PDT) Received: (apparently) from anjali ([61.11.16.239]) by ip.eth.net with Microsoft SMTPSVC(5.5.1877.197.19); Sat, 6 Oct 2001 18:03:50 +0530 Message-ID: <001a01c14e63$12f68840$0a00a8c0@indranet> From: "Anjali Kulkarni" To: Subject: scheduling Date: Sat, 6 Oct 2001 18:03:12 +0530 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0015_01C14E91.2A23D3A0" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4807.1700 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4807.1700 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG This is a multi-part message in MIME format. ------=_NextPart_000_0015_01C14E91.2A23D3A0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable I forgot to mention, the kernel is 4.3 so it runs to completion, (no = pre-emption). I just want to know if ksched_yield can be used like the = general purpose 'yield', which did yield in the kernel. Anjali ------=_NextPart_000_0015_01C14E91.2A23D3A0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
I forgot to mention, the kernel is 4.3 = so it runs=20 to completion, (no pre-emption). I just want to know if ksched_yield can = be used=20 like the general purpose 'yield', which did yield in the = kernel.
 
Anjali
------=_NextPart_000_0015_01C14E91.2A23D3A0-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sat Oct 6 10:45:28 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from hotmail.com (f170.law14.hotmail.com [64.4.21.170]) by hub.freebsd.org (Postfix) with ESMTP id C1F4237B401 for ; Sat, 6 Oct 2001 10:45:26 -0700 (PDT) Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Sat, 6 Oct 2001 10:45:26 -0700 Received: from 202.142.94.99 by lw14fd.law14.hotmail.msn.com with HTTP; Sat, 06 Oct 2001 17:45:26 GMT X-Originating-IP: [202.142.94.99] From: "srinivas k" To: hackers@FreeBSD.ORG Subject: Request for subscription Date: Sat, 06 Oct 2001 17:45:26 +0000 Mime-Version: 1.0 Content-Type: text/plain; format=flowed Message-ID: X-OriginalArrivalTime: 06 Oct 2001 17:45:26.0585 (UTC) FILETIME=[AEAB0290:01C14E8E] Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Hello respected Sir, i'm really interested in joining to the FreeBSD group. please subscribe for me to the same. kshriny@hotmail.com thanking u. Srinivas. _________________________________________________________________ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sat Oct 6 14: 4:16 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from mail.halplant.com (24-168-203-47.wo.cox.rr.com [24.168.203.47]) by hub.freebsd.org (Postfix) with ESMTP id 761E737B405; Sat, 6 Oct 2001 14:04:09 -0700 (PDT) Received: by mail.halplant.com (Postfix, from userid 1001) id 26FE7217A; Sat, 6 Oct 2001 17:04:03 -0400 (EDT) Date: Sat, 6 Oct 2001 17:04:03 -0400 From: Andrew J Caines To: FreeBSD Advocacy Subject: FreeBSD license plate Message-ID: <20011006170403.C53638@hal9000.servehttp.com> Reply-To: Andrew J Caines Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i Organization: H.A.L. Plant X-Powered-by: FreeBSD 4.4-STABLE X-PGP-Fingerprint: C59A 2F74 1139 9432 B457 0B61 DDF2 AA61 67C3 18A1 Importance: Normal Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG For your amusement, I now have Actually, they also have the big grey "Powered by... FreeBSD" sticker to the right of the letters, the mustard yellow square one on the bottom left (under the yellow square date sticker in the top left) and round green-blue one in the bottom right corner. -Andrew- -- _______________________________________________________________________ | -Andrew J. Caines- Unix Systems Engineer A.J.Caines@halplant.com | | "They that can give up essential liberty to obtain a little temporary | | safety deserve neither liberty nor safety" - Benjamin Franklin, 1759 | To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message