From: Kevin Hilman <khilman@deeprootsystems.com>
To: Nishanth Menon <nm@ti.com>
Cc: Linux-Omap <linux-omap@vger.kernel.org>,
"K, Ambresh" <ambresh@ti.com>,
"Cousson, Benoit" <b-cousson@ti.com>,
Eduardo Valentin <eduardo.valentin@nokia.com>,
Phil Carmody <ext-phil.2.carmody@nokia.com>,
"Premi, Sanjeev" <premi@ti.com>,
Tero Kristo <tero.kristo@nokia.com>,
"Gopinath, Thara" <thara@ti.com>
Subject: Re: [PM-WIP-OPP][PATCH 1/4] omap3: pm: cpufreq: BUG_ON cleanup
Date: Fri, 19 Mar 2010 10:46:54 -0700 [thread overview]
Message-ID: <871vfgxkz5.fsf@deeprootsystems.com> (raw)
In-Reply-To: <4BA3886E.9070906@ti.com> (Nishanth Menon's message of "Fri\, 19 Mar 2010 09\:21\:34 -0500")
Nishanth Menon <nm@ti.com> writes:
> Kevin Hilman had written, on 03/18/2010 05:49 PM, the following:
>> Nishanth Menon <nm@ti.com> writes:
>>
>>> BUG_ON should not ideally contain a functional code. Remove it out.
>>
>> True. But this code should not be using BUG_ON() in the first place.
>>
>> We should not crash the whole kernel in this case, just fail
>> with a warning.
>>
>> If you're cleaning this up, can you make it fail more gracefully.
> I agree if this was a preipheral driver or a non-critical path. but
> in this case:
>
> a) we are speaking of a core description of the h/w - OPPs frequencies
> and voltages which out which the functionality of the system is at
> stake. I am not speaking of just having a basic kernel boot up to
> shell prompt - we need the kernel to do much better than that.
A system can boot fine without OPPs/DVFS. OPPs will not be
registered with CPUfreq, and no DVFS atempts will be made.
> b) Is there any reason why the registration could fail - if it did
> fail at this point, there is something catastrophic happening - some
> other driver is going beserk OR Opp layer is by itself screwed up -
> why continue if we can warn the system and force a fix of the code?
Using WARN() will produce a nice loud message that alert users, get
reported and get fixed as well.
> c) is there a recovery mechanism to put the system back in a usable
> mode with dvfs etc? I might prefer to get some ideas on it..
What is to recover from? While not optimal in power/performance, a
kernel can boot and work just fine without OPPs/DVFS. If this call
fails, no DVFS will be available but the system is still quite usable.
The bigger problem is that everyone things that their
feature/subsystem is so crucial that any problems should hang the
system, when things could actually continue just fine without it in
most cases.
IMO, Using BUG* macros usually indicates improper or incomplete error
handling rather than a real catastrophic system failure.
Kevin
next prev parent reply other threads:[~2010-03-19 17:46 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-18 18:44 [PM-WIP-OPP][PATCH 0/4] few opp layer cleanups Nishanth Menon
2010-03-18 18:44 ` [PM-WIP-OPP][PATCH 1/4] omap3: pm: cpufreq: BUG_ON cleanup Nishanth Menon
2010-03-18 18:44 ` [PM-WIP-OPP][PATCH 2/4] omap: pm: opp: twl: use DIV_ROUND_UP Nishanth Menon
2010-03-18 18:44 ` [PM-WIP-OPP][PATCH 3/4] omap: pm: opp: add ability to store data per opp Nishanth Menon
2010-03-18 18:44 ` [PM-WIP-OPP][PATCH 4/4] omap3: srf: remove hardcoded opp dependency Nishanth Menon
2010-03-19 14:47 ` Felipe Balbi
2010-03-19 15:36 ` Nishanth Menon
2010-03-19 10:14 ` [PM-WIP-OPP][PATCH 3/4] omap: pm: opp: add ability to store data per opp Cousson, Benoit
2010-03-19 14:27 ` Nishanth Menon
2010-03-19 14:43 ` Felipe Balbi
2010-03-19 15:25 ` Nishanth Menon
2010-03-19 17:47 ` Felipe Balbi
2010-03-19 18:10 ` Nishanth Menon
2010-03-21 21:50 ` Cousson, Benoit
2010-03-22 13:29 ` Nishanth Menon
2010-03-22 17:46 ` Cousson, Benoit
2010-03-22 18:25 ` Nishanth Menon
2010-03-23 5:06 ` Gopinath, Thara
2010-03-23 13:00 ` Nishanth Menon
2010-03-23 16:12 ` Cousson, Benoit
2010-03-23 20:04 ` Nishanth Menon
2010-03-18 22:49 ` [PM-WIP-OPP][PATCH 1/4] omap3: pm: cpufreq: BUG_ON cleanup Kevin Hilman
2010-03-19 14:21 ` Nishanth Menon
2010-03-19 14:50 ` Felipe Balbi
2010-03-19 17:46 ` Kevin Hilman [this message]
2010-03-19 17:52 ` Felipe Balbi
2010-03-19 18:42 ` Kevin Hilman
2010-03-19 19:56 ` Nishanth Menon
2010-03-19 20:49 ` Kevin Hilman
2010-03-19 21:53 ` Nishanth Menon
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=871vfgxkz5.fsf@deeprootsystems.com \
--to=khilman@deeprootsystems.com \
--cc=ambresh@ti.com \
--cc=b-cousson@ti.com \
--cc=eduardo.valentin@nokia.com \
--cc=ext-phil.2.carmody@nokia.com \
--cc=linux-omap@vger.kernel.org \
--cc=nm@ti.com \
--cc=premi@ti.com \
--cc=tero.kristo@nokia.com \
--cc=thara@ti.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