|
From: Blas R. S. <bl...@pu...> - 2003-02-01 15:58:47
|
Hello At 01/02/2003 17:16 +0300, Dmitry Yemanov wrote: >Blas, > >> Perhaps we are talking about different thinks. I understand >> that synchronous io means that the writing method does not >> return until the data is send to the disk device, whether in >> asynchronous mode the write method returns as soon as the OS >> take the information, usually to put in some kind of cache. > >I was talking about async operations from the server's POV, i.e. when API >routines return immediately after putting the I/O request to the OS queue >(i.e. deferred I/O). After that the server should wait for event to be sure >the data is written somewhere. This is supported only in SS_V2. You were >talking about system level synchronization, when the data are either on disk >or somewhere in the way. This is obviously related to all this "forced >writes" talk. Yep, a bit different things. OK. But it seems SUPERSERVER_V2 needs low level synchronous io operations to work. I make a comparison between winnt.cpp and unix.cpp and I found some relations between low level syncronization and SUPERSERVER_V2 switch. For instance, PIO_force_write in unix.cpp works only if not SUPERSERVER_V2 and in winnt.cpp works always. The comment in unix.cpp say that SUPERSERVER_V2 works always in synchronous mode so "forced_writes" is a no-op. What happen in winnt?. As you can see forced writes and SUPERSERVER_V2 are related in the code, although perhaps it can be isolated in the theory. I think winnt.cpp and unix.cpp code must be synchronized :-) the two sources don't need to be so different. I think things will easier if windows and *nix works in the same or similar way. Regards Blas Rodriguez Somoza |