jthornber/linux-2.6 — pull request #15 by akiradeveloper (2014-05-20 12:33:43+00:00)
Title: [writeboost] Use dm_kcopyd_zero to zero out a region

Memory allocation by vmalloc may fail if kernel outside Writeboost
allocated lot of memory before Writeboost does. This because the total
amount of vmalloc-ed space is limited. So, generally, using vmalloc is
not preferable in kernel.

This patch uses dm_kcopyd_zero routine to zero out region in device.
Using this routine instead can remove dependency to vmalloc to get
zero-filled buffer.

do_zeroing_region() wrapper is defined to do this work synchonously and two
other routines (zeroing_full_superblock and do_clear_plog_dev_t1) use it
now. As a result, no vmalloc() can be seen in Writeboost.

Signed-off-by: Akira Hayakawa

----

I wonder if I use dm_kcopyd_copy and completion correctly. If the patch has obvious defect, please point it out.

These tests are all passed for regression.

```
dmtest run --suite writeboost -t /Type0/ -n do_stress
dmtest run --suite writeboost -t /Type1/ -n do_stress
dmtest run --suite writeboost -t /Type1/ -n rambuf_read_fullsize
dmtest run --suite writeboost -t /Type1/ -n compile_ruby
```