Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1832464rwd; Tue, 13 Jun 2023 15:09:09 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7KgbxhTo5RH68vyXf5wMySad9SyRx3ytFs0dqYoEIa0jyAgZO+yoU6+2MqLSSJkLeYcqYa X-Received: by 2002:a05:6e02:10f:b0:33c:5182:6cf1 with SMTP id t15-20020a056e02010f00b0033c51826cf1mr11663290ilm.27.1686694148772; Tue, 13 Jun 2023 15:09:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686694148; cv=none; d=google.com; s=arc-20160816; b=v9g+u/XIEzOb90mOAOfyE9MgovgP0wRrK7k4JACt71JT60GAgYQ0KaXaOpuqs6hhS0 r/OvqEu9Ozk1fbkr747ZPC9G8h/UnGjlTM2cc36PsHjd9ql0JIaBgsrYzqVXeytwD6eS D+QsWxdA8MK9gZV2oQprGWXjvImw1MRuObikjUaySaghUDFgmP+bCCF7S1FVv4rqAXDj 8fUF1WMeUdcMmKqc17SnY2t6agoW3t7l/bLyAhPOVpr5faJGLQp3m9CD7k9el7NKU4SN 4yspdevGQCmbgH0sJs+5pfRI3qi0Y2aVFiS71StrkgUoYUZJ0dmwhwCM0whnBctKd2JY OzpQ== 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=5FZ/f7Lv4BUWL2A4XNfliJq8d1Hmw6gTiO1jD6Tohrg=; b=YlB2HV5lZz84UXDenDMUbELT83YPVuvOWlIT6A2rfVxl2Rj6ImJegspNT69UbrSuU3 8VT+TUGqotrjalP1rIyS475fbjeOFD4gWxr3U+hSIF0HmX48fpNrTumipjeOTGYtPZol mTj30gFKXBr9/b/Gzxw+kXdoBfNTtrEemhQqTQ9cMYssTs/5XnJaysKBIPVYhSPI2ooN 3tGL/rME7rc4u3nuMFj5Mzj0lpBExQR022+oEB7j7Udgz53/tMfiMmsZi08x6/lirYrM 8qVQNeyzeRG+OXiBLG8J0Oxqj1KMVfgl/lkKWBUg8eHGlhORgFrQbDvM4o55n8Rbpr8D /7JA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="jDJ/b0RR"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n18-20020a638f12000000b00543d2bba30fsi9916018pgd.575.2023.06.13.15.08.46; Tue, 13 Jun 2023 15:09:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="jDJ/b0RR"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230189AbjFMWBI (ORCPT + 99 others); Tue, 13 Jun 2023 18:01:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51198 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229447AbjFMWBG (ORCPT ); Tue, 13 Jun 2023 18:01:06 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AB81C1BC7 for ; Tue, 13 Jun 2023 15:01:02 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 3F298618B4 for ; Tue, 13 Jun 2023 22:01:02 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 29B10C433C8; Tue, 13 Jun 2023 22:01:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1686693661; bh=0I7334PO3KlCPVruC02Cf0E2A+sX+5P5HJ++VK5onO0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=jDJ/b0RRB7OAvOYGZBtBVWVaKUZj0m5+j97KXL+PHWearsMKE++Mdl6Fn+VHXQT8f CPByRL1GZdFelCevRm0KzvPwkhW09KWZSmbOmkPc2NHAngGDXqpOCGpnwaZ4MzC9tu dFswHr7Dfpmf+18pKNCotJa7VXW/kr0kh13DtmxUEsjz4mmASpTt6Qscd0iHQaDqgp 78boo8UipZXnvql7gLp44kxFsUGWK8QRM08ezJESS1GW2jDXuILdASkMM7DjXbYSLr tEn894faFXSP7yR4Z+CTgedMeeo3F4Y/LSgRuCXYvF/FrP3t87R2LkVMS8X1s5y1Nj A1zhPeMsy+zHg== Date: Tue, 13 Jun 2023 16:00:58 -0600 From: Keith Busch To: Breno Leitao Cc: Jens Axboe , Christoph Hellwig , Sagi Grimberg , leit@fb.com, "open list:NVM EXPRESS DRIVER" , open list Subject: Re: [PATCH] nvme: Print capabilities changes just once Message-ID: References: <20230613175538.331639-1-leitao@debian.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230613175538.331639-1-leitao@debian.org> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, 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 On Tue, Jun 13, 2023 at 10:55:37AM -0700, Breno Leitao wrote: > This current dev_info() could be very verbose and being printed very > frequently depending on some userspace application sending some specific > commands. > > Let's turn it into a dev_info_once(), since it is not useful to know > about it all the time. This looks good to me. Vendors sometimes put unnecessary effects in the log, and spamming the same recommendation to repeated operations isn't going to be helpful. I expect anyone who knows what they're doing can consult the effects log directly and take appropriate action on their own. Reviewed-by: Keith Busch > Signed-off-by: Breno Leitao > --- > drivers/nvme/host/core.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c > index 3ec38e2b9173..459e5a84e596 100644 > --- a/drivers/nvme/host/core.c > +++ b/drivers/nvme/host/core.c > @@ -1134,7 +1134,7 @@ void nvme_passthru_end(struct nvme_ctrl *ctrl, struct nvme_ns *ns, u32 effects, > mutex_unlock(&ctrl->scan_lock); > } > if (effects & NVME_CMD_EFFECTS_CCC) { > - dev_info(ctrl->device, > + dev_info_once(ctrl->device, > "controller capabilities changed, reset may be required to take effect.\n"); > } > if (effects & (NVME_CMD_EFFECTS_NIC | NVME_CMD_EFFECTS_NCC)) { > -- > 2.34.1 >