Re: Fixing Posix semaphores
--- Joe Kelsey <[EMAIL PROTECTED]> wrote: > On Tue, 2004-12-14 at 08:08 -0800, Kamal R. Prasad > wrote: > > --- Joe Kelsey <[EMAIL PROTECTED]> wrote: > > > > > I have a desire to fix posix semaphores in at > least > > > 5.3. The current > > > implementation doesn't actually follow the > "spirit" > > > of the standard, > > > even though it technically qualifies in a > somewhat > > > degraded sense. I > > > refer to the fact that the current > implementation > > > treats posix > > > semaphores as completely contained inside the > kernel > > > and essentially > > > divorced from the filesystem. The true "spirit" > of > > > the standard places > > > the semaphores directly in the file system, > similar > > > to named pipes. > > > However the current implementation treats the > > > supplied "name" as a > > > 14-character identifier, required to begin with > a > > > slash and contain no > > > other slashes. Pretty weak. > > > > > > Well, in order to fix this, we need to add file > > > system code and come up > > > with a new type. > > > > From the opengroup website:- > > > > > http://www.opengroup.org/onlinepubs/7990989775/xsh/sem_open.html > > > > "It is unspecified whether the name appears in the > > file system and is visible to functions that take > > pathnames as arguments. " > > > > >I currently have some time to > > > spend on something like > > > this and am willing to put in whatever effort it > > > takes. Does anyone > > > want to add their own ideas or requirements? > > > > > > > You need to allow the user to provide a fully > > qualified pathname as an argument -and if the > > implementation doesn't allow that, that would be a > > BUG. But requiring the supplied name to be a valid > > pathname is not mandated by the std. > > The current implementation FAILS to allow arbitrary > pathnames. The > current implementation arbitrarily restricts the > name to a string of not > more than 14 characters optionally starting with a > slash. This does not > match pathnames on FreeBSD. > > Yes, I agree that the standard does not require > pathnames, but it does > say that the name can match the otherwise > standardized pathname syntax > (at least the POSIX pathname standard). The FreeBSD > implementation > clearly FAILS to allow POSIX pathnames. > Yeah -so the only fix for ensuring compliance is that it allow a POSIX pathname as an argument. Many of the posix requirements are a result of bending backwards to deal with badly designed operating systems. It doesn't mean that doing things their way [in this case coupling the semaphore implementation to the filesystem] can actually improve the OS. > > BTW -how would > > you deal with a diskless workstation running > Freebsd? > > Why does this matter? If the system uses NFS, then > all bets are off. > If the system contains a FreeBSD file system, thenit > works. What other > choice could there ever be? > something like boot from flash/eeprom. I don't know about freebsd as an instance -but many networking devices do use netbsd that way. For the most part, you wouldn't want to create a file on such a system. regards -kamal > /Joe > > > __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: nfs within jail
> "Matt" == Matt <[EMAIL PROTECTED]> writes: Matt> Simon 'corecode' Schubert wrote: >> On 14.12.2004, at 13:09, Matt wrote: >> >>> Quick question regarding nfs (or other filesystems) inside a jail. >>> As far as I can tell, it isn't possible to mount nfs shares while >>> inside a jail. Is this correct? Is there any way around this >>> limitation? A way to browse network shares without mounting? Or >>> some such trickery? Thanks. Matt> Thanks for your reply. The problem is that I only have a jail Matt> account on the machine. I'd like to access NFS shares on the Matt> LAN from within my jail. I only need read access to the share. Matt> It has been exported to me, I just don't know how to access it. Maybe someone (Rick Maclem? heh) could write an ftp-like client for nfs. Dave. -- |David Gilbert, Independent Contractor. | Two things can only be | |Mail: [EMAIL PROTECTED]| equal if and only if they | |http://daveg.ca | are precisely opposite. | =GLO ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
IPX, Netware functionality?
Is somebody still working on IPX, Netware functionality? I'm having quite unexpected problems on 4.10-RELEASE when trying to mount netware volumes. In former 4-releases, I could a) add IPX+ef to kernel, b) recompile, c) run IPXrouted and d) make ifconfig f[0-3] ipx , then everything worked. Now, I don't see f[0-3] pseudo-interfaces anymore. ifconfig ipx, however, works. After using it, I can have either one several (aliased) ipx entries in my ifconfig. And tcpdump confirms there *is* at least SAP traffic from netware servers I'm interested in. Now, everything netware-related fails with "protocol not supported" diagnostic. I digged a bit in ncplist, and found that the ipx listening socket fails to receive anything with ETIMEDOUT. IPX socket not working?? Could anything be done? Also, there's some peculiar logic in ipx addresses checking in libncp routines, e.g., ipx_nullnet checking of host addrs. For my digging, I had to circumvent it, as without doing so, perfectly reasonable configuration just generated error, without even trying to listen to the network. ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: My project wish-list for the next 12 months
On Tue, 14 Dec 2004 09:29:19 +0200, Danny Braniss <[EMAIL PROTECTED]> wrote: > Great!, we seem to be on the same wavelength, im now writing (at about one > char a minute) the login user program, and somehow - to be discovered -, the > socket will be passed to the kernel. > my main efford, at the moment, is a) to &^%$$## understand the RFC (i think > they used a scrambler) and b) define the data structures. How do you plan on handling cases where the user program blocks and can't login again (because of a page fault for code or data, allocating a new socket in the kernel, allocating a new socket buffer in the kernel, etc)? One of the major problems any software-only iSCSI initiator has is dealing with memory deadlocks. The OS may try to write out one or more pages in order to free up memory. If the iSCSI initiator needs to allocate memory (directly or indirectly in the TCP stack) in order to complete that write, you've got a circular dependency where in order to get free memory you need to have free memory. Hardware-based iSCSI HBAs solve this by having their own memory and TCP stack separate from the OS. Software-only iSCSI initiators such as linux-iscsi usually just hope it doesn't happen, and that's why I don't usually recommend software-only iSCSI initiators to anyone. Having a user program login is fine for SendTargets discovery and testing, but if you're planning on getting a reliable iSCSI initiator, you'll probably need to do the login from within the kernel, and make sure you have all of the resources needed to do that reserved (wire pages into RAM, etc). The hard part of that is making sure you have all the resources needed to send and receive TCP packets reserved, as well as the resources to establish new connections in case the existing connections is closed or aborted. The linux-iscsi initiator doesn't even attempt this, and just hopes deadlocks don't happen very often. I used to be the main (and for most of that time, only) developer for the linux-iscsi initiator. When I first took over the initiator, it used the approach of doing iSCSI session login from a daemon, and passing the socket down into a kernel module. I had to take that out because it deadlocked too easily. I wouldn't recommend that approach. -- Scott M. Ferris ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: My project wish-list for the next 12 months
On Tue, Dec 14, 2004 at 01:47:15PM -0600, Scott M. Ferris wrote.. > On Tue, 14 Dec 2004 09:29:19 +0200, Danny Braniss <[EMAIL PROTECTED]> wrote: > > Great!, we seem to be on the same wavelength, im now writing (at about one > > char a minute) the login user program, and somehow - to be discovered -, the > > socket will be passed to the kernel. > > my main efford, at the moment, is a) to &^%$$## understand the RFC (i think > > they used a scrambler) and b) define the data structures. > > How do you plan on handling cases where the user program blocks and > can't login again (because of a page fault for code or data, > allocating a new socket in the kernel, allocating a new socket buffer > in the kernel, etc)? > > One of the major problems any software-only iSCSI initiator has is > dealing with memory deadlocks. The OS may try to write out one or > more pages in order to free up memory. If the iSCSI initiator needs > to allocate memory (directly or indirectly in the TCP stack) in order > to complete that write, you've got a circular dependency where in > order to get free memory you need to have free memory. > Hardware-based iSCSI HBAs solve this by having their own memory and > TCP stack separate from the OS. Software-only iSCSI initiators such Downside: TOE cards are not cheap though.. -- Wilko Bulte [EMAIL PROTECTED] ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
sysctl to make all nfs mounts use local file locking (patch enclosed)
Hi. I've recently upgraded my main work machine to -CURRENT in an environment where much of the world is mounted via NFS. The NFS locking via rpc.lockd/rpc.statd doesn't seem to be too stable, and the -L behavior described in mount_nfs(8) works much better for me. Unfortunately, I can't seem to coax the automounter into providing those kinds of mounts for me. Since I only need the local locking behavior, I create a little sysctl that adds the NFSMNT_NOLOCKD flag to any NFS mount. I've made a patch against -CURRENT for anyone who'd liek to add this functionality to their kernel. If a committer is {interested in,happy with} this patch, please feel free to commit it. And if I've missed a way to make the automounter do this, please wise me up. Thanks. -- Ted Faber http://www.isi.edu/~faber PGP: http://www.isi.edu/~faber/pubkeys.asc Unexpected attachment on this mail? See http://www.isi.edu/~faber/FAQ.html#SIG --- nfs_vfsops.c.orig Tue Dec 7 06:26:39 2004 +++ nfs_vfsops.cTue Dec 14 12:39:22 2004 @@ -88,6 +88,9 @@ static int nfs_ip_paranoia = 1; SYSCTL_INT(_vfs_nfs, OID_AUTO, nfs_ip_paranoia, CTLFLAG_RW, &nfs_ip_paranoia, 0, ""); +static int nfs_force_local_locking = 0; +SYSCTL_INT(_vfs_nfs, OID_AUTO, nfs_force_local_locking, CTLFLAG_RW, +&nfs_force_local_locking, 0, ""); #ifdef NFS_DEBUG int nfs_debug; SYSCTL_INT(_vfs_nfs, OID_AUTO, debug, CTLFLAG_RW, &nfs_debug, 0, ""); @@ -726,6 +729,10 @@ */ if (nfs_ip_paranoia == 0) args.flags |= NFSMNT_NOCONN; + + if (nfs_force_local_locking) + args.flags |= NFSMNT_NOLOCKD; + if (args.fhsize < 0 || args.fhsize > NFSX_V3FHMAX) return (EINVAL); error = copyin((caddr_t)args.fh, (caddr_t)nfh, args.fhsize); pgp6GJfC1ZVhG.pgp Description: PGP signature
Re: My project wish-list for the next 12 months
On Tue, 14 Dec 2004 22:02:40 +, Christoph Hellwig <[EMAIL PROTECTED]> wrote: > > Note that this isn't different from any sufficiently complex HBA driver, > except that the code that can operate under these conditions is more > complex for iscsi. I don't understand why you think the situation is at all comparable to other HBA drivers. The complexity of the HBA driver code isn't the real issue. The problem with software-only iSCSI HBA drivers is that they usually try to make use of the OS TCP stack, and that stack usually wasn't designed to operate under the constraints that an HBA driver has to operate under. The correctness of a software-only iSCSI HBA driver depends on properties of the TCP stack, as well as the HBA driver's code. I don't think that's true of any other HBA driver. -- Scott M. Ferris ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Partiotioning 2.2TB Under FreeBSD 5.2.1
I am new to this big arrays. FreeBSD 5.2.1 doesnt see all the 2.2TB. So when I do # dmesg |grep da0 GEOM: create disk da0 dp=0xc832fc50 da0 at twa0 bus 0 target 0 lun 0 da0: <3ware Logical Disk 00 1.00> Fixed Direct Access SCSI-0 device da0: 100.000MB/s transfers da0: 2384080MB (4882595840 512 byte sectors: 255H 63S/T 303927C) # and doing # fdisk da0 *** Working on device /dev/da0 *** parameters extracted from in-core disklabel are: cylinders=303927 heads=255 sectors/track=63 (16065 blks/cyl) Figures below won't work with BIOS for partitions not in cyl 1 parameters to be used for BIOS calculations are: cylinders=303927 heads=255 sectors/track=63 (16065 blks/cyl) Media sector size is 512 Warning: BIOS sector numbering starts with sector 1 Information from DOS bootblock is: The data for partition 1 is: sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD) start 63, size 587625507 (286926 Meg), flag 80 (active) beg: cyl 0/ head 1/ sector 1; end: cyl 1023/ head 254/ sector 63 The data for partition 2 is: The data for partition 3 is: The data for partition 4 is: # and it comes out. How should I proceed. Thanks Aman > > Hi all, > > I have 12WD 200GB SATA drives with RAID5 and glabal spare on 3ware 9000 > series controller. Also one 80GB SATA drive for OS. > I had to manually compile the twa driver. kldload twa. The system started > recognizing the controller and the total capacity. > Although the dao show 2.2TB but when I try to partition the RAID5 the > sysinstall only shows me 271GB. > Any ideas how to partition or see the whole 2TB. > > Thanks in advance. > > Aman > ___ > [EMAIL PROTECTED] mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "[EMAIL PROTECTED]" > -- Amandeep.S [EMAIL PROTECTED] http://aman.chamkila.org ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: My project wish-list for the next 12 months
> Hardware-based iSCSI HBAs solve this by having their own memory and > TCP stack separate from the OS. Software-only iSCSI initiators such > as linux-iscsi usually just hope it doesn't happen, and that's why I > don't usually recommend software-only iSCSI initiators to anyone. How is that any better than having the SW iscsi initiator pre-allocate a pool of memory for its use at startup? ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: counting total PIDs since the server been started
On Tue, 14 Dec 2004 09:55:21 +, Chris Elsworth <[EMAIL PROTECTED]> wrote: > On Tue, Dec 14, 2004 at 12:33:45PM +0300, scream wrote: > > Hello freebsd-hackers, > > > > I`m trying to solve this puzzle >"how to get statistics about total count > > of > > fork`ed\exec`ed processes since the server been rebooted and even > > make some RRD-like graphs".I need it > > to make some graphs about server perfomance and stability.Could > > anyone point me to any usefull docs. > > Hello, > > OTTOMH without consulting any docs, are these any use: > > # sysctl -a | grep fork > vm.stats.vm.v_forks: 4795379 > vm.stats.vm.v_vforks: 1017309 > vm.stats.vm.v_rforks: 0 > Hehe, I never noticed those. > -- > Chris > > > ___ > [EMAIL PROTECTED] mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-performance > To unsubscribe, send any mail to "[EMAIL PROTECTED]" > -- If it's there, and you can see it, it's real. If it's not there, and you can see it, it's virtual. If it's there, and you can't see it, it's transparent. If it's not there, and you can't see it, you erased it. ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
nfs within jail
Quick question regarding nfs (or other filesystems) inside a jail. As far as I can tell, it isn't possible to mount nfs shares while inside a jail. Is this correct? Is there any way around this limitation? A way to browse network shares without mounting? Or some such trickery? Thanks. ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: nfs within jail
Simon 'corecode' Schubert wrote: On 14.12.2004, at 13:09, Matt wrote: Quick question regarding nfs (or other filesystems) inside a jail. As far as I can tell, it isn't possible to mount nfs shares while inside a jail. Is this correct? Is there any way around this limitation? A way to browse network shares without mounting? Or some such trickery? Thanks. you need to mount them from the outside into the jail cheers simon Thanks for your reply. The problem is that I only have a jail account on the machine. I'd like to access NFS shares on the LAN from within my jail. I only need read access to the share. It has been exported to me, I just don't know how to access it. ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
mounting nfs shares within jail
Quick question regarding nfs. As far as I can tell, it isn't possible to mount nfs shares from within a jail. Is this correct? Is there any way around this limitation? A way to browse network shares without mounting? Or some such trickery? Thanks. ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: nfs within jail
Matt wrote: Quick question regarding nfs (or other filesystems) inside a jail. As far as I can tell, it isn't possible to mount nfs shares while inside a jail. Is this correct? Is there any way around this limitation? A way to browse network shares without mounting? Or some such trickery? Thanks. When a Jail needs to access a NFS mounted device I use to mount it on the hosting machine (the system outsite the jail where jail is runned from) in any mount-point, so I mount_nullfs inside the selected jails, say, mount_nullfs /nfs/backup/200.200.100.40 /usr/jail/200.200.100.40/mnt/nfs/backup; The problem is that you cant do it if you are not the jails admin (ie, you dont have full access to the jails hosting system). ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: nfs within jail
Patrick Tracanelli wrote: Matt wrote: Quick question regarding nfs (or other filesystems) inside a jail. As far as I can tell, it isn't possible to mount nfs shares while inside a jail. Is this correct? Is there any way around this limitation? A way to browse network shares without mounting? Or some such trickery? Thanks. When a Jail needs to access a NFS mounted device I use to mount it on the hosting machine (the system outsite the jail where jail is runned from) in any mount-point, so I mount_nullfs inside the selected jails, say, mount_nullfs /nfs/backup/200.200.100.40 /usr/jail/200.200.100.40/mnt/nfs/backup; The problem is that you cant do it if you are not the jails admin (ie, you dont have full access to the jails hosting system). ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]" Thanks for your input. I've noticed that nfs server is runing nfsv4. This might shed new light on the problem. ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Partiotioning 2.2TB Under FreeBSD 5.2.1
Hi all, I have 12WD 200GB SATA drives with RAID5 and glabal spare on 3ware 9000 series controller. Also one 80GB SATA drive for OS. I had to manually compile the twa driver. kldload twa. The system started recognizing the controller and the total capacity. Although the dao show 2.2TB but when I try to partition the RAID5 the sysinstall only shows me 271GB. Any ideas how to partition or see the whole 2TB. Thanks in advance. Aman ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: counting total PIDs since the server been started
On Tue, 14 Dec 2004 09:23:46 -0600, Dan Nelson <[EMAIL PROTECTED]> wrote: > In the last episode (Dec 14), Vlad GALU said: > > On Tue, 14 Dec 2004 09:55:21 +, Chris Elsworth <[EMAIL PROTECTED]> > > wrote: > > > On Tue, Dec 14, 2004 at 12:33:45PM +0300, scream wrote: > > > > I`m trying to solve this puzzle >"how to get statistics about > > > > total count of fork`ed\exec`ed processes since the server been > > > > rebooted and even make some RRD-like graphs".I need it to make > > > > some graphs about server perfomance and stability.Could anyone > > > > point me to any usefull docs. > > > > > > OTTOMH without consulting any docs, are these any use: > > > > > > # sysctl -a | grep fork > > > vm.stats.vm.v_forks: 4795379 > > > vm.stats.vm.v_vforks: 1017309 > > > vm.stats.vm.v_rforks: 0 > > > > Hehe, I never noticed those. > > Most Unixes provide these stats under the "vmstat -s" command also. > It'd be nice if Linux had something like that. However, I've been able to reproduce the desired effect by issuing "cat /proc/stat | grep processes". > -- > Dan Nelson > [EMAIL PROTECTED] > -- If it's there, and you can see it, it's real. If it's not there, and you can see it, it's virtual. If it's there, and you can't see it, it's transparent. If it's not there, and you can't see it, you erased it. ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: counting total PIDs since the server been started
In the last episode (Dec 15), Vlad GALU said: > On Tue, 14 Dec 2004 09:23:46 -0600, Dan Nelson <[EMAIL PROTECTED]> wrote: > > Most Unixes provide these stats under the "vmstat -s" command also. > > It'd be nice if Linux had something like that. However, I've been > able to reproduce the desired effect by issuing "cat /proc/stat | > grep processes". Linux (debian at least) puts the fork count at the bottom of its "vmstat -s" output, and "vmstat -s | grep forks" matches "grep processes /proc/stat". -- Dan Nelson [EMAIL PROTECTED] ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: My project wish-list for the next 12 months
On Tue, 14 Dec 2004 17:05:25 -0800 (PST), Kip Macy <[EMAIL PROTECTED]> wrote: > > Hardware-based iSCSI HBAs solve this by having their own memory and > > TCP stack separate from the OS. Software-only iSCSI initiators such > > as linux-iscsi usually just hope it doesn't happen, and that's why I > > don't usually recommend software-only iSCSI initiators to anyone. > > How is that any better than having the SW iscsi initiator pre-allocate a pool > of > memory for its use at startup? You could preallocate, but the hard part would be getting the OS network stack to allocate from the iSCSI driver's preallocated memory pool, instead of calling the usual kernel memory allocator (or more likely as a fallback if the normal kernel allocation fails). How do you tell the TCP stack and NIC drivers to allocate control blocks, mbufs, and anything else they might need from the preallocated iSCSI pool? It's not a problem in theory, but in practice that's not something you usually see in the API for the network stack. -- Scott M. Ferris ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"