Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp1787510rdb; Thu, 7 Dec 2023 08:45:59 -0800 (PST) X-Google-Smtp-Source: AGHT+IEoi5K8oj5VTK/YctapvuQQ3Js5hFPEuslpv2DtRYn9JgrV2E6zjcrGBxHOuH2bicJYbo1H X-Received: by 2002:a17:903:1209:b0:1d0:c55b:c55a with SMTP id l9-20020a170903120900b001d0c55bc55amr2834014plh.60.1701967559286; Thu, 07 Dec 2023 08:45:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701967559; cv=none; d=google.com; s=arc-20160816; b=HM7RNpvDBYlCmOakNsQNWDqMgqoWDoTF8Elkx5az6blV1/aPSgfxrPNAjTZqBt3cHa sl4KuVjd2A3DsdU1gs93tVwnp4UOXDCBtI/2K9iTXU3jTaYx7pHwu4DTabk67ReuaWeu xx2CgT4eXQjv1wUa1a6aecXHkrocifv+bDbIJPfTFaYjww/DEl5R5Q+4e1gQhvbYMDfS Uv+RWyZLxA7ozLHYaYQOimy1L3TTiTHgS2Ko9TUt92inW7+L5yYJ10tw8bgH7rCHZ4Mu UyftU5LlhwezF31+LW73wun+rDuoqFzJsol6a99ZHEAoTl8/viMPZnJR2gJuREuCIio2 SseQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=RWOFC6IBNyaY+k69wH5pBEtEPXyyRGXMkoHVwyv4/m4=; fh=5xXR+woD6iW9GYQiMghIbApiwJZXO4f7q1VcNmDEv0Q=; b=BriEck7FhfF2HM5lbPuLfka9ywJIcWvVFFMdZXfshW2f0wFR6+xXKCdTE4u8buGLL+ FS6+lHpp8JSg+1G002Kb+tc9H+c7DBJA2tFYN1Wtud3esKrQbMsoeyeRpEA+s6lm7m4E dVMRvNpSwkCk3W95wUrpHrbArjY0fH+6IugndO94uzh7XkRg3BmhoJ2ZwlgifLsOhrUr I48x4zYPJYOid4n7AQsKLjgwMvHwb9tPwkD/PoH96i4ZDk02h3sQ7kkwMiqRfvRZfleX qzGjOrZIo4FdGG/zB8a3xQ+DfnaC7o2veYCXowpOuAH11tsooRjN85lQ/Xwqf9p0MQM1 nxWw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="O56R/5dx"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from fry.vger.email (fry.vger.email. [2620:137:e000::3:8]) by mx.google.com with ESMTPS id ju10-20020a170903428a00b001d08d2f476asi22101plb.414.2023.12.07.08.45.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Dec 2023 08:45:59 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) client-ip=2620:137:e000::3:8; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="O56R/5dx"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 417588078296; Thu, 7 Dec 2023 08:45:10 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232532AbjLGQo4 (ORCPT + 99 others); Thu, 7 Dec 2023 11:44:56 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58934 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229472AbjLGQoy (ORCPT ); Thu, 7 Dec 2023 11:44:54 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 728BB10DD for ; Thu, 7 Dec 2023 08:45:01 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 85FEDC433C7; Thu, 7 Dec 2023 16:45:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1701967501; bh=r+2jjC0f0ebNBy1BCSaTbfdEHy6BgmMv/wALzLuGFfI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=O56R/5dxnNuijI23Fdx2eClph/7XUdaH7+xQVKceIHKqtHIUa8zQ3HuzXiQxzW/Cn l+66bW9N17S2w5Tx9CeE8OfpgcfehGmlSYAtcF1/NNoEvCQ2ErSUDrJGPsxiQZ/XDv i+kSR00V0rPvGaZqdv5iy9d4a9xTQFEb2I56bxvg4POZz2R9ZvVLeoApwmqgE0Fb5X BvZXqy9c2cF5A9I1R0UBVSeqZWiuzyxnRHpWChxNzv9A+5nuzQeUYtnU5W1yyDy0Mc 5NEZFKc0baTll7ZqT8PgeEoGoP1X1EWkwREJswtHCIdMn7PqIhvhdMymJppy0wKYQo zgFY37u9FLN/Q== Date: Thu, 7 Dec 2023 09:44:58 -0700 From: Keith Busch To: Daniel Wagner Cc: linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org, Christoph Hellwig , Sagi Grimberg , Hannes Reinecke Subject: Re: [PATCH v4 3/4] nvme: add csi, ms and nuse to sysfs Message-ID: References: <20231207123624.29959-1-dwagner@suse.de> <20231207123624.29959-4-dwagner@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231207123624.29959-4-dwagner@suse.de> X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Thu, 07 Dec 2023 08:45:10 -0800 (PST) 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