R: JanHi,There is sync for AIO pages also. There is no dirty page table but naturally dirty pages are marked and they are on LRU list see buf/buf0lru.cc.On Thu, May 7, 2015 at 12:23 AM, Xiaofei Du <xiaofei.du008@gmail.com> wrote:Hi Jan,Thanks for clarification. I should have used synchronous write, instead of synchronous flush. My point is that I noticed for sync writes, fsync is called to force pages to be on persistent storage. while for AIO pages, fsync is not called to force pages to be on persistent storage. My question here is why fsync is required for sync IOs. Does InnoDB maintain a dirty page table? Is fsync called to guarantee the page to be on persistent storage so that the dirty page table can be updated? If this is the case, when is the dirty page table updated for asynchronous IOs?P.S. I couldn't find code for dirty page table. So I am not sure if InnoDB maintains a dirty page table for recovery. Could you please give me a pointer to related code and related resources? Thanks.XiaofeiOn Wed, May 6, 2015 at 10:12 AM, Jan Lindström <jan.lindstrom@mariadb.com> wrote:R: JanHi,Terminology is little bit confusing here. Page flushing means that we have done synchronous write to disk but that does not mean that write is physically on device yet, therefore there is flush to force it to persistent storage.On Wed, May 6, 2015 at 12:57 AM, Xiaofei Du <xiaofei.du008@gmail.com> wrote:_______________________________________________Hello,When a dirty page is flushed synchronously in buf_flush_write_block_low,fsync is called in the following snippet. I am wondering whywe need this fsync for synchronous flush? The record should be inthe log already, so recovery should be able to successfully redo itand apply to the disk during recovery. Maybe I am missing something here,please let me know if I am wrong. Thanks much!Xiaofei/* When doing single page flushing the IO is done synchronously and we flush the changes to disk only for the tablespace we are working on. */ if (sync) { ut_ad(flush_type == BUF_FLUSH_SINGLE_PAGE); fil_flush(buf_page_get_space(bpage)); /* true means we want to evict this page from the LRU list as well. */ buf_page_io_complete(bpage, true); }
Mailing list: https://launchpad.net/~maria-discuss
Post to : maria-discuss@lists.launchpad.net
Unsubscribe : https://launchpad.net/~maria-discuss
More help : https://help.launchpad.net/ListHelp