home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!auspex-gw!mohan
- From: mohan@Auspex.COM (Mohan Srinivasan)
- Newsgroups: comp.unix.wizards
- Subject: Re: SUN NFS sync
- Keywords: sync
- Message-ID: <15402@auspex-gw.auspex.com>
- Date: 9 Nov 92 18:43:17 GMT
- References: <bharat.720655786@Xenon.Stanford.EDU> <1d1vksINN3d@playroom.rochester.East.Sun.COM> <15358@auspex-gw.auspex.com> <1992Nov6.223031.13503@netcom.com>
- Sender: news@auspex-gw.auspex.com
- Organization: Auspex Systems, Santa Clara
- Lines: 36
- Nntp-Posting-Host: osiris.auspex.com
-
- In article <1992Nov6.223031.13503@netcom.com> netapp@netcom.com (Network Appliance) writes:
- >In article <15358@auspex-gw.auspex.com> guy@Auspex.COM (Guy Harris) writes:
- >>Umm, I don't think it was even the case in 3.x - or 2.x, for that matter
- >>- that NFS writes were synchronous on the client side.
- >
- >Last time I checked, NFS writes were handled very differently in the
- >SunOS client code as compared with the client code that Sun distributes
- >to other UNIX vendors who buy NFS from Sun.
- >
- >In SunOS, the write(2) system call just dirties buffers in memory, and
- >expects biod's to do the writes when they are able. In the
- >distributed NFS, the write(2) system call tries to schedule a biod to
- >immediately send the write, and if no biod is available, then the
- >process doing the write(2) does the send itself.
- >
-
- Actually, even in SunOS (both 4.X and 5.X), if the write rounds up to a
- 8K chunk, the write is scheduled to the biod's immediately (ie. if there is
- a biod available, the write'ing process hands over the write to it.
- Otherwise, if there's no free biod available, the write is done
- by the writing process itself - this is 4.x behavior, in 5.x an async
- write is always queued up to be picked up by the biod threads).
-
- Scheduling the write is done by the function in the segmap driver code
- that releases the mapped (segkmap) segment. It calls VOP_PUTPAGE() with
- the flags that were passed to itself. (So, it handles cases like ASYNC,
- INVAL, DONTNEED etc).
-
- However, you're right in that if the write is < 8k, then it just dirties
- the page(s).
-
- --
- ===============================================================================
- Ram Mohan Srinivasan
- mohan@auspex.com
- ===============================================================================
-