From: Ming Lei <tom.leiming@gmail.com>
To: Jens Axboe <axboe@kernel.dk>,
linux-kernel@vger.kernel.org, Kent Overstreet <kmo@daterainc.com>
Cc: Christoph Hellwig <hch@lst.de>, Shaohua Li <shli@kernel.org>,
Nicholas Bellinger <nab@linux-iscsi.org>,
Nick Swenson <nks@daterainc.com>,
Ming Lei <tom.leiming@gmail.com>
Subject: [PATCH 3/3] blk-mq: add percpu_ida kobjects
Date: Tue, 29 Apr 2014 22:53:53 +0800 [thread overview]
Message-ID: <1398783234-7062-4-git-send-email-tom.leiming@gmail.com> (raw)
In-Reply-To: <1398783234-7062-1-git-send-email-tom.leiming@gmail.com>
So that the percpu_ida performance can be monitored.
Signed-off-by: Ming Lei <tom.leiming@gmail.com>
---
block/blk-mq-sysfs.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/block/blk-mq-sysfs.c b/block/blk-mq-sysfs.c
index 8145b5b..4171ae2 100644
--- a/block/blk-mq-sysfs.c
+++ b/block/blk-mq-sysfs.c
@@ -329,6 +329,8 @@ void blk_mq_unregister_disk(struct gendisk *disk)
kobject_del(&ctx->kobj);
kobject_put(&ctx->kobj);
}
+ percpu_ida_kobject_del(&hctx->tags->free_tags);
+ percpu_ida_kobject_del(&hctx->tags->reserved_tags);
kobject_del(&hctx->kobj);
kobject_put(&hctx->kobj);
}
@@ -362,6 +364,11 @@ int blk_mq_register_disk(struct gendisk *disk)
if (ret)
break;
+ percpu_ida_kobject_add(&hctx->tags->free_tags,
+ &hctx->kobj, "free_tags");
+ percpu_ida_kobject_add(&hctx->tags->reserved_tags,
+ &hctx->kobj, "reserved_tags");
+
if (!hctx->nr_ctx)
continue;
--
1.7.9.5
next prev parent reply other threads:[~2014-04-29 14:56 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-29 14:53 [PATCH 0/3] percpu_ida: support to export allocation/free information Ming Lei
2014-04-29 14:53 ` [PATCH 1/3] percpu_ida: introduce kobject for percpu_ida pool Ming Lei
2014-04-29 14:53 ` [PATCH 2/3] percpu_ida: support exporting allocation/free info via sysfs Ming Lei
2014-04-29 14:53 ` Ming Lei [this message]
2014-05-05 9:16 ` [PATCH 0/3] percpu_ida: support to export allocation/free information Ming Lei
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=1398783234-7062-4-git-send-email-tom.leiming@gmail.com \
--to=tom.leiming@gmail.com \
--cc=axboe@kernel.dk \
--cc=hch@lst.de \
--cc=kmo@daterainc.com \
--cc=linux-kernel@vger.kernel.org \
--cc=nab@linux-iscsi.org \
--cc=nks@daterainc.com \
--cc=shli@kernel.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®