From: Guenter Roeck <linux@roeck-us.net>
To: "Pali Rohár" <pali.rohar@gmail.com>
Cc: "Jan C Peters" <jcpeters89@gmail.com>,
"Thorsten Leemhuis" <fedora@leemhuis.info>,
"David Santamaría Rogado" <howl.nsp@gmail.com>,
"Peter Saunderson" <peteasa@gmail.com>,
"Jean Delvare" <jdelvare@suse.com>,
"Tolga Cakir" <cevelnet@gmail.com>,
linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] dell-smm-hwmon: Cache fan_type() calls and use fan_status() for fan detection
Date: Mon, 13 Jun 2016 19:02:14 -0700 [thread overview]
Message-ID: <575F65A6.5070700@roeck-us.net> (raw)
In-Reply-To: <201606132052.22116@pali>
On 06/13/2016 11:52 AM, Pali Rohár wrote:
> On Sunday 22 May 2016 02:28:00 Pali Rohár wrote:
>> On Sunday 22 May 2016 02:19:48 Guenter Roeck wrote:
>>> On 05/21/2016 07:46 AM, Pali Rohár wrote:
>>>> On more Dell machines (e.g. Dell Precision M3800)
>>>> I8K_SMM_GET_FAN_TYPE call is too expensive (CPU is too long in
>>>> SMM mode) and cause kernel to hang. This patch cache type for
>>>> each fan (as it should not change) and change the way how fan
>>>> presense is detected. It revert and use function fan_status() as
>>>> was before commit f989e55452c7 ("i8k: Add support for fan
>>>> labels").
>>>>
>>>> Moreover, kernel hangs for 2 - 3 seconds only sometimes and only
>>>> on some Dell machines. When kernel hangs fan speed is at max. So
>>>> it was hard to debug and bisect where is root of this problem.
>>>> It looks like this is bug in Dell BIOS which implement fan type
>>>> SMM code... and there is no way how to fix it in kernel.
>>>>
>>>> Signed-off-by: Pali Rohár <pali.rohar@gmail.com>
>>>> Reviewed-by: Jean Delvare <jdelvare@suse.de>
>>>> Reported-and-tested-by: Tolga Cakir <cevelnet@gmail.com>
>>>> Fixes: f989e55452c7 ("i8k: Add support for fan labels")
>>>> Link: https://bugzilla.kernel.org/show_bug.cgi?id=112021
>>>> Link: https://bugzilla.kernel.org/show_bug.cgi?id=100121
>>>> Cc: stable@vger.kernel.org # v4.0+, will need backport
>>>
>>> Should this patch be applied, or do you wait for more testing ?
>>
>> I would like to hear some confirmation from people with affected
>> machine.
>>
>
> Ok, now after testing we know that kernel should prevent calling
> I8K_SMM_GET_FAN_TYPE on affected buggy Dell machines.
>
> Looks like there are two different bugs in Dell SMM with
> I8K_SMM_GET_FAN_TYPE call.
>
> First bug cause that kernel freeze for 2 - 3 seconds when
> I8K_SMM_GET_FAN_TYPE is issued.
>
> Second bug cause that fan goes randomly up and down (that is controlled
> by Dell SMM) when I8K_SMM_GET_FAN_TYPE is issued. Normal behaviour is
> returned after machine reboots.
>
> Some Dell machines are affected by first bug, some by second bug. And
> there are Dell machines without both bugs.
>
> This my patch just partially fix first bug and prevent calling that call
> at boot time. But can be issued by sysfs (+value is cached, so it is
> called only once).
>
> So question is: is my patch enough for fixing first bug?
>
> And second question: how to fix second bug? I see only one option:
> Create machine blacklist with broken Dell SMM firmware and disallow
> calling I8K_SMM_GET_FAN_TYPE for them.
>
Or maybe a whitelist with known working systems ?
Guenter
next prev parent reply other threads:[~2016-06-14 2:02 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-21 14:46 [PATCH] dell-smm-hwmon: Cache fan_type() calls and use fan_status() for fan detection Pali Rohár
2016-05-22 0:19 ` Guenter Roeck
2016-05-22 0:28 ` Pali Rohár
2016-06-13 18:52 ` Pali Rohár
2016-06-14 2:02 ` Guenter Roeck [this message]
2016-06-15 8:03 ` Pali Rohár
2016-05-26 15:39 ` Thorsten Leemhuis
2016-05-26 15:51 ` Pali Rohár
2016-05-27 8:00 ` Thorsten Leemhuis
2016-05-27 9:47 ` Pali Rohár
2016-05-27 10:01 ` Thorsten Leemhuis
2016-05-27 10:45 ` Pali Rohár
2016-05-27 13:05 ` Thorsten Leemhuis
2016-05-27 13:21 ` Pali Rohár
2016-05-29 19:27 ` Peter Saunderson
2016-05-30 9:36 ` Pali Rohár
2016-05-30 16:25 ` Peter Saunderson
2016-06-02 13:06 ` Pali Rohár
2016-05-30 11:45 ` Thorsten Leemhuis
2016-06-13 18:30 ` Pali Rohár
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=575F65A6.5070700@roeck-us.net \
--to=linux@roeck-us.net \
--cc=cevelnet@gmail.com \
--cc=fedora@leemhuis.info \
--cc=howl.nsp@gmail.com \
--cc=jcpeters89@gmail.com \
--cc=jdelvare@suse.com \
--cc=linux-hwmon@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pali.rohar@gmail.com \
--cc=peteasa@gmail.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