facebook/flashcache — pull request #32 by willsmithorg (2011-10-13 16:13:45+00:00)
Title: Skip Sequential IO (as discussed with Mohan)

This patch adds ability to skip sequential i/o, i.e. not cache it. it plugs into the existing uncacheable() framework.

Notes :

1) by default, no change, the new sysctl 'skip_seq_thresh' defaults to 0, "cache everything as before".

2) tested on various benchmarks, some show improvement, need mix of sequential and random i/o to really show it. Some show performance regression if they rely heavily on write hits (e.g. the Percona tpcc-mysql benchmark which already mentions flashcache).

3) sequential I/O can only be 'spotted' after the fact, i.e. >= n sequential block IOs (we handle tracking multiple 'flows' of IO), so we always cache the first few blocks until we hit the sysctl threshold.

4) Lots of DPRINTK added for my debugging, feel free to remove. Possibly should not be done inside a spinlock anyway, but worked well for me.

5) Mohan, the patch will fail at

-#define FLASHCACHE_NUM_WRITEBACK_SYSCTLS 17
+#define FLASHCACHE_NUM_WRITEBACK_SYSCTLS 18

because I added another one elsewhere in a separate patch in my own github. Your count should go from 16 to 17.

Documentation changed. I took the liberty of adding my name to acknowledgements.