Re: O_DIRECT support for Windows
От | Magnus Hagander |
---|---|
Тема | Re: O_DIRECT support for Windows |
Дата | |
Msg-id | 20070115091630.GA27530@svr2.hagander.net обсуждение исходный текст |
Ответ на | O_DIRECT support for Windows (ITAGAKI Takahiro <itagaki.takahiro@oss.ntt.co.jp>) |
Ответы |
Re: O_DIRECT support for Windows
|
Список | pgsql-patches |
On Mon, Jan 15, 2007 at 05:36:09PM +0900, ITAGAKI Takahiro wrote: > The attached is a patch to define O_DIRECT by ourselves on Windows, > and to map O_DIRECT to FILE_FLAG_NO_BUFFERING. > > There will be a consistency in our support between Windows and other OSes > that have O_DIRECT. Also, there is the following comment that says, I read, > we should do so. > | handle other flags? (eg FILE_FLAG_NO_BUFFERING/FILE_FLAG_WRITE_THROUGH) > > Is this worth doing? Do we need more performance reports for the change? IIRC we've discussed this before at some point, and I think we came to the conclusion that we shouldn't do it. However, things may have changed :-) FILE_FLAG_NO_BUFFERING requires that *all* I/O follows: * File access must begin at offsets that are integer multples of the volume sector size. * File access must be for number of bytes that are integer multiples of the volume sector size. * Buffer addresses for read and write operations must be sector aligned. I was under the impression that our code can in no way guarantee this. Especially given that a typical NTFS drive can have anything from 512 to 4096 bytes if you use the GUI to format it, and larger sizes than that when you use some SAN tools to do it. (btw, we already map O_DSYNC to FILE_FLAG_WRITE_THROUGH) //Magnus
В списке pgsql-patches по дате отправления: