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

From: Paolo Bonzini
Date: Thu Jun 14 2012 - 05:02:04 EST


Il 13/06/2012 23:29, Andrew Morton ha scritto:
> > If the application does not want to start I/O, it can simply call msync
> > with flags equal to MS_INVALIDATE. This one remains a no-op, as it should
> > be on a reasonable implementation.
>
> Means that people will find that their msync(MS_ASYNC) call will newly
> start IO. This may well be undesirable for some.

If they knew it was a no-op, and relying on it, they might as well not
have called it at all and save a syscall.

> Also, it hardwires into the kernel behaviour which userspace itself
> could have initiated, with sync_file_range(). ie: reduced flexibility.

No, it hardwires into the kernel behaviour which is mentioned in the
spec. Strictly speaking it is correct that an asynchronous operation
is never done (the two are indistinguishable), but still this patch
improves the fidelity to the specification and in a portable manner.

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/