I have been studying this for the last several days, and the one thing that leaps out at me is that the page cache always flushes one page at a time.  Always.<br><br>To some extent, there is justification for this - what has to happen for each page that gets flushed depends in part on what file system is being written to and whether or not there is a function for that file system to handle the pages.
<br><br>However, as far as I can tell, if the mapping data for a page does not exist (mapping->a_ops->writepage == NULL), it is handed to mpage_writepage() for buffer management and i/o submission, whereas almost all of the file systems that do map this function map it to block_write_full_page.  These two functions use completely different algorithms for flushing a page from the cache, or at least it sure looks that way.  (This figures, because if the file system didn't buffer the pages, the kernel has to do it, whereas if the file system did, the flush is much simpler.)  (The only ones that don't use block_write_full_page are reiserfs, which does some interesting things with small files, and the networked file systems, which don't write to a disk file per se.)
<br><br>My question is, is it feasible to tweak these functions so that it becomes possible to flush multiple pages at one time (with one function), or is that too large/complex a change to be worth the effort (which would be considerable)?
<br><br>This might be OT since it is a kernel question, but what the heck....  :-)<br><br>Thanks.<br><br>Mark Hull-Richter, Linux Kernel Engineer<br>DATAllegro (<a href="http://www.datallegro.com">www.datallegro.com</a>)<br>
85 Enterprise, Second Floor, Aliso Viejo, CA  92656<br>949-680-3082 - Office     949-330-7691 - fax<br><br>