Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp469971pxf; Thu, 25 Mar 2021 07:55:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxSQtaopR748E6rf+XkWoV2eKUd3ydrWyVdlDnPtg8csv9lLkP3eGkAYb78SdvcZzwdJftQ X-Received: by 2002:a17:906:ad4:: with SMTP id z20mr9670676ejf.496.1616684131633; Thu, 25 Mar 2021 07:55:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616684131; cv=none; d=google.com; s=arc-20160816; b=pllOiA+xhMpDKrBM7yAtyy5NuMkCYpz4Qr5p1sls/Bkdxm0AxMqb3yrJNs9o2B6xHD diDshJueUmiQp5j7IxQ6C0321uzsH9rQG4LQf55P3eiWiMSJc3mX4i38pbHZy186QmnY 3HtMo98aTZCt8yKQiM3FrszGe0ExDAW5wRdf2cdplbIt6PxIuVthPsvaOqAngOm2bwTG 4v4IlDr1E+4ohmlpDTXDUIz4jzjZRcczIYLvRvsDp7vF+JtzTU+leXACDO5q4AE1u6wC AVDyUdKjPRpAwrGRAuVBVuS8osGz7qyphIMzUem/8AhyQtNQW9V3JZvZ6gK0Q+mBmTj3 8VwA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=QYHZyeRIpj/WD3sjHB3UD6cGlHJJw+nSq8t67YyK3ag=; b=CsK04j7xCeLbIatM4UGhC3YG1kEZFf7DX8bvyuPlsgb1Y8EpqbfbVkZBMZQhzoBPxw HuZThK7aZ/54JaL8zjzGmgwF0EXYgno9MHXzeyV69EXM6ptqKhDh7NVP9nXL3SMJ3rB0 c/jVURtw2mdnCgcyAPVZPBT0n0peAHOKwMYAn9X2oBFDfdLG9p9LEGIRJhLYMbAC4ocA 5ygE8Qjp8+apfv6zEEiINnCogVpizkjyyonvkQJkUPpoX2IcS7j5wWBi2P4yN8gOiUOx 36Fd5lcLClMiLJR6RLasfIR8fbt1xS8+c9suchZ+WTUD+usKrLLd1tMpdfn3zKPN5FIA pg/A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=EJENdKr4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n19si4308323ejx.370.2021.03.25.07.55.07; Thu, 25 Mar 2021 07:55:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=EJENdKr4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230322AbhCYOxt (ORCPT + 99 others); Thu, 25 Mar 2021 10:53:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56176 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229574AbhCYOxo (ORCPT ); Thu, 25 Mar 2021 10:53:44 -0400 Received: from mail-lj1-x232.google.com (mail-lj1-x232.google.com [IPv6:2a00:1450:4864:20::232]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F3D1DC06174A; Thu, 25 Mar 2021 07:53:42 -0700 (PDT) Received: by mail-lj1-x232.google.com with SMTP id z8so3442574ljm.12; Thu, 25 Mar 2021 07:53:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=QYHZyeRIpj/WD3sjHB3UD6cGlHJJw+nSq8t67YyK3ag=; b=EJENdKr4l4LGOV8iUHaXzVSNMQlI2W0C3mkZyu/yw/dYDDAGY1Rfpyh+cqoeUbDAI+ GPDQq33yDJPCYpgaAxqKVUNqzrfI7/oj/tSCGU56ckRiA4JVcEVn5sGAbu3HAlstz1St 13xo9SPW2/x6Ha2bWsxEYwRG9wOo3WY0mprJF1W1fNqOkomyCQti07J7qkHW+0XGF/1C V58hfW3wqEgOXfbdWv4YC6Wk2koR/EpEHVTvOnPQhk0rJQoOHAUuutvkmgIFY6YQZVdo B91vin8y+qDx7peYbvhAUgwZhRV5S1e+NqbUks7HBuPg6qYP/p/hCeKtytoegVkQmkyq EJtA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=QYHZyeRIpj/WD3sjHB3UD6cGlHJJw+nSq8t67YyK3ag=; b=T31zrx5oXZQMoU1BtjrPbIv3sxNM4Bdzo+yAtuhsPHX1QMOSh6pFCkZ7BHrPXjatXZ Pzr9KJl/+2w8+OQmk90Tyf9UH8r1aQPsHXIN29SyI57uAmQ8iYfDmvhz0BkNg1uPSf8n uwGvrtX3cZ35CCsbEGLLNYenbcaVvm+jsu8rsCtyZc/htGE8Mvk9E3dA9A4ADVhqPs3h AMpwMvV+13fW9ElG9Ls9dx+EyigOzX7ZbvxRlLjDUtdmoRzhdUgW74wVVyRxynt5yN/P 2N8rQg5Hd8Fh9sj/Jf/6HO4ASN6Y+44ZkzGQ1a7wQ8pAPyUGB6Zecj10nhAtnz89HMni 7y/w== X-Gm-Message-State: AOAM532tQiMh9UTpZjY0e9sLEsztN9mpP81Fpl9ksW8kCQizEG3Nxr2n YkRZUaSk0eNOPEz1uYPHa5zLPIk5pWI= X-Received: by 2002:a2e:b5a5:: with SMTP id f5mr6053442ljn.336.1616684021256; Thu, 25 Mar 2021 07:53:41 -0700 (PDT) Received: from [192.168.2.145] (109-252-193-60.dynamic.spd-mgts.ru. [109.252.193.60]) by smtp.googlemail.com with ESMTPSA id u6sm573032lfm.56.2021.03.25.07.53.39 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 25 Mar 2021 07:53:40 -0700 (PDT) Subject: Re: [PATCH v4 5/5] soc/tegra: pmc: Rate-limit error message about failed to acquire of reset To: Thierry Reding Cc: Jonathan Hunter , Peter Geis , Matt Merhar , linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org References: <20210302122502.20874-1-digetx@gmail.com> <20210302122502.20874-6-digetx@gmail.com> From: Dmitry Osipenko Message-ID: Date: Thu, 25 Mar 2021 17:53:39 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 25.03.2021 17:42, Thierry Reding пишет: > On Tue, Mar 02, 2021 at 03:25:02PM +0300, Dmitry Osipenko wrote: >> PMC domain could be easily bombarded with the enable requests if there is >> a problem in regards to acquiring reset control of a domain and kernel >> log will be flooded with the error message in this case. Hence rate-limit >> the message in order to prevent missing other important messages. >> >> Signed-off-by: Dmitry Osipenko >> --- >> drivers/soc/tegra/pmc.c | 4 ++-- >> 1 file changed, 2 insertions(+), 2 deletions(-) >> >> diff --git a/drivers/soc/tegra/pmc.c b/drivers/soc/tegra/pmc.c >> index bf29ea22480a..84ab27d85d92 100644 >> --- a/drivers/soc/tegra/pmc.c >> +++ b/drivers/soc/tegra/pmc.c >> @@ -868,8 +868,8 @@ static int tegra_genpd_power_off(struct generic_pm_domain *domain) >> >> err = reset_control_acquire(pg->reset); >> if (err < 0) { >> - dev_err(dev, "failed to acquire resets for PM domain %s: %d\n", >> - pg->genpd.name, err); >> + dev_err_ratelimited(dev, "failed to acquire resets for PM domain %s: %d\n", >> + pg->genpd.name, err); > > That doesn't look right. This is a serious error condition that > shouldn't happen at all. Ever. If this shows up even once we've got a > serious bug somewhere and we need to fix it rather than "downplay" it > by ratelimiting these errors. > > What's the exact use-case where you see this? This was firing up badly while I was wiring up power management and GENPD support to the GR3D and VDE drivers and testing them because of the bugs that I was creating. Looking back again at this now, I agree that the commit message isn't good and could be improved. What about this variant: "Rate-limit error message about failing to acquire reset in order to prevent missing other important messages. This was proven to be very useful to have for development and debugging purposes of a power management support for various Tegra drivers".