write_cache_pages man page on Scientific

Man page or keyword search:  
man Server   26626 pages
apropos Keyword Search (all sections)
Output format
Scientific logo
[printable version]

WRITE_CACHE_PAGES(9)	  Memory Management in Linux	  WRITE_CACHE_PAGES(9)

NAME
       write_cache_pages - walk the list of dirty pages of the given address
       space and write all of them.

SYNOPSIS
       int write_cache_pages(struct address_space * mapping,
			     struct writeback_control * wbc,
			     writepage_t writepage, void * data);

ARGUMENTS
       mapping
	   address space structure to write

       wbc
	   subtract the number of written pages from *wbc->nr_to_write

       writepage
	   function called for each page

       data
	   data passed to writepage function

DESCRIPTION
       If a page is already under I/O, write_cache_pages skips it, even if
       it´s dirty. This is desirable behaviour for memory-cleaning writeback,
       but it is INCORRECT for data-integrity system calls such as fsync.
       fsync and msync need to guarantee that all the data which was dirty at
       the time the call was made get new I/O started against them. If
       wbc->sync_mode is WB_SYNC_ALL then we were called for data integrity
       and we must wait for existing IO to complete.

       To avoid livelocks (when other process dirties new pages), we first tag
       pages which should be written back with TOWRITE tag and only then start
       writing them. For data-integrity sync we have to be careful so that we
       do not miss some pages (e.g., because some other process has cleared
       TOWRITE tag we set). The rule we follow is that TOWRITE tag can be
       cleared only by the process clearing the DIRTY tag (and submitting the
       page for IO).

COPYRIGHT
Kernel Hackers Manual 2.6.	 November 2013		  WRITE_CACHE_PAGES(9)
[top]

List of man pages available for Scientific

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net