mm: frontswap: config and doc files
Subsystems (4)
PATCH v8 4/4 mm: frontswap: config and doc files
From: Dan Magenheimer <[email protected]>
Subject: [PATCH V8 4/4] mm: frontswap: config and doc files
This fourth patch of four in the frontswap series adds configuration and documentation files.
mm/Makefile +1 -0
@@ -25,6 +25,7 @@ obj-$(CONFIG_HAVE_MEMBLOCK) += memblock. obj-$(CONFIG_BOUNCE) += bounce.o obj-$(CONFIG_SWAP) += page_io.o swap_state.o swapfile.o thrash.o +obj-$(CONFIG_FRONTSWAP) += frontswap.o obj-$(CONFIG_HAS_DMA) += dmapool.o obj-$(CONFIG_HUGETLBFS) += hugetlb.o obj-$(CONFIG_NUMA) += mempolicy.o
mm/Kconfig +17 -0
@@ -370,3 +370,20 @@ config CLEANCACHE in a negligible performance hit. If unsure, say Y to enable cleancache + +config FRONTSWAP + bool "Enable frontswap to cache swap pages if tmem is present" + depends on SWAP + default n + help + Frontswap is so named because it can be thought of as the opposite + of a "backing" store for a swap device. The data is stored into + "transcendent memory", memory that is not directly accessible or + addressable by the kernel and is of unknown and possibly + time-varying size. When space in transcendent memory is available, + a significant swap I/O reduction may be achieved. When none is + available, all frontswap calls are reduced to a single pointer- + compare-against-NULL resulting in a negligible performance hit + and swap data is stored as normal on the matching swap device. + + If unsure, say Y to enable frontswap.
Documentation/ABI/testing/sysfs-kernel-mm-frontswap +16 -0
@@ -0,0 +1,16 @@ +What: /sys/kernel/mm/frontswap/ +Date: August 2011 +Contact: Dan Magenheimer <[email protected]> +Description: + /sys/kernel/mm/frontswap/ contains a number of files which + record a count of various frontswap operations (sum across + all swap devices): + succ_puts + failed_puts + gets + flushes + In addition, reading the curr_pages file shows how many + pages are currently contained in frontswap and writing this + file with an integer performs a "partial swapoff", reducing + the number of frontswap pages to that integer if memory + constraints permit.
Documentation/vm/frontswap.txt +215 -0
215 lines not on this page · raw message
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Quoted 4 lines · Dan Magenheimer
mm/Kconfig +0
-0@@ -370,3 +370,20 @@ config CLEANCACHE in a negligible performance hit.
mm/Kconfig config CLEANCACHE · line 389
Quoted 10 lines
mm/Kconfig +7
-0If unsure, say Y to enable cleancache + +config FRONTSWAP + bool "Enable frontswap to cache swap pages if tmem is present" + depends on SWAP + default n + + If unsure, say Y to enable frontswap.
Am I the only guy who gets irked when the "default" doesn't match the "If unsure" suggestion? :) (and yes, I know we have guidelines for what the "default" should be...)
Quoted 17 lines
From: [email protected] [mailto:[email protected]]
Subject: Re: [PATCH V8 4/4] mm: frontswap: config and doc filesQuoted 11 lines · Dan Magenheimer
mm/Kconfig +5
-0@@ -370,3 +370,20 @@ config CLEANCACHE in a negligible performance hit. If unsure, say Y to enable cleancache + +config FRONTSWAP + bool "Enable frontswap to cache swap pages if tmem is present" + depends on SWAP + default n
Quoted 6 lines
mm/Kconfig config CLEANCACHE · line 379
Quoted 2 lines
mm/Kconfig +2
-0+ + If unsure, say Y to enable frontswap.Am I the only guy who gets irked when the "default" doesn't match the "If unsure" suggestion? :) (and yes, I know we have guidelines for what the "default" should be...)
Hi Valdis --
Thanks for the review!
Count me as irked. The default should be "y" because the overhead is extremely tiny when not enabled at runtime by a backend (though admittedly non-zero), but I got flamed by Linus last time I tried that (for cleancache), so I'm not going to try it for frontswap! :-) The "if unsure" is the best I can do for now to encourage distros to enable it.
Dan
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>