Re: Can O_SYNC be implemented by using fsync?

From: Jeff V. Merkey (jmerkey@timpanogas.com)
Date: Mon May 15 2000 - 19:57:57 EST


Andi,

Van and I worked together for several years on Oracle for NetWare (I
guess this part was obvious). He is getting together some info for us
on what would be the most ideal. A block oriented version of fsync() is
probably the way to go the get Oracle the highest numbers possible on
Linux rather then force a flush of every dirty block for a file each
time an Oracle data table is written to.

We should probably add (int block, int blocks) to fsync() to give
callers the ability to selectively push blocks out of cache. IMHO.

Jeff

Andi Kleen wrote:
>
> "Jeff V. Merkey" <jmerkey@timpanogas.com> writes:
> >
> > So what's wrong with calling fsync() after write() then for Oracle --
> > this should work -- yes?
>
> I would expect O_SYNC to be a bit faster than fsync: fsync has to figure
> out what to flush, in O_SYNC it is implicit and already known.
>
> At least in ext2 fsync is relatively costly CPU wise [there were real
> error reports about that in the past], while O_SYNC is much cheaper.
>
> This is now especially true because O_SYNC in 2.3 does not actually
> flush. This of course needs to be changed.
>
> -Andi

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Mon May 15 2000 - 21:00:27 EST