[PATCH v4 3/4] nvme: add csi, ms and nuse to sysfs

Keith Busch kbusch at kernel.org
Thu Dec 7 08:44:58 PST 2023


On Thu, Dec 07, 2023 at 01:36:23PM +0100, Daniel Wagner wrote:
> @@ -3418,6 +3419,7 @@ static struct nvme_ns_head *nvme_alloc_ns_head(struct nvme_ctrl *ctrl,
>  	head->ns_id = info->nsid;
>  	head->ids = info->ids;
>  	head->shared = info->is_shared;
> +	ratelimit_state_init(&head->rs_nuse, 5 * HZ, 1);
>  	kref_init(&head->ref);

I think we need to add:

	ratelimit_set_flags(&head->rs_nuse, RATELIMIT_MSG_ON_RELEASE);	

So that we don't get periodic messages like:

	[   60.469730] ns_head_update_nuse: 39 callbacks suppressed
	[  159.532901] ns_head_update_nuse: 1999 callbacks suppressed



More information about the Linux-nvme mailing list