Browse files

Commit a "write through" variant of flashcache. Changes to the top level

README to document that and a change to the flashcache sa-guide.
  • Loading branch information...
1 parent 2f72ba0 commit 1c1ba8cc7fbd18d492e041f5f10aa3e3af531f48 Mohan Srinivasan committed May 28, 2010
@@ -1,3 +1,7 @@
+Update : Added the flashcache-wt directory, which contains a
+(separate) module for a write through flashcache. For more
+details, look at flashcache-wt/README.
Building Flashcache :
Update : Vadim Tkachenko (with help from Mohan), ported
@@ -119,6 +119,11 @@ stripe unit to 16KB will result in XFS sending down 16KB multiple IOs.
This sets the stripe unit to 16KB and the stripe width to
640KB (16KB * 40).
+Note : For the 16KB blocksize to work well with XFS, it is necessary
+to align the volume to start at a 16KB boundary. There are some
+alignment issues with XFS/LVM and flashcache. If using LVM, use the
+4KB cache blocksize.
FlashCache Sysctls :
These sysctls will apply to all cache devices on the node.
@@ -0,0 +1,5 @@
+ $(MAKE) -C src KERNEL_TREE=$(KERNEL_TREE) PWD=$(PWD)/src clean
@@ -0,0 +1,51 @@
+flashcache-wt is a simple, non-persistent write through flashcache.
+It is a separate code base from flashcache (which is write back only).
+Notes :
+1) flashcache-wt is non persistent, which means that on a cache remove
+(or a reboot), you will lose the cache entirely. Since the cache is write
+through, this will not result in any data loss.
+2) Right now, I have only built and tested flashcache-wt on 2.6.20 and
+2.6.18. But I do plan to port it forward to newer releases.
+3) The printk/format warnings will be eliminated shortly.
+Building flashcache-wt :
+----------------------> make KERNEL_TREE=<Base of kernel tree>
+Creating a flashcache-wt volume :
+flashcache_wt_create : Create a new flashcache-wt volume.
+flashcache_wt_create [-s cache size] [-b block size] cachedevname ssd_devname disk_devname
+Very similar to flashcache_create.
+Removing a flashcache-wt volume :
+Use dmsetup remove to remove a flashcache-wt volume.
+dmsetup remove cachedev
+Cache Stats :
+Use 'dmsetup status' for cache statistics.
+'dmsetup table' also dumps a number of cache related statistics.
+Examples :
+dmsetup status cachedev
+dmsetup table cachedev
+Cache Blocksize Selection
+4KB cache blocks are suitable for the vast majority of the cases.
+Also see the flashcache-sa-guide for more discussion on this.
@@ -0,0 +1,13 @@
+EXTRA_CFLAGS=-I$(KERNEL_TREE)/drivers/md -I./
+obj-m += flashcache-wt.o
+flashcache-wt-objs := flashcache_wt.o
+ make -C $(KERNEL_TREE) M=$(PWD) modules
+ $(CC) $(UTILS_CFLAGS) -o utils/flashcache_wt_create utils/flashcache_wt_create.c
+ make -C $(KERNEL_TREE) M=$(PWD) clean
+ rm -f utils/flashcache_wt_create
Oops, something went wrong.

0 comments on commit 1c1ba8c

Please sign in to comment.