Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp2210251rdb; Fri, 8 Dec 2023 01:11:17 -0800 (PST) X-Google-Smtp-Source: AGHT+IFeQxI/ks1JV4PZawPNFwXWDfUJ8kXsR59p8GdFaRtPlJa5oxaI+JxAJAO3Seu3EFE4H+Nm X-Received: by 2002:a05:6808:64b:b0:3b9:dbc5:2fdd with SMTP id z11-20020a056808064b00b003b9dbc52fddmr2554979oih.109.1702026677553; Fri, 08 Dec 2023 01:11:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702026677; cv=none; d=google.com; s=arc-20160816; b=LQE2ImLGWCWcIPtr1wCj/+XrPg3CZfSolDuhknaDV34ZFlJqOJg+mTg+5A4/eOHNPJ Il18fkyW5l5B3Lb4KO9RWtH5wyyIg2lFcoV9GH/YaD23W9KdLF+2ht4OUwOZ6ImOCT7P Betxcsr/m4gg256/Qef0arAsRtDiH9d7/Usb6W7q+FrbxbcXjUQ0Y7Y58kPhaDd2O5li rokCfRD4bFgjAyosPKE+XGQ0gjGj5H3JhXjm1fhiit3JohIN8oR3tBd7K0UTlPSN9VcO LpBsop1v2D3cb+Ot3lhdGSWIZ4edoWGvTotIVikdQBXaIa4ELesdDQ8lzO8aAn0AWCye 6uzg== 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; bh=dChrB1aaGyO8fT5JK9u5mL9odiGYVuDJncDDcfewYEc=; fh=xPDonUoz+1hwmcIBxwbdbec6tr2n4MgidYYYN9qQl80=; b=WN2th4sbaGXhbh2MexeHpSOldhMj6hIO5Ksj6MMJJ0Zf/jwTrxzyZOtah4LjOkOmRc /00oHa1PYhvNO5ZpZW+WbWoWHW2kY/ibPAC6Uf+6psPOWLe2Hc9dKTM2mZzHaaVqVya0 Ni56amO0TTzlKzWho7wcX45Z+SI2WF+pc5mgtT5tSQGZeNNgM4I9V6btEAO8ujYraZ0n QVyGk/vu7T3XOt+2YpkFHoQfegn4xE30qeaujnqUYmJCaZvhnT/gBnTfJ2AQsOqZxyML DbYE+FVWLzAz/zJWilPNOs3HA85aSWgO2T2enYCyCRkACIlSb1nKai23miHwB2GnY8A5 6FJg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=suse.de Return-Path: Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id q24-20020a63e958000000b005c6b4091c32si1239086pgj.385.2023.12.08.01.11.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Dec 2023 01:11:17 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=suse.de Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 64B6980ECF22; Fri, 8 Dec 2023 01:11:16 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233242AbjLHJLD (ORCPT + 99 others); Fri, 8 Dec 2023 04:11:03 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54444 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235970AbjLHJKz (ORCPT ); Fri, 8 Dec 2023 04:10:55 -0500 Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2a07:de40:b251:101:10:150:64:2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 06BDAC3 for ; Fri, 8 Dec 2023 01:11:02 -0800 (PST) Received: from imap2.dmz-prg2.suse.org (imap2.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:98]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 6E9601FDAC; Fri, 8 Dec 2023 09:11:00 +0000 (UTC) Received: from imap2.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap2.dmz-prg2.suse.org (Postfix) with ESMTPS id 5BE6A138FF; Fri, 8 Dec 2023 09:11:00 +0000 (UTC) Received: from dovecot-director2.suse.de ([10.150.64.162]) by imap2.dmz-prg2.suse.org with ESMTPSA id O4/3FKTdcmVIOQAAn2gu4w (envelope-from ); Fri, 08 Dec 2023 09:11:00 +0000 Date: Fri, 8 Dec 2023 10:10:59 +0100 From: Daniel Wagner To: Keith Busch 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: X-Spam-Score: 13.79 X-Spamd-Bar: +++++++++++++ Authentication-Results: smtp-out2.suse.de; dkim=none; dmarc=fail reason="No valid SPF, No valid DKIM" header.from=suse.de (policy=none); spf=softfail (smtp-out2.suse.de: 2a07:de40:b281:104:10:150:64:98 is neither permitted nor denied by domain of dwagner@suse.de) smtp.mailfrom=dwagner@suse.de X-Rspamd-Server: rspamd2 X-Spamd-Result: default: False [13.79 / 50.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_SPAM_SHORT(3.00)[1.000]; MIME_GOOD(-0.10)[text/plain]; MID_RHS_NOT_FQDN(0.50)[]; R_SPF_SOFTFAIL(4.60)[~all:c]; RCPT_COUNT_FIVE(0.00)[6]; RCVD_COUNT_THREE(0.00)[3]; MX_GOOD(-0.01)[]; NEURAL_SPAM_LONG(3.50)[1.000]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(2.20)[]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_ALL(0.00)[]; BAYES_HAM(-0.00)[20.18%]; DMARC_POLICY_SOFTFAIL(0.10)[suse.de : No valid SPF, No valid DKIM,none] X-Spam-Score: 13.79 X-Rspamd-Queue-Id: 6E9601FDAC X-Spam-Flag: NO X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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 (snail.vger.email [0.0.0.0]); Fri, 08 Dec 2023 01:11:16 -0800 (PST) On Thu, Dec 07, 2023 at 09:44:58AM -0700, Keith Busch wrote: > 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 Good idea. I'll add this.