Re: O_DIRECT in freebsd - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: O_DIRECT in freebsd
Date
Msg-id 200306230245.h5N2j6215483@candle.pha.pa.us
Whole thread Raw
In response to Re: O_DIRECT in freebsd  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: O_DIRECT in freebsd  (Sean Chittenden <sean@chittenden.org>)
List pgsql-hackers
Tom Lane wrote:
> Bruce Momjian <pgman@candle.pha.pa.us> writes:
> > _That_ is an excellent point.  However, do we know at the time we open
> > the file descriptor if we will be doing this?
> 
> We'd have to say on a per-read basis whether we want O_DIRECT or not,
> and fd.c would need to provide a suitable file descriptor.

OK

> > What about cache
> > coherency problems with other backends not opening with O_DIRECT?
> 
> If O_DIRECT introduces cache coherency problems against other processes
> not using O_DIRECT then the whole idea is a nonstarter, but I can't
> imagine any kernel hackers would have been stupid enough to allow that
> to happen ...

Seeing how the buffer exists in user space, I would be interested how
they prevent coherency problems with good performance --- maybe they map
the same page into multiple processes --- that would be interesting,
though it would require some locking.

--  Bruce Momjian                        |  http://candle.pha.pa.us pgman@candle.pha.pa.us               |  (610)
359-1001+  If your life is a hard drive,     |  13 Roberts Road +  Christ can be your backup.        |  Newtown Square,
Pennsylvania19073
 


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: O_DIRECT in freebsd
Next
From: Sean Chittenden
Date:
Subject: Re: O_DIRECT in freebsd