vditest: use qemu-io '-t' option to specify cache mode

Signed-off-by: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>
vditest: add -f option to specify flush interval

Signed-off-by: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>
vditest: add verbose mode

Signed-off-by: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>
vditest: allow specifying vdi name before command line options

Signed-off-by: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>
vditest: add '-r' and '-w' options to set read and write ratio easily

This also makes read-only test default like disktest.

Signed-off-by: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>
vditest: add '-T' option to specify runtime

Signed-off-by: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>
vditest: add support '-h' option to show performance statistic

Signed-off-by: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>
vditest: enlarge maximum buffer size from 1 MB to 64 MB

Signed-off-by: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>
vditest: add option to use a local file for testing

This is useful to compare performances between sheepdog vdi and local
file.

Signed-off-by: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>
vditest: limit the maximum number of outstanding aio

When using '-a' option, vditest sends too many requests to sheep and
causes a 'too many open files' error.  This patch limits the number of
aio requests as a workaround.

Signed-off-by: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>
sheep: add cache option 'page' to use page cache on storage nodes

This option is useful when VMs are running on different cluster from
sheeps and we can use a lot of memory on sheep nodes for a Sheepdog
VDI cache.

Signed-off-by: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>
sheep: add cache option 'unsafe' to disable sync

This option is useful when a datacenter can provide a reliable power
and we are unlikely to lose in-memory data.  We can also use this
option for testing purpose.

Signed-off-by: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>
logger: remove logdbg

We are unlikely to use these debug info.  Let's remove them to
simplify code.

Signed-off-by: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>
logger: use malloced memory for logger buffer

la->buff is not shared between sheep and logger processes, so there is
no reason to use a shared memory for it.

Signed-off-by: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>
logger: format time in logger process

Calling localtime_r is a bit expensive operation, so it's better to
call it in the logger process rather than in eprintf/dprintf.

Signed-off-by: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>
logger: cleanup logarea and logmsg

Signed-off-by: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>
logger: format output string before locking

Signed-off-by: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>
logger: increase shared memory size from 1MB to 32 MB

This reduces the risk of dropping log message by increasing the buffer
size from 1 MB to 32 MB, which is the default SHMMAX on many OSes.

Signed-off-by: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>
logger: check sheep process after prctl is called

The sheep process could exist before setting a signal handler, so we
need to check the aliveness of the process after prctl call.

Signed-off-by: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>
sheep: initialize only used write_info

Signed-off-by: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>