Re: Read/Write call interaction w/ UBC
site_archiver@lists.apple.com Delivered-To: darwin-kernel@lists.apple.com On Jul 11, 2008, at 3:56 PM, shailesh jain wrote: It's not clear what you mean by "flushing mmaped pages". = Mike _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-kernel mailing list (Darwin-kernel@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-kernel/site_archiver%40lists.a... 1) If the user mmap's a file and makes some changes to it and then calls read() system call (without msync'ing), is it the responsibility of a filesystem to flush the changes that could have been made by mmap system call before actually reading the file ? No. The Darwin VM and buffer cache are fully coherent. The read(2) call may race with another thread that is currently updating the mapped region, however. 2) Also, while referring to source for smbfs, I came across a comment that said " we shall maintain synchronization between mmap and read/write by using UPL". Isn't just flushing mmaped pages enough ? The smbfs code uses the UPL as its co-ordination with the VM; by passing file I/O through the buffer writes update the VM. This email sent to site_archiver@lists.apple.com
participants (1)
-
Michael Smith