The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Peter Feuerer <peter@piie.net>
To: Andreas Mohr <andi@lisas.de>
Cc: LKML <linux-kernel@vger.kernel.org>, Borislav Petkov <bp@suse.de>,
	Zhang Rui <rui.zhang@intel.com>
Subject: Re: [PATCH 0/4] acerhdf/thermal: adding new models and appropriate governor
Date: Mon, 28 Apr 2014 01:13:19 +0200	[thread overview]
Message-ID: <cone.1398640399.709208.1804.1000@galar> (raw)
In-Reply-To: 20140427185708.GA15007@rhlx01.hs-esslingen.de

Hi,

Andreas Mohr writes:

> On Sun, Apr 27, 2014 at 03:23:31AM +0200, Peter Feuerer wrote:
>> This patch series is intended to:
>> 
>>   * Introduce "manual mode" support (Patch 1 & 2), which is needed to control
>>     the fan of a few new models.  Unfortunately this extends lines defining
>>     the bios table over 80 characters, but all other methods make the code
>>     really ugly and hard to read.  So I hope for the reason of readability it
>>     is ok to break this rule.
> 
> Hmm... got an idea there. Possibly it's time to do away with direct
> "device name" <-> open-coded config data mappings.
> After all a specific device name is not really all too meaningful,
> can (and will) be invented out of thin air, with its reg config being
> identical to (read: painfully duplicated)
> several other names/BIOS versions in the series.
> So perhaps one should have a helper struct defined,
> with instances then named as particular base samples of a model series
> (ideally named after the precise internal development code name of the series),
> to then be referenced by all model/BIOS names which match.
> 
> struct {
>   struct reg_feat_1;
>   struct reg_feat_2;
> } aao_reg_map;
> 
> static const aao_reg_map aao_reg_map_AOAxxx_Acer_orig_version;
> 
> 
> 
> 
> { "Acer", "AOA1....", &aao_reg_map_AOAxxx_Acer_orig_version },
> 
> Of course you then have the indirection of device name <-> specific
> register values (quote: "really ugly and hard to read"?),
> but IMHO that's ok since normally you wouldn't be too focused
> on looking up register values (...right!?).
> 
> And if the next interface-breaking config change came along,
> you'd otherwise have to add yet another register index pair...
> (at which point some 100+ char line monsters
> would be breathing down our neck...)

I think we have been discussing this solution a year ago or something and 
seems like it is really time to implement it.  As I wrote in the other mail 
to Boris, I'd like to just do a minor modification for now and then when 
those 4 patches have been applied concentrate on implementing the splitted 
structs.


> Model additions:
> Ain't there one MODULE_ALIAS missing?? (7 new models <-> 6 entries!?!?)
>     "Aspire One 753"? But perhaps that's already implicitly covered by
> another existing entry? [if so, the commit log did not mention it ;)]

You are right, alias for 753 is missing, will add it for the next patch set.


>>   * Add an appropriate thermal governor (Patch 3 & 4).  Manipulating and
>>     fiddling around with the step-wise governor has been a very fragile thing
>>     in the past and as it broke again, I used the opportunity to add a two
>>     point thermal governor which implements the actual fan handling required by
>>     acerhdf and puts from my point of view things straight.
> 
> I'm afraid I don't have the full picture,
> but so far it seems that this factoring out of common handling
> is a very good idea.

ok.


> -       depends on THERMAL && ACPI
> +       depends on THERMAL && ACPI && THERMAL_GOV_BANG_BANG
> Do we actively depend on THERMAL (code-wise, I mean?) Or is it now an
> implicit dependency given that we request THERMAL_GOV_BANG_BANG? If
> implicit, then THERMAL probably ought to be removed. But if we use
> generic thermal APIs (which we probably do), then of course we do have
> that dependency....

There's an implicit dependency due to the request of THERMAL_GOV_BANG_BANG, so
yes, we could remove THERMAL here.


> "bang_bang_throttle - throttles devices asscciated with the given zone"
> 
> Typo ;)

c != o, got it.


> "used to force thermal" --> misleading ("we used to do this, but it's
> bad so we better do that").
> 
> "intended to"? "established to"? "added to"? or some simpler wording?

What do you think about this wording:
/*
 * this struct is used to instruct thermal layer to use bang_bang instead of
 * default governor for acerhdf
 */


> pr_err("Thermal governor %s is not compiled into thermal subsystem\n"
>     --> you are lying here... (the only thing we can reliably indicate
>         is that we did not get the expected name -
>         so we should perhaps indicate something like we "didn't get bang-bang,
>         since perhaps not compiled into thermal subsystem").

Fixed in next submit.


>> Please test/review the patches and send me your comments.
> 
> -ENODATA (my crappy JMicron JMF601 SSD had managed to break again,
>     this time with fatal firmware corruption, so I had to reflash
>     firmware to resurrect it, but I haven't restored my environment yet,
>     but I'll obviously report back immediately if something comes up)

Ok, good luck with this.

Thanks for all the good input.

-- 
kind regards,
--peter;

  reply	other threads:[~2014-04-27 23:13 UTC|newest]

Thread overview: 97+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-27  1:23 [PATCH 0/4] acerhdf/thermal: adding new models and appropriate governor Peter Feuerer
2014-04-27  1:23 ` [PATCH 1/4] acerhdf: Adding support for "manual mode" Peter Feuerer
2014-04-27 21:03   ` Borislav Petkov
2014-04-27 22:22     ` Peter Feuerer
2014-04-27  1:23 ` [PATCH 2/4] acerhdf: Adding support for new models Peter Feuerer
2014-04-27  1:23 ` [PATCH 3/4] thermal: Added Bang-bang thermal governor Peter Feuerer
2014-04-27  1:23 ` [PATCH 4/4] acerhdf: Use bang-bang " Peter Feuerer
2014-04-27 18:57 ` [PATCH 0/4] acerhdf/thermal: adding new models and appropriate governor Andreas Mohr
2014-04-27 23:13   ` Peter Feuerer [this message]
2014-04-28  4:58     ` Andreas Mohr
2014-04-29  9:17 ` [PATCH v2 " Peter Feuerer
2014-04-29  9:17   ` [PATCH v2 1/4] acerhdf: Adding support for "manual mode" Peter Feuerer
2014-04-29  9:17   ` [PATCH v2 2/4] acerhdf: Adding support for new models Peter Feuerer
2014-04-29  9:17   ` [PATCH v2 3/4] thermal: Added Bang-bang thermal governor Peter Feuerer
2014-04-29 15:53     ` Javi Merino
2014-04-29 16:37       ` Peter Feuerer
2014-04-29 21:31         ` Peter Feuerer
2014-04-30  9:01           ` Javi Merino
2014-04-29  9:17   ` [PATCH v2 4/4] acerhdf: Use bang-bang " Peter Feuerer
2014-04-29 16:00     ` Javi Merino
2014-04-29 16:43       ` Peter Feuerer
2014-05-01 18:36   ` [PATCH v2 0/4] acerhdf/thermal: adding new models and appropriate governor Peter Feuerer
2014-05-03 17:59 ` [PATCH v3 0/6] acerhdf/thermal: adding new models, appropriate governor and minor clean up Peter Feuerer
2014-05-03 17:59   ` [PATCH v3 1/6] acerhdf: Adding support for "manual mode" Peter Feuerer
2014-07-17  9:44     ` Borislav Petkov
2014-05-03 17:59   ` [PATCH v3 2/6] acerhdf: Adding support for new models Peter Feuerer
2014-07-17  9:46     ` Borislav Petkov
2014-07-18 16:06       ` Peter Feuerer
2014-07-18 16:17         ` Borislav Petkov
2014-07-18 16:25           ` Peter Feuerer
2014-05-03 17:59   ` [PATCH v3 3/6] thermal: Added Bang-bang thermal governor Peter Feuerer
2014-07-17  9:58     ` Borislav Petkov
2014-07-18 16:24       ` Peter Feuerer
2014-05-03 17:59   ` [PATCH v3 4/6] acerhdf: Use bang-bang " Peter Feuerer
2014-05-06 10:50     ` Javi Merino
2014-05-12 10:27       ` Peter Feuerer
2014-05-12 12:03         ` Javi Merino
2014-05-03 17:59   ` [PATCH v3 5/6] acerhdf: added critical trip point Peter Feuerer
2014-05-03 17:59   ` [PATCH v3 6/6] acerhdf: minor clean up Peter Feuerer
2014-07-17 10:12     ` Borislav Petkov
2014-05-15 16:05   ` [PATCH v3 0/6] acerhdf/thermal: adding new models, appropriate governor and " Eduardo Valentin
2014-05-15 22:53     ` Peter Feuerer
2014-06-15 22:39       ` Felix Deichmann
2014-07-30 13:16       ` Eduardo Valentin
2014-07-16 22:24   ` Borislav Petkov
2014-07-16 22:34     ` Peter Feuerer
2014-07-17  8:46       ` Borislav Petkov
2014-07-20  0:51 ` [PATCH v4 " Peter Feuerer
2014-07-20  0:51   ` [PATCH v4 1/6] acerhdf: Adding support for "manual mode" Peter Feuerer
2014-07-20  8:04     ` Andreas Mohr
2014-07-20 10:42       ` Peter Feuerer
2014-07-20 20:20         ` Andreas Mohr
2014-07-20  0:51   ` [PATCH v4 2/6] acerhdf: Adding support for new models Peter Feuerer
2014-07-20  0:51   ` [PATCH v4 3/6] thermal: Added Bang-bang thermal governor Peter Feuerer
2014-07-21  9:29     ` Borislav Petkov
2014-07-21  9:37       ` Zhang Rui
2014-07-21  9:40       ` Zhang Rui
2014-07-22 14:59         ` Peter Feuerer
2014-07-22 16:09           ` Borislav Petkov
2014-07-20  0:51   ` [PATCH v4 4/6] acerhdf: Use bang-bang " Peter Feuerer
2014-07-21 10:23     ` Borislav Petkov
2014-07-20  0:51   ` [PATCH v4 5/6] acerhdf: added critical trip point Peter Feuerer
2014-07-20  0:51   ` [PATCH v4 6/6] acerhdf: minor clean up Peter Feuerer
2014-07-22 15:37 ` [PATCH v5 0/6] acerhdf/thermal: adding new models, appropriate governor and " Peter Feuerer
2014-07-22 15:37   ` [PATCH v5 1/6] acerhdf: Adding support for "manual mode" Peter Feuerer
2014-07-22 15:37   ` [PATCH v5 2/6] acerhdf: Adding support for new models Peter Feuerer
2014-07-22 15:37   ` [PATCH v5 3/6] thermal: Added Bang-bang thermal governor Peter Feuerer
2014-07-26 14:14     ` Peter Feuerer
2014-07-28  2:26       ` Zhang Rui
2014-10-21 10:29         ` Peter Feuerer
2014-10-28 19:33           ` Peter Feuerer
2014-10-29  9:44             ` Javi Merino
2014-10-29 10:14               ` Peter Feuerer
2014-07-22 15:37   ` [PATCH v5 4/6] acerhdf: Use bang-bang " Peter Feuerer
2014-08-27  7:48     ` Zhang Rui
2014-08-27  8:01       ` Peter Feuerer
2014-08-28  1:17         ` Zhang Rui
2014-08-28  6:05           ` Borislav Petkov
2014-07-22 15:37   ` [PATCH v5 5/6] acerhdf: added critical trip point Peter Feuerer
2014-07-26 14:16     ` Peter Feuerer
2014-07-22 15:37   ` [PATCH v5 6/6] acerhdf: minor clean up Peter Feuerer
2014-11-28 14:20 ` [RESEND PATCH v5 0/5] acerhdf: adding new models, appropriate governor and " Peter Feuerer
2014-11-28 14:20   ` [RESEND PATCH v5 1/5] acerhdf: Adding support for "manual mode" Peter Feuerer
2014-11-28 14:20   ` [RESEND PATCH v5 2/5] acerhdf: Adding support for new models Peter Feuerer
2014-11-28 14:20   ` [RESEND PATCH v5 3/5] acerhdf: Use bang-bang thermal governor Peter Feuerer
2014-12-03  9:04     ` Darren Hart
2014-12-04  7:10       ` Peter Feuerer
2014-12-04  7:21         ` Peter Feuerer
2014-12-04 11:40           ` Darren Hart
2014-12-08  7:45           ` Peter Feuerer
2014-12-04 11:18             ` Darren Hart
2014-11-28 14:20   ` [RESEND PATCH v5 4/5] acerhdf: added critical trip point Peter Feuerer
2014-12-03  9:08     ` Darren Hart
2014-11-28 14:20   ` [RESEND PATCH v5 5/5] acerhdf: minor clean up Peter Feuerer
2014-12-03 21:46   ` [RESEND PATCH v5 0/5] acerhdf: adding new models, appropriate governor and " Peter Feuerer
2014-12-11  4:27   ` Darren Hart
2014-12-11  4:59   ` Darren Hart

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=cone.1398640399.709208.1804.1000@galar \
    --to=peter@piie.net \
    --cc=andi@lisas.de \
    --cc=bp@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rui.zhang@intel.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