Messages in this thread | | | Date | Thu, 14 Jun 2012 14:24:51 +0200 | From | Paolo Bonzini <> | Subject | Re: [PATCH 2/2] msync: start async writeout when MS_ASYNC |
| |
Il 13/06/2012 23:29, Andrew Morton ha scritto: > Also, it hardwires into the kernel behaviour which userspace itself > could have initiated, with sync_file_range(). ie: reduced flexibility.
Actually sync_file_range calls filemap_fdatawrite_range with WB_SYNC_ALL, hence it does the writeout synchronously and can block for an extended period of time. Hence sync_file_range is more similar to MS_SYNC except without the metadata write.
Instead, this patch uses WB_SYNC_NONE, while still using tag-and-write to avoid livelock.
I'll wait a day or two to let others voice their opinions, and then send a fixed v2 with updated commit messages from this discussion.
Paolo
| |