syncing large mmaped files

Nikolay Denev ndenev at gmail.com
Thu Oct 18 07:55:55 UTC 2012


On Oct 18, 2012, at 3:08 AM, Tristan Verniquet <tris_vern at hotmail.com> wrote:

> 
> I want to work with large (1-10G) files in memory but eventually sync them back out to disk. The problem is that the sync process appears to lock the file in kernel for the duration of the sync, which can run into minutes. This prevents other processes from reading from the file (unless they already have it mapped) for this whole time. Is there any way to prevent this? I think I read in a post somewhere about openbsd implementing partial-writes when it hits a file with lots of dirty pages in order to prevent this. Is there anything available for FreeBSD or is there another way around it?
> 
> Sorry if this is the wrong mailing list.
> 		 	   		  
> _______________________________________________
> freebsd-hackers at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
> To unsubscribe, send any mail to "freebsd-hackers-unsubscribe at freebsd.org"

Isn't msync(2) what you are looking for?


More information about the freebsd-hackers mailing list