[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: vectorized fsyncv(2) syscall -- useful?
On Sat, Oct 10, 2009 at 10:42:06AM +0000, Edward B. DREGER wrote:
> BS> Date: Fri, 9 Oct 2009 23:13:20 -0700
> BS> From: Bill Stouder-Studenmund
> BS> Why? What is wrong with just calling fsync or fsync_range()?
> A context switch per syscall.
There is unlikely to be a full context switch. Provided the process
isn't pre-empted syscalls are relatively cheap (except on ARM).
> One could ask the same about read(2) and
> write(2) versus readv(2) and writev(2)... although I suspect that far
> more intra-file scatter-gather I/O is done than batch fsync(2)
One purpose of these calls is that they are atomic (or, at least, as
atomic a single read/write) - this can be important.
There is no reason to complicate the syscall interface any further!
I'd guess that any apparant gains are overwhelmed by the additional
David Laight: david%l8s.co.uk@localhost
Main Index |
Thread Index |