facebook/flashcache — pull request #34 by willsmithorg (2011-10-16 15:04:33+00:00)
Title: Skip sequential IO

Skips sequential IO.

Defaults to 'cache all IO as before'. Change the sysctl 'skip_seq_thresh' to turn it on.

LRU management of the cache of recent IO 'flows' moved out into separate function based on Mohan's patch sent to me.

Documentation updated throughout to reflect the change.

Couple of other small changes rolled up in this patch:

1) update documentation to say that fallow_delay defaults to 900 seconds (documentation says 60 which might people complacent and assume they won't lose much dirty data on a crash).

2) update documentation of flashcache-wt/README to clarify that the 'main' flashcache project now has its own writethrough mode and is more configurable. Should flashcache-wt be removed or depracated now?

3) fixed a small typo in a DPRINTK (flashcache_main.c line 405, preventing compiling with DMC_DEBUG = 1.

Final note:

In one place I do this:

for (...)
DPRINTK(...);
for (...)
DPRINTK(...);
return xyz;

should the DPRINTK macro expand to ';' rather than blank if DMC_DEBUG = 0? Would it not expand currently to

for (...)
for (...)
return xyz;

If the for loops are not invoked (because the middle 'for' term evaluates to false), will we still return xyz or simply fallthrough and return nothing?