lkml.org 
[lkml]   [2006]   [Jun]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[Suspend2][ 03/32] [Suspend2] Reset block io stats.
    Date
    Simple helper which resets the statistics to zero at the start of a cycle.

    Signed-off-by: Nigel Cunningham <nigel@suspend2.net>

    kernel/power/suspend_block_io.c | 16 ++++++++++++++++
    1 files changed, 16 insertions(+), 0 deletions(-)

    diff --git a/kernel/power/suspend_block_io.c b/kernel/power/suspend_block_io.c
    index 94f1946..51e02ef 100644
    --- a/kernel/power/suspend_block_io.c
    +++ b/kernel/power/suspend_block_io.c
    @@ -128,3 +128,19 @@ static struct suspend_bdev_info *suspend

    int suspend_header_bytes_used = 0;

    +/*
    + * suspend_reset_io_stats
    + *
    + * Description: Reset all our sanity-checking statistics.
    + */
    +static void suspend_reset_io_stats(void)
    +{
    + int i;
    +
    + max_outstanding_io = 0;
    + maxinfopages = 0;
    +
    + for (i = 0; i < 8; i++)
    + nr_schedule_calls[i] = 0;
    +}
    +
    --
    Nigel Cunningham nigel at suspend2 dot net
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2006-06-27 00:40    [W:4.324 / U:0.096 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site