Re: Pagedaemon and shared memory [was: Heavy system load by pagedaemon].

2006-05-28 Thread Yaron Zabary
nt size goesdown from ~200Mb to > > ~100Mb. I also notices some relations to running acroread 7 with large PDF > > files (which might also need shared memory for its operation). I had the > > exact same problem on the same box when I was running FreeBSD 4.10 (which > > I

Re: Pagedaemon and shared memory [was: Heavy system load by pagedaemon].

2006-05-28 Thread soralx
ng acroread 7 with large PDF > files (which might also need shared memory for its operation). I had the > exact same problem on the same box when I was running FreeBSD 4.10 (which > I attributed at first to a bad disk, which was replaced when I upgraded > from 4.10 to 6.1). Isn't

Re: Pagedaemon and shared memory [was: Heavy system load by pagedaemon].

2006-05-28 Thread Yaron Zabary
A few more points I forgot to mention. Nothing in /var/log/messages or dmesg. I just tried opening acroread on a 5Mb file and started scrolling fast in it. The machine froze at 18:37:26, the clock blipped at 18:39:25 and went back to normal at 18:41:35, which means over four minutes of freeze.

Pagedaemon and shared memory [was: Heavy system load by pagedaemon].

2006-05-28 Thread Yaron Zabary
. The vmware process resident size goes down from ~200Mb to ~100Mb. I also notices some relations to running acroread 7 with large PDF files (which might also need shared memory for its operation). I had the exact same problem on the same box when I was running FreeBSD 4.10 (which I attributed at

Re: Shared memory permissions question

2005-08-16 Thread Vasil Dimov
On Tue, Aug 16, 2005 at 03:10:34PM +0200, Joost Bekkers wrote: > On Tue, Aug 16, 2005 at 04:51:15PM +0400, Dmitry Agaphonov wrote: > > Hello, > > > > > > I have user A from group G creating shared memory M with permissions > > 0060. After this, A fails to

Re: Shared memory permissions question

2005-08-16 Thread Joost Bekkers
On Tue, Aug 16, 2005 at 04:51:15PM +0400, Dmitry Agaphonov wrote: > Hello, > > > I have user A from group G creating shared memory M with permissions > 0060. After this, A fails to attach M due to permission denied. > However, another user B from the same group G successfully

Shared memory permissions question

2005-08-16 Thread Dmitry Agaphonov
Hello, I have user A from group G creating shared memory M with permissions 0060. After this, A fails to attach M due to permission denied. However, another user B from the same group G successfully attaches M. User A manages to attach only if permissions 0600 added for M. Why the system

Re: shared memory in jails

2004-08-27 Thread Pawel Malachowski
On Fri, Aug 27, 2004 at 05:18:50PM +0200, Dmitry Karasik wrote: > I've been playing with shared memory in jails, and very soon found > out that one jail's segments are visible (didn't check the accesibility > thoroughly) in another, which IMO is against the very idea

Re: shared memory in jails

2004-08-27 Thread Christian S.J. Peron
On 27 Aug 2004 Dmitry Karasik wrote: > > Hi hackers, > > I've been playing with shared memory in jails, and very soon found > out that one jail's segments are visible (didn't check the accesibility > thoroughly) in another, which IMO is against the very idea of t

shared memory in jails

2004-08-27 Thread Dmitry Karasik
Hi hackers, I've been playing with shared memory in jails, and very soon found out that one jail's segments are visible (didn't check the accesibility thoroughly) in another, which IMO is against the very idea of the jail. ( The exact problem is that postgresqls, when run in ja

Re: Shared memory question

2003-09-10 Thread Wes Peters
On Friday 29 August 2003 20:31, Lev Walkin wrote: > zera holladay wrote: > > When one uses the term "shared memory" while > > discussing Unix, then what is generally the meaning of > > that term? I have read that some Unixes have "shared > > memory&q

Re: Shared memory question

2003-08-30 Thread Lev Walkin
zera holladay wrote: When one uses the term "shared memory" while discussing Unix, then what is generally the meaning of that term? I have read that some Unixes have "shared memory" for "shared objects." However, I believe the term "shared memory"

Shared memory question

2003-08-30 Thread zera holladay
When one uses the term "shared memory" while discussing Unix, then what is generally the meaning of that term? I have read that some Unixes have "shared memory" for "shared objects." However, I believe the term "shared memory" more generically refers

RE: COW and mprotect on non-shared memory

2003-08-14 Thread Luoqi Chen
> For that reason, when you mprotect an area of non-shared, anonymous > memory to no access and then back to writable, Linux has no way of > knowing that the memory wasn't set for COW before you make it > unwritable. It goes ahead and makes all the pages in the area COW. > > That means that if I

COW and mprotect on non-shared memory

2003-08-14 Thread Ed L Cashin
Hi. I've noticed that in FreeBSD, the struct vm_map_entry has an eflags member that can have the MAP_ENTRY_COW bit set. In the vm_map_protect function, which is used by mprotect, it looks like this bit is used to determine whether or not to set the page table entries for write access or not:

Re: COW and mprotect on non-shared memory

2003-08-14 Thread Ed L Cashin
"Luoqi Chen" <[EMAIL PROTECTED]> writes: [Ed writes] >> That means that if I do this: >> >> for (i = 0; i < n; ++i) { >> assert(!mprotect(p, pgsiz, PROT_NONE)); >> assert(!mprotect(p, pgsiz, PROT_READ|PROT_WRITE|PROT_EXEC)); >> p[i] = i & 0xff; >> } >> >> ... I get n mi

Re: COW and mprotect on non-shared memory

2003-08-10 Thread David Schultz
On Thu, Aug 07, 2003, Ed L Cashin wrote: > "Luoqi Chen" <[EMAIL PROTECTED]> writes: > > [Ed writes] > >> That means that if I do this: > >> > >> for (i = 0; i < n; ++i) { > >> assert(!mprotect(p, pgsiz, PROT_NONE)); > >> assert(!mprotect(p, pgsiz, PROT_READ|PROT_WRITE|PROT_EXEC));

RE: shared memory models/techniques

2001-08-27 Thread Charles Randall
sw/mm/ If they're unrelated, you'll have to use SysV. Charles -Original Message- From: fergus [mailto:[EMAIL PROTECTED]] Sent: Saturday, August 18, 2001 4:57 AM To: hackers Subject: shared memory models/techniques hope this is an ok place to post this. as far as i can tell the

shared memory models/techniques

2001-08-18 Thread fergus
hope this is an ok place to post this. as far as i can tell there are three ways to share memory between processes - using mmap, ipc shared mem or skip it using threads instead. is this right? basically i have a server process accepting many connections & i was using threads, however, it doesn'

RE: Shared Memory

2000-12-08 Thread William Carlsson - Teligent Nordic, AB - Sweden
FreeBSD 4+ I had something like 8192 processes in mind and same goes for max open files I'd like 256M shared memory... William Carlsson Second Line Support Teligent Nordic AB P.O. Box 213 S-149 21 Nynäshamn SWEDEN Telephone: +4

Re: Shared Memory

2000-12-08 Thread Peter Pentchev
On Fri, Dec 08, 2000 at 01:01:16PM +0100, William Carlsson - Teligent Nordic, AB - Sweden wrote: > Isn't all kern.* read only? > Seems like it can't be changed more than it's in theory changeable > > Something like the maximum nuber of files and processes, that is suposed to > be > soft configur

RE: Shared Memory

2000-12-08 Thread William Carlsson - Teligent Nordic, AB - Sweden
Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Mikko Tyolajarvi Sent: den 7 december 2000 18:54 To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: Re: Shared Memory In local.freebsd.hackers you write: >Could anyone enlighten me on how to set the amount of

Re: Shared Memory

2000-12-07 Thread Mikko Tyolajarvi
In local.freebsd.hackers you write: >Could anyone enlighten me on how to set the amount of shared memory? If you mean the wretched System V IPCs, the parameters are in LINT. Search for "SHM". >I'd like that info for FreeBSD 2.2.2, 3.x, 4.x The parameters only have descri

Shared Memory

2000-12-07 Thread William Carlsson - Teligent Nordic, AB - Sweden
Could anyone enlighten me on how to set the amount of shared memory? I'd like that info for FreeBSD 2.2.2, 3.x, 4.x Thanks... William Carlsson Second Line Support Teligent Nordic AB P.O. Box 213 S-149 21 Nynäshamn SWEDEN Tele

Re: Shared Memory Issues

2000-09-09 Thread Lance Rocker
et it run once a day, just as a little proactive housekeeping. For the record, here are the kernel options I use with this kernel: options SYSVSHM #SYSV-style shared memory options SYSVMSG #SYSV-style message queues options SYSVSEM

Re: Shared Memory Issues

2000-09-08 Thread void
ps one > program is leaking? SysV shared memory segments are defined to stick around until some appropriately-privileged user process deletes them. I was thinking recently that it might be nice to extend that API so a process creating such a segment could ask the kernel to reference-count it

Re: Shared Memory Issues

2000-09-08 Thread John Toon
t get forgotten in the shadow of Perl. However, it seems strange that you're getting non-attached memory segments. Surely it is the job of the kernel to clean up after processes (if they're badly programmed and don't do it themselves)? Perhaps one program is leaking? My system has bee

Re: Shared Memory Issues

2000-09-05 Thread John Toon
stake had been to think that the system was running out of actual shared memory pages, but successive increases of the maximum pages had no effect. The actual problem, as you've rightly pointed out, was that each process was running out of shared memory segments... Incidentally, how many pages doe

Re: Shared Memory Issues

2000-09-05 Thread Clive Lin
umber of shared segments per process. > I'm currently running FreeBSD 4.0-RELEASE. > > Several questions; > > 1. If I upgrade to 4.1-STABLE (which I will be soon), will the shared > memory issue disappear? I have 5.0 and 4.1 machines with the same SHM* tuning above. All work f

Re: Shared Memory Issues

2000-09-05 Thread Mustafa Deeb
blem. > > > >The same with me. > > > > > I added > > > > options SHMMAXPGS=16385 > > options SHMMAX=(SHMMAXPGS*PAGE_SIZE+1) > > > > to my new kernel and recompiled. > > > >I tried this without success. > > > > > However,

Re: Shared Memory Issues

2000-09-05 Thread Konstantin Chuguev
have since > tried several recompiles of the kernel to fix the problem. > The same with me. > > I added > > options SHMMAXPGS=16385 > options SHMMAX=(SHMMAXPGS*PAGE_SIZE+1) > > to my new kernel and recompiled. > I tried this without success. > > However, under

Shared Memory Issues

2000-09-05 Thread John Toon
fix the problem. I added options SHMMAXPGS=16385 options SHMMAX=(SHMMAXPGS*PAGE_SIZE+1) to my new kernel and recompiled. However, under XFree86 4.0, I still seem to be getting shared memory issues. Compupic refuses to start under GNOME issuing X Error of failed request: BadAccess (attem

Re: IPC, shared memory, syncronization AND threads...

2000-08-16 Thread Ronald G Minnich
On Wed, 16 Aug 2000, Peter Jeremy wrote: > >Here's a simple test-and-set function for the 386 (tested and works): > Actually, this isn't particularly good coding. It isn't SMP-safe. you caught me! I'm a lousy assembly programmer! Actually, that code is so old it predates SMP by a bit ...

Re: IPC, shared memory, syncronization AND threads...

2000-08-16 Thread Peter Dufault
Here's the kind of thing I have in mind, wrapped around the pthreads mutexes. This replaces default pthread mutexes (those with no special attributes) with possibly fast ones. I haven't done any real timing but I've verified that a program I have works and runs a lot faster with these wrappers.

Re: IPC, shared memory, syncronization AND threads...

2000-08-16 Thread Peter Dufault
way to ensure they are in a shared region without sharing pages happening to contain mutexes with that attribute of the new process space with the old one. Assuming unique mutexes after a fork unless they happen to be in a shared region, you could create a mutex in shared memory, apply pthread_mut

Re: IPC, shared memory, syncronization AND threads...

2000-08-16 Thread Peter Jeremy
On Tue, 15 Aug 2000 10:30:25 -0600 (MDT), Ronald G Minnich <[EMAIL PROTECTED]> wrote: >The idea is simple: tset is the fastest, but you only want to spin so >long. Then you want to drop into the kernel, and wait for someone to wake >you up. Agreed. >Here's a simple test-and-set function for the

Re: IPC, shared memory, syncronization AND threads...

2000-08-15 Thread Lithix
|> you can have a Linda-like pool of work requests to |hand out to a swarm of | worker bees. | ^^^ | Could you please decode this for me? :) This page talks about Linda, check out the "Linda Basics" section and read about tuples. http://www.sca.com/ltutorial.html

Re: IPC, shared memory, syncronization AND threads...

2000-08-15 Thread Gary T. Corcoran
Peter Dufault wrote: > you can have a Linda-like pool of work requests to hand out to a swarm of worker >bees. ^^^ Could you please decode this for me? :) Thanks, Gary To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the bod

Re: IPC, shared memory, syncronization AND threads...

2000-08-15 Thread Peter Dufault
> On Tue, 15 Aug 2000, Jonas Bulow wrote: > > > After doing some more thinking about the cmpxchgl-lock, it's quite hard > > to use it together with a technique involving the kernel. > > well, no I don't think it is. I used to use it a lot, see my earlier post > from today. One point to keep i

Re: IPC, shared memory, syncronization AND threads...

2000-08-15 Thread Ronald G Minnich
On Tue, 15 Aug 2000, Jonas Bulow wrote: > After doing some more thinking about the cmpxchgl-lock, it's quite hard > to use it together with a technique involving the kernel. well, no I don't think it is. I used to use it a lot, see my earlier post from today. ron To Unsubscribe: send mail

Re: IPC, shared memory, syncronization AND threads...

2000-08-15 Thread Jonas Bulow
John Polstra wrote: > > In article <[EMAIL PROTECTED]>, Jonas Bulow > <[EMAIL PROTECTED]> wrote: > > John Polstra wrote: > Actually I thought about this some more, and I'm not all that sure > it's possible. I haven't actually _tried_ it, but I think you'd end > up needing a low-level mutex aroun

Re: IPC, shared memory, syncronization AND threads...

2000-08-15 Thread Ronald G Minnich
OK, here's a note from long ago, when this came up before. Dated: Tue Jul 2 10:48:16 1996 The idea is simple: tset is the fastest, but you only want to spin so long. Then you want to drop into the kernel, and wait for someone to wake you up. This thing was quite fast on freebsd, even four year

Re: IPC, shared memory, syncronization AND threads...

2000-08-15 Thread John Polstra
In article <[EMAIL PROTECTED]>, Jonas Bulow <[EMAIL PROTECTED]> wrote: > John Polstra wrote: > > > I think the ideal solution would first try to lock the > > test-and-set lock, maybe spinning on it just a few times. If that > > failed it would fall back to using a system-call lock such as > > flo

Re: IPC, shared memory, syncronization AND threads...

2000-08-14 Thread Jonas Bulow
John Polstra wrote: > Jonas Bulow wrote > > Maybe I havn't been thinking enough but wouldn't this lock mechanism > > be a good choice to use for mmaped:memory accessed by multiple > > processes? > > It depends on the amount of contention you expect. The code in > lockdflt.c was designed for a ve

Re: IPC, shared memory, syncronization

2000-08-13 Thread Jonas Bulow
Wes Peters wrote: > > Jonas Bulow wrote: > > > > Ronald G Minnich wrote: > > > > > > I don't know about the "bsd" or whatever way. If you're doing real > > > parallel programming and want real performance, you'll use a test-and-set > > > like function that uses the low-level machine instructions

Re: IPC, shared memory, syncronization

2000-08-12 Thread Nate Williams
> > > I don't know about the "bsd" or whatever way. If you're doing real > > > parallel programming and want real performance, you'll use a test-and-set > > > like function that uses the low-level machine instructions for same. > > > > That is exacly what I'm looking for! I found it to be overkil

Re: IPC, shared memory, syncronization

2000-08-12 Thread Wes Peters
Jonas Bulow wrote: > > Ronald G Minnich wrote: > > > > I don't know about the "bsd" or whatever way. If you're doing real > > parallel programming and want real performance, you'll use a test-and-set > > like function that uses the low-level machine instructions for same. > > That is exacly what

Re: IPC, shared memory, syncronization

2000-08-12 Thread Brian Fundakowski Feldman
On Sat, 12 Aug 2000, Jonas Bulow wrote: > John Polstra wrote: > > If you want the "BSD way" you should probably create a 0-length > > temporary file somewhere and use the flock(2) system call on it. The > > file itself isn't important; it's just something to lock. > > I don't see any reason to

Re: IPC, shared memory, syncronization

2000-08-12 Thread John Polstra
In article <[EMAIL PROTECTED]>, Jonas Bulow <[EMAIL PROTECTED]> wrote: > John Polstra wrote: > > If you want the "BSD way" you should probably create a 0-length > > temporary file somewhere and use the flock(2) system call on it. The > > file itself isn't important; it's just something to lock.

Re: IPC, shared memory, syncronization

2000-08-12 Thread Jonas Bulow
John Polstra wrote: > If you want the "BSD way" you should probably create a 0-length > temporary file somewhere and use the flock(2) system call on it. The > file itself isn't important; it's just something to lock. I don't see any reason to do system calls just because I want to do an atomic o

Re: IPC, shared memory, syncronization

2000-08-12 Thread Jonas Bulow
Ronald G Minnich wrote: > On Fri, 11 Aug 2000, John Polstra wrote: > > In article <[EMAIL PROTECTED]>, > > Jonas Bulow <[EMAIL PROTECTED]> wrote: > > > Jonas Bulow wrote: > > > > > > > > What is the "BSD-way" of access to shar

Re: IPC, shared memory, syncronization

2000-08-11 Thread Ronald G Minnich
On Fri, 11 Aug 2000, John Polstra wrote: > In article <[EMAIL PROTECTED]>, > Jonas Bulow <[EMAIL PROTECTED]> wrote: > > Jonas Bulow wrote: > > > > > > What is the "BSD-way" of access to shared memory (mmap:ed) secure (avoid > > > ra

Re: IPC, shared memory, syncronization

2000-08-11 Thread John Polstra
In article <[EMAIL PROTECTED]>, Jonas Bulow <[EMAIL PROTECTED]> wrote: > Jonas Bulow wrote: > > > > What is the "BSD-way" of access to shared memory (mmap:ed) secure (avoid > > race conditions, etc)? Right now I'm using posix semaphores but I woul

Re: IPC, shared memory, syncronization

2000-08-11 Thread Jonas Bulow
Jonas Bulow wrote: > > What is the "BSD-way" of access to shared memory (mmap:ed) secure (avoid > race conditions, etc)? Right now I'm using posix semaphores but I would > like to know if there is a substitute like the way kqueue is for > select/poll. Hmm, I thi

IPC, shared memory, syncronization

2000-08-11 Thread Jonas Bulow
What is the "BSD-way" of access to shared memory (mmap:ed) secure (avoid race conditions, etc)? Right now I'm using posix semaphores but I would like to know if there is a substitute like the way kqueue is for select/poll. To Unsubscribe: send mail to [EMAIL PROTECTED] with "

Programming problem, Shared Memory

2000-06-14 Thread Shawn Workman
Please help me with the simple 'Shared Memory' example.. I cant use fork, many different applications may speaking to one 'server' application.. This small function can run as the memory server (pass bogus parameters) and as a client in another terminal (dont pass any pa

Re: mprotect(2) won't make shared memory read-only

2000-02-28 Thread Brooks Davis
On Mon, Feb 28, 2000 at 12:50:13PM -0800, Brooks Davis wrote: > On a -current system as of a week or two ago (as well as a 3.3-RC and a > 2.2.8-STABLE box) I've found that mprotect fails with with EACCES when > trying to make a shared memory segment that was created user read/wri

RE: mprotect(2) won't make shared memory read-only

2000-02-28 Thread Charles Randall
The mprotect manual page on Digital Unix specifies that it conforms to the XPG4-UNIX standard. Charles To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message

Re: mprotect(2) won't make shared memory read-only

2000-02-28 Thread Brooks Davis
when > > trying to make a shared memory segment that was created user read/write > > read-only. It works find if I malloc the memory instead and making the > > shm segment write-only or inaccessible works fine as well. Is this > > expected behavior? If so it'

Re: mprotect(2) won't make shared memory read-only

2000-02-28 Thread Alfred Perlstein
* Brooks Davis <[EMAIL PROTECTED]> [000228 13:23] wrote: > On a -current system as of a week or two ago (as well as a 3.3-RC and a > 2.2.8-STABLE box) I've found that mprotect fails with with EACCES when > trying to make a shared memory segment that was created user read/wr

mprotect(2) won't make shared memory read-only

2000-02-28 Thread Brooks Davis
On a -current system as of a week or two ago (as well as a 3.3-RC and a 2.2.8-STABLE box) I've found that mprotect fails with with EACCES when trying to make a shared memory segment that was created user read/write read-only. It works find if I malloc the memory instead and making th

Recent NFS commits, plus Heads up to 2.2.x users Hello everyone. There have been a number of recent NFS commits to fix bugs. Everything is hunky dory, but I do not have a 2.2.x box to test the MFC to 2.2.x so this is a head's up to 2.2.x users who are using NFS that these (relatively simple) bug fixes have been MFC'd, but not tested. It would be nice if I could get confirmation that 2.2.x hasn't blow up :-) -Matt Matthew Dillon dillon 1999/12/11 19:19:33 PST Modified files: sys/kern vfs_subr.c vfs_syscalls.c sys/vm vm_fault.c vm_map.c vm_map.h vm_mmap.c vm_object.c vm_object.h vm_page.c vm_page.h sys/sys mman.h lib/libc/sys madvise.2 mmap.2 Log: Add MAP_NOSYNC feature to mmap(), and MADV_NOSYNC and MADV_AUTOSYNC to madvise(). This feature prevents the update daemon from gratuitously flushing dirty pages associated with a mapped file-backed region of memory. The system pager will still page the memory as necessary and the VM system will still be fully coherent with the filesystem. Modifications made by other means to the same area of memory, for example by write(), are unaffected. The feature works on a page-granularity basis. MAP_NOSYNC allows one to use mmap() to share memory between processes without incuring any significant filesystem overhead, putting it in the same performance category as SysV Shared memory and anonymous memory. Reviewed by: julian, alc, dg Revision Changes Path 1.239 +2 -2 src/sys/kern/vfs_subr.c 1.147 +3 -2 src/sys/kern/vfs_syscalls.c 1.108 +17 -3 src/sys/vm/vm_fault.c 1.184 +16 -3 src/sys/vm/vm_map.c 1.52 +3 -2 src/sys/vm/vm_map.h 1.105 +5 -4 src/sys/vm/vm_mmap.c 1.171 +32 -5 src/sys/vm/vm_object.c 1.62 +4 -3 src/sys/vm/vm_object.h 1.147 +8 -4 src/sys/vm/vm_page.c 1.74 +5 -5 src/sys/vm/vm_page.h 1.27 +4 -1 src/sys/sys/mman.h 1.16 +28 -1 src/lib/libc/sys/madvise.2 1.18 +30 -1 src/lib/libc/sys/mmap.2dillon 1999/12/11 19:28:15 PST Modified files: sys/kern vfs_syscalls.c Log: Remove accidental pollution unrelated to previous commit. The issue here is real but has not yet been discussed with Eivind. Revision Changes Path 1.148 +2 -3 src/sys/kern/vfs_syscalls.cdillon 1999/12/11 22:09:58 PST Modified files: sys/nfs nfs_bio.c nfs_subs.c nfs_vnops.c sys/sys buf.h Log: Synopsis of problem being fixed: Dan Nelson originally reported that blocks of zeros could wind up in a file written to over NFS by a client. The problem only occurs a few times per several gigabytes of data. This problem turned out to be bug #3 below. bug #1: B_CLUSTEROK must be cleared when an NFS buffer is reverted from stage 2 (ready for commit rpc) to stage 1 (ready for write). Reversions can occur when a dirty NFS buffer is redirtied with new data. Otherwise the VFS/BIO system may end up thinking that a stage 1 NFS buffer is clusterable. Stage 1 NFS buffers are not clusterable. bug #2: B_CLUSTEROK was inappropriately set for a 'short' NFS buffer (short buffers only occur near the EOF of the file). Change to only set when the buffer is a full biosize (usually 8K). This bug has no effect but should be fixed in -current anyway. It need not be backported. bug #3: B_NEEDCOMMIT was inappropriately set in nfs_flush() (which is typically only called by the update daemon). nfs_flush() does a multi-pass loop but due to the lack of vnode locking it is possible for new buffers to be added to the dirtyblkhd list while a flush operation is going on. This may result in nfs_flush() setting B_NEEDCOMMIT on a buffer which has *NOT* yet gone through its stage 1 write, causing only the commit rpc to be made and thus causing the contents of the buffer to be thrown away (never sent to the server). The patch also contains some cleanup, which only applies to the commit into -current. Reviewed by: dg, julian Originally Reported by: Dan Nelson Revision Changes Path 1.81 +27 -11 src/sys/nfs/nfs_bio.c 1.86 +15 -7 src/sys/nfs/nfs_subs.c 1.148 +3 -27 src/sys/nfs/nfs_vnops.c 1.85 +8 -1 src/sys/sys/buf.hdillon 1999/12/11 22:52:35 PST Modified files: (Branch: RELENG_3) sys/nfs nfs_bio.c nfs_subs.c nfs_vnops.c Log: MFC nfs_bio.c 1.81, nfs_subs.c 1.86, nfs_vnops.c 1.148. Fixed two rare-occuring bugs in NFS. First, B_CLUSTEROK must be cleared when B_NEEDCOMMIT is cleared since uncommitted dirty buffers may not be clustered. Second, B_NEEDCOMMIT cannot be gratuitously set in nfs_flush(). Due to lack of locking a buffer may be added to the dirtyblkhd list during the flush and setting B_NEEDCOMMIT can result in the buffer's data being thrown away rather then written to the server. Reviewed by: dg Approved by: jkh Revision Changes Path 1.65.2.3 +4 -4 src/sys/nfs/nfs_bio.c 1.70.2.4 +2 -2 src/sys/nfs/nfs_subs.c 1.116.2.8 +4 -4 src/sys/nfs/nfs_vnops.cdillon 1999/12/11 23:06:40 PST Modified files: sys/nfs nfs_nqlease.c nfs_serv.c nfs_subs.c Log: Fix a number of server-side issues related to aborting badly formed NFS packets, mainly initializing structure pointers to NULL which are conditionally freed prior to return. PR: kern/15249 Submitted by: Ian Dowse Revision Changes Path 1.47 +4 -2 src/sys/nfs/nfs_nqlease.c 1.89 +5 -5 src/sys/nfs/nfs_serv.c 1.87 +4 -1 src/sys/nfs/nfs_subs.cdillon 1999/12/11 23:16:21 PST Modified files: (Branch: RELENG_3) sys/nfs nfs_nqlease.c nfs_serv.c nfs_subs.c Log: MFC nfs_nqlease 1.47, nfs_serv.c 1.89, nfs_subs.c 1.87. Prevent panics in server side abort code when dealing with malformed NFS packets. Approved by: jkh Revision Changes Path 1.39.2.3 +4 -2 src/sys/nfs/nfs_nqlease.c 1.72.2.6 +5 -5 src/sys/nfs/nfs_serv.c 1.70.2.5 +4 -1 src/sys/nfs/nfs_subs.cdillon 1999/12/11 23:25:12 PST Modified files: (Branch: RELENG_2_2) sys/nfs nfs_nqlease.c nfs_subs.c Log: MFC nfs_nqlease 1.47, nfs_serv.c 1.89, nfs_subs.c 1.87. Note that no changes to nfs_serv.c were required, the bugs in that routine were introduced after 2.2.x. Revision Changes Path 1.20.2.2 +4 -2 src/sys/nfs/nfs_nqlease.c 1.33.2.4 +3 -1 src/sys/nfs/nfs_subs.cdillon 1999/12/11 23:28:52 PST Modified files: (Branch: RELENG_2_2) sys/nfs nfs_bio.c nfs_subs.c nfs_vnops.c Log: MFC nfs_bio.c 1.81, nfs_subs.c 1.86, nfs_vnops.c 1.148 Revision Changes Path 1.28.2.11 +3 -3 src/sys/nfs/nfs_bio.c 1.33.2.5 +2 -2 src/sys/nfs/nfs_subs.c 1.36.2.12 +4 -4 src/sys/nfs/nfs_vnops.c

1999-12-11 Thread Matthew Dillon
To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message

Re: shared memory crash

1999-08-16 Thread Ronald G. Minnich
don't use shmget if you can. Use mmap'ed files. The SYSV shm interface is incredibly dumb. ron To Unsubscribe: send mail to majord...@freebsd.org with "unsubscribe freebsd-hackers" in the body of the message

Re: shared memory crash

1999-08-16 Thread Ronald G. Minnich
don't use shmget if you can. Use mmap'ed files. The SYSV shm interface is incredibly dumb. ron To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message

Re: shared memory crash

1999-08-14 Thread Matthew Dillon
:I've been learning to program using shared memory and messages. As I write :and debug, I often have to crash a running process which stalls. Of :course, there is a problem with my code but that's all part of the :learning process. The actual problem is that, after a few ctrl-c'

shared memory crash

1999-08-14 Thread Marc Tardif
I've been learning to program using shared memory and messages. As I write and debug, I often have to crash a running process which stalls. Of course, there is a problem with my code but that's all part of the learning process. The actual problem is that, after a few ctrl-c's, the

Re: shared memory crash

1999-08-14 Thread Matthew Dillon
:I've been learning to program using shared memory and messages. As I write :and debug, I often have to crash a running process which stalls. Of :course, there is a problem with my code but that's all part of the :learning process. The actual problem is that, after a few ctrl-c'

shared memory crash

1999-08-14 Thread Marc Tardif
I've been learning to program using shared memory and messages. As I write and debug, I often have to crash a running process which stalls. Of course, there is a problem with my code but that's all part of the learning process. The actual problem is that, after a few ctrl-c's, the