Skip to contentSkip to conversation

add swap cache mapping comment

PATCH In review [email protected] 1 participant 1 message Aug 12, 2005

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 3/39 add swap cache mapping comment

From: Paolo 'Blaisorblade' Giarrusso <[email protected]>

Add some more comments about page->mapping and swapper_space, explaining their (historical and current) relationship. Such material can be extracted from the old GIT history (which I used for reference), but having it in the source is more useful.

---

 linux-2.6.git-paolo/./mm/swap_state.c |    5 +++++
 1 files changed, 5 insertions(+)
./mm/swap_state.c renamed from ./mm/swap_state.c~swap-cache-mapping-comment +5 -0
diff -puN ./mm/swap_state.c~swap-cache-mapping-comment ./mm/swap_state.c
@@ -21,6 +21,11 @@
  * swapper_space is a fiction, retained to simplify the path through
  * vmscan's shrink_list, to make sync_page look nicer, and to allow
  * future use of radix_tree tags in the swap cache.
+ *
+ * In 2.4 and until 2.6.6 pages in the swap cache also had page->mapping ==
+ * &swapper_space (this was the definition of PageSwapCache), but this is no
+ * more true. Instead, we use page->flags for that, and page->mapping is
+ * *ignored* here. However, also take a look at page_mapping().
  */
 static struct address_space_operations swap_aops = {
 	.writepage	= swap_writepage,

_

-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
User-mode-linux-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel