From: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Minchan Kim <minchan@kernel.org>,
Jerome Marchand <jmarchan@redhat.com>,
Nitin Gupta <ngupta@vflare.org>,
linux-kernel@vger.kernel.org,
Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
Subject: [PATCHv2 4/4] zram: report failed read and writes stats
Date: Wed, 15 Jan 2014 13:16:17 +0300 [thread overview]
Message-ID: <1389780977-18949-5-git-send-email-sergey.senozhatsky@gmail.com> (raw)
In-Reply-To: <1389780977-18949-1-git-send-email-sergey.senozhatsky@gmail.com>
zram accounted but did not report numbers of failed read
and write queries. make these stats available as failed_reads
and failed_writes attrs.
Signed-off-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
---
drivers/block/zram/zram_drv.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/block/zram/zram_drv.c b/drivers/block/zram/zram_drv.c
index 6eb2155..ce00d47 100644
--- a/drivers/block/zram/zram_drv.c
+++ b/drivers/block/zram/zram_drv.c
@@ -699,6 +699,8 @@ static DEVICE_ATTR(memory_used, S_IRUGO, memory_used_show, NULL);
ZRAM_ATTR_RO(num_reads);
ZRAM_ATTR_RO(num_writes);
+ZRAM_ATTR_RO(failed_reads);
+ZRAM_ATTR_RO(failed_writes);
ZRAM_ATTR_RO(pages_stored);
ZRAM_ATTR_RO(invalid_io);
ZRAM_ATTR_RO(notify_free);
@@ -711,6 +713,8 @@ static struct attribute *zram_disk_attrs[] = {
&dev_attr_reset.attr,
&dev_attr_num_reads.attr,
&dev_attr_num_writes.attr,
+ &dev_attr_failed_reads.attr,
+ &dev_attr_failed_writes.attr,
&dev_attr_pages_stored.attr,
&dev_attr_invalid_io.attr,
&dev_attr_notify_free.attr,
--
1.8.5.3.493.gb139ac2
next prev parent reply other threads:[~2014-01-15 10:21 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-15 10:16 [PATCHv2 0/4] zram stats rework and code cleanup Sergey Senozhatsky
2014-01-15 10:16 ` [PATCHv2 1/4] zram: drop `init_done' struct zram member Sergey Senozhatsky
2014-01-15 10:16 ` [PATCHv2 2/4] zram: do not pass rw argument to __zram_make_request() Sergey Senozhatsky
2014-01-15 10:16 ` [PATCHv2 3/4] zram: rework reported to end-user zram statistics Sergey Senozhatsky
2014-01-16 0:56 ` Minchan Kim
2014-01-16 8:46 ` Sergey Senozhatsky
2014-01-16 9:41 ` Jerome Marchand
2014-01-15 10:16 ` Sergey Senozhatsky [this message]
2014-01-16 0:58 ` [PATCHv2 4/4] zram: report failed read and writes stats Minchan Kim
2014-01-16 9:45 ` Jerome Marchand
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=1389780977-18949-5-git-send-email-sergey.senozhatsky@gmail.com \
--to=sergey.senozhatsky@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=jmarchan@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=minchan@kernel.org \
--cc=ngupta@vflare.org \
/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
all inboxes | Powered by JetHome®