From: Javier Martinez Canillas <javier@osg.samsung.com>
To: Krzysztof Kozlowski <krzk@kernel.org>
Cc: linux-kernel@vger.kernel.org, Jaroslav Kysela <perex@perex.cz>,
alsa-devel@alsa-project.org, Sangbeom Kim <sbkim73@samsung.com>,
Liam Girdwood <lgirdwood@gmail.com>,
Mark Brown <broonie@kernel.org>, Takashi Iwai <tiwai@suse.com>,
Sylwester Nawrocki <s.nawrocki@samsung.com>
Subject: Re: [RFC PATCH 2/2] ASoC: samsung: Print a one-time message if the snow driver's probe defers
Date: Wed, 19 Oct 2016 15:16:30 -0300 [thread overview]
Message-ID: <77594681-a147-3fbe-25f4-a455d605a509@osg.samsung.com> (raw)
In-Reply-To: <20161019181205.GA10034@kozik-lap>
Hello Krzysztof,
Thanks a lot for your feedback.
On 10/19/2016 03:12 PM, Krzysztof Kozlowski wrote:
> On Wed, Oct 19, 2016 at 02:21:06PM -0300, Javier Martinez Canillas wrote:
>> If the snd_soc_register_card() fails due a missing resource and the probe
>> has to be deferred, the driver prints an error message.
>>
>> But since many probe retries can happen before a resource is available,
>> the printed messages can spam the kernel log buffer and slow the boot.
>>
>> The information is useful to know that a dependency was not meet and a
>> defer happened, but isn't necessary to print it on each probe deferral.
>>
>> Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
>>
>> ---
>>
>> sound/soc/samsung/snow.c | 8 +++++++-
>> 1 file changed, 7 insertions(+), 1 deletion(-)
>>
>> diff --git a/sound/soc/samsung/snow.c b/sound/soc/samsung/snow.c
>> index d8ac907bbb0d..068bfb78a668 100644
>> --- a/sound/soc/samsung/snow.c
>> +++ b/sound/soc/samsung/snow.c
>> @@ -103,7 +103,13 @@ static int snow_probe(struct platform_device *pdev)
>>
>> ret = devm_snd_soc_register_card(&pdev->dev, card);
>> if (ret) {
>> - dev_err(&pdev->dev, "snd_soc_register_card failed (%d)\n", ret);
>> + if (ret == -EPROBE_DEFER)
>> + dev_err_once(&pdev->dev,
>> + "snd_soc_register_card deferred (%d)\n",
>> + ret);
>
> dev_warn_once? I understand you didn't want to change the logic behind
> this but this is not really an error condition. Probe deferral happens
> and one should not be worried seeing it once in 'dmesg -l err'.
>
Exactly, I even thought about doing that change (or even dev_dbg_once) but
I didn't want to change the current logic.
> Another point is now we would miss different error condition - infinite
> (or very long) probe deferral. I am not sure how useful it might be but
> theoretically seeing many deferrals is a sign of something to fix.
>
Yes, not sure how we can have both though. Maybe dev_{err,warn}_ratelimit
is a good trade off?
> Best regards,
> Krzysztof
>
Best regards,
--
Javier Martinez Canillas
Open Source Group
Samsung Research America
next prev parent reply other threads:[~2016-10-19 18:16 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-19 17:21 [RFC PATCH 0/2] ASoC: Prevent the snow ASoC driver to spam due probe deferrals Javier Martinez Canillas
2016-10-19 17:21 ` [RFC PATCH 1/2] ASoC: core: Print one-time messages if missing resources when binding DAIs Javier Martinez Canillas
2016-10-24 17:21 ` Mark Brown
2016-10-24 18:39 ` Javier Martinez Canillas
2016-10-19 17:21 ` [RFC PATCH 2/2] ASoC: samsung: Print a one-time message if the snow driver's probe defers Javier Martinez Canillas
2016-10-19 18:12 ` Krzysztof Kozlowski
2016-10-19 18:16 ` Javier Martinez Canillas [this message]
2016-10-20 9:12 ` [alsa-devel] " Sylwester Nawrocki
2016-10-20 10:41 ` Javier Martinez Canillas
2016-10-20 11:27 ` Sylwester Nawrocki
2016-10-20 11:37 ` Javier Martinez Canillas
2016-10-27 15:38 ` Javier Martinez Canillas
2016-10-27 15:48 ` Sylwester Nawrocki
2016-10-27 15:51 ` Javier Martinez Canillas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=77594681-a147-3fbe-25f4-a455d605a509@osg.samsung.com \
--to=javier@osg.samsung.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=krzk@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=perex@perex.cz \
--cc=s.nawrocki@samsung.com \
--cc=sbkim73@samsung.com \
--cc=tiwai@suse.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).