Re: [PATCH 2/2] msync: start async writeout when MS_ASYNC

From: Paolo Bonzini
Date: Thu Jun 14 2012 - 08:24:50 EST


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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/