Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758068AbaD2O4O (ORCPT ); Tue, 29 Apr 2014 10:56:14 -0400 Received: from mail-pd0-f176.google.com ([209.85.192.176]:54729 "EHLO mail-pd0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751676AbaD2O4K (ORCPT ); Tue, 29 Apr 2014 10:56:10 -0400 From: Ming Lei To: Jens Axboe , linux-kernel@vger.kernel.org, Kent Overstreet Cc: Christoph Hellwig , Shaohua Li , Nicholas Bellinger , Nick Swenson , Ming Lei Subject: [PATCH 3/3] blk-mq: add percpu_ida kobjects Date: Tue, 29 Apr 2014 22:53:53 +0800 Message-Id: <1398783234-7062-4-git-send-email-tom.leiming@gmail.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1398783234-7062-1-git-send-email-tom.leiming@gmail.com> References: <1398783234-7062-1-git-send-email-tom.leiming@gmail.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org So that the percpu_ida performance can be monitored. Signed-off-by: Ming Lei --- 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 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/