lkml.org 
[lkml]   [2002]   [Mar]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subjectaa-150-read_write_tweaks


- Don't do flush_page_to_ram() on the page fault-in path. That's
handled in mm/memory.c, and filemap.c doesn't need to do it.

- In generic_file_write(), only set the page's Referenced bit once,
when the write touches the start of the page. This is a
microoptimisation. Seemingly a buggy one too - lseek exists...


=====================================

--- 2.4.19-pre3/mm/filemap.c~aa-150-read_write_tweaks Tue Mar 19 19:49:02 2002
+++ 2.4.19-pre3-akpm/mm/filemap.c Tue Mar 19 19:49:02 2002
@@ -1968,7 +1968,6 @@ success:
* and possibly copy it over to another page..
*/
mark_page_accessed(page);
- flush_page_to_ram(page);
return page;

no_cached_page:
@@ -3089,8 +3088,15 @@ generic_file_write(struct file *file,con
}
unlock:
kunmap(page);
+
+ /*
+ * Mark the page accessed if we wrote the
+ * beginning or we just did an lseek.
+ */
+ if (!offset || !file->f_reada)
+ SetPageReferenced(page);
+
/* Mark it unlocked again and drop the page.. */
- SetPageReferenced(page);
UnlockPage(page);
page_cache_release(page);


-
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:22    [W:0.056 / U:36.964 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site