[sheepdog] [PATCH v2 6/6] vditest: flush based on write counts

MORITA Kazutaka morita.kazutaka at lab.ntt.co.jp
Mon Feb 4 11:03:20 CET 2013


At Mon,  4 Feb 2013 18:54:13 +0900,
MORITA Kazutaka wrote:
> 
> It doesn't make sense to flush after read requests.
> 
> Signed-off-by: MORITA Kazutaka <morita.kazutaka at lab.ntt.co.jp>
> ---
>  script/vditest |    6 +-----
>  1 files changed, 1 insertions(+), 5 deletions(-)
> 
> diff --git a/script/vditest b/script/vditest
> index c24f8e0..4300ea1 100755
> --- a/script/vditest
> +++ b/script/vditest
> @@ -312,7 +312,6 @@ sub parse {
>  sub vdi_main {
>      my $roffset = $offset;
>      my $woffset = $offset;
> -    my $i = 1;
>      my ($cur_time, $start_time, $end_time, $hbeat_time);
>  
>      $start_time = $cur_time = get_current_time();
> @@ -328,8 +327,6 @@ sub vdi_main {
>  	    wait_aio_requests();
>  	}
>  
> -	print "$i: "  if $verbose;
> -
>  	if (rand($rrate + $wrate) < $rrate) {
>  	    # read
>  	    $length = $eblk - $roffset  if $roffset + $length > $eblk;
> @@ -356,7 +353,7 @@ sub vdi_main {
>  	    }
>  	}
>  
> -	vdi_flush() if $flush_interval > 0 && $i % $flush_interval == 0;
> +	vdi_flush() if $flush_interval > 0 && $wr_ops % $flush_interval == 0;

This sends flush requests every time if (wr_ops % flush_interval == 0)
and wr_ops is not incremented.  Please drop this patch.

Thanks,

Kazutaka



More information about the sheepdog mailing list