So that the percpu_ida performance can be monitored. Signed-off-by: Ming Lei <tom.leim...@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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/