tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: vectorized fsyncv(2) syscall -- useful?

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.  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)

BS> More to the point, what app needs this to perform well?

Specific existing app?  I don't know.  Any app that writes to a large
number of file descriptors, then needs to ensure that all are flushed to
backing store.  Or any app that needs to sync a large quantity of
non-contiguous blocks, yet not the entire file.

I'm in the early stages of some filesystem-related experimentation.  One
of the areas of interest is a "get it consistent" mechanism a la VSS on

I was thinking along the lines of a kqueue(2)-based "here comes the
snapshot!" notification.  A process -- e.g. DBMS -- would get all open
files to a clean/consistent state, then sync [the relevant parts of]
said files.

It seemed logical to hoist the syscall so it's outside the for() loop.

Everquick Internet -
A division of Brotsman & Dreger, Inc. -
Bandwidth, consulting, e-commerce, hosting, and network building
Phone: +1 785 865 5885 Lawrence and [inter]national
Phone: +1 316 794 8922 Wichita
DO NOT send mail to the following addresses: -*- -*-
Sending mail to spambait addresses is a great way to get blocked.
Ditto for broken OOO autoresponders and foolish AV software backscatter.

Home | Main Index | Thread Index | Old Index