linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>
To: Weijie Yang <weijie.yang@samsung.com>
Cc: 'Minchan Kim' <minchan@kernel.org>,
	'Andrew Morton' <akpm@linux-foundation.org>,
	sergey.senozhatsky.work@gmail.com, ngupta@vflare.org,
	'Weijie Yang' <weijie.yang.kh@gmail.com>,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org
Subject: Re: [PATCH] zram: clear disk io accounting when reset zram device
Date: Fri, 29 May 2015 12:41:41 +0900	[thread overview]
Message-ID: <20150529034141.GA1157@swordfish> (raw)
In-Reply-To: <"000001d099be$fae6cc90$f0b465b0$@yang"@samsung.com>

On (05/29/15 11:23), Weijie Yang wrote:
> This patch clears zram disk io accounting when reset the zram device,
> if don't do this, the residual io accounting stat will affect the
> diskstat in the next zram active cycle.
> 

thanks. my bad.

Acked-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>

	-ss

> Signed-off-by: Weijie Yang <weijie.yang@samsung.com>
> ---
>  drivers/block/zram/zram_drv.c |    2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/block/zram/zram_drv.c b/drivers/block/zram/zram_drv.c
> index 8dcbced..6e134f4 100644
> --- a/drivers/block/zram/zram_drv.c
> +++ b/drivers/block/zram/zram_drv.c
> @@ -805,7 +805,9 @@ static void zram_reset_device(struct zram *zram)
>  	memset(&zram->stats, 0, sizeof(zram->stats));
>  	zram->disksize = 0;
>  	zram->max_comp_streams = 1;
> +
>  	set_capacity(zram->disk, 0);
> +	part_stat_set_all(&zram->disk->part0, 0);
>  
>  	up_write(&zram->init_lock);
>  	/* I/O operation under all of CPU are done so let's free */
> -- 
> 1.7.10.4
> 
> 

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2015-05-29  3:41 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-29  3:23 [PATCH] zram: clear disk io accounting when reset zram device Weijie Yang
2015-05-29  3:41 ` Sergey Senozhatsky [this message]
2015-05-29 14:54   ` Minchan Kim
2015-05-30  4:16     ` Sergey Senozhatsky
  -- strict thread matches above, loose matches on Subject: below --
2015-06-04  1:53 Minchan Kim
2015-06-04  2:32 ` Sergey Senozhatsky

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150529034141.GA1157@swordfish \
    --to=sergey.senozhatsky.work@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=minchan@kernel.org \
    --cc=ngupta@vflare.org \
    --cc=weijie.yang.kh@gmail.com \
    --cc=weijie.yang@samsung.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).