linux-leds.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jacek Anaszewski <jacek.anaszewski@gmail.com>
To: Pavel Machek <pavel@ucw.cz>
Cc: linux-leds@vger.kernel.org, dmurphy@ti.com,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: ledtrig-cpu: Limit to 4 CPUs
Date: Fri, 25 Sep 2020 10:51:38 +0200	[thread overview]
Message-ID: <c60858bd-9a9f-5537-9f96-2e44db0c0d9e@gmail.com> (raw)
In-Reply-To: <db0b2dca-b7d3-8d76-cc6c-b399c1fa9921@gmail.com>

On 9/22/20 10:41 PM, Jacek Anaszewski wrote:
> Hi Pavel,
> 
> On 9/22/20 12:42 AM, Pavel Machek wrote:
>> Hi!
>>
>>>> Can I get details of your setup?
>>>
>>> I don't use this trigger, but I can imagine that someone does.
>>
>> Well, if someone exists, we can increase the limit, or convince them
>> to change their setup.
> 
> Linux is used in many commercial projects and each such change generates
> a cost, so this is not a sheer matter of convincing someone.
> 
>>>> What CPU type that is, and how are you mapping CPU activity to LEDs?
>>>
>>> The type of CPU is irrelevant here. What is important is the fact
>>> that with this trigger it is possible to visually monitor CPU core
>>> online state. Probably it would be good to ask the author of that
>>> trigger about his use case.
>>
>> It is relevant -- cpu trigger never worked on x86. I had patch fixing
>> it, but got pushback.
> 
> You mean literally x86 (32-bit)? Because I checked yesterday on my
> x86_64 and it worked just fine, i.e. changing cpu online state
> generated events on all userspace LEDs I registered for each cpuN
> trigger.
> 
>>> I have spoken up, because I don't get the reason for your patch.
>>> This driver was reworked year ago to remove PAGE_SIZE limit,
>>> and I even applied it to my for-next tree, but that was at
>>> the time of handling maintainership to yourself, and you
>>> seem to not have picked that commit.
>>>
>>> Was that intentional? We had even Greg's ack [0].
>>
>> I checked, and I believe the commit is in:
> 
> Indeed, I blindly sought the changeset in git log for ledtrig-cpu.c
> file.
> 
>> #ifdef CONFIG_LEDS_TRIGGERS
>> static BIN_ATTR(trigger, 0644, led_trigger_read, led_trigger_write,
>> 0);
>> static struct bin_attribute *led_trigger_bin_attrs[] = {
>>
>> So.. no, it is not causing kernel crashes or something. But it is
>> example of bad interface, and _that_ is causing problems. (And yes, if
>> I realized it is simply possible to limit it, maybe the BIN_ATTR
>> conversion would not be neccessary...)
> 
> The limitation you proposed breaks the trigger on many plafforms.

Actually it precludes its use.

I still see the patch in your linux-next, so I reserve myself the
right to comment on your pull request.

-- 
Best regards,
Jacek Anaszewski

  reply	other threads:[~2020-09-25  8:51 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-19  9:38 ledtrig-cpu: Limit to 4 CPUs Pavel Machek
2020-09-20 14:15 ` Jacek Anaszewski
2020-09-20 15:39   ` Marek Behun
2020-09-20 16:55     ` Jacek Anaszewski
2020-09-20 17:33       ` Marek Behun
2020-09-20 17:49         ` Jacek Anaszewski
2020-09-20 18:34   ` Pavel Machek
2020-09-21 22:14     ` Jacek Anaszewski
2020-09-21 22:42       ` Pavel Machek
2020-09-22 20:41         ` Jacek Anaszewski
2020-09-25  8:51           ` Jacek Anaszewski [this message]
2020-09-25  9:40             ` Pavel Machek
2020-09-26 13:59               ` Jacek Anaszewski
2020-10-08 10:10                 ` Pavel Machek

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=c60858bd-9a9f-5537-9f96-2e44db0c0d9e@gmail.com \
    --to=jacek.anaszewski@gmail.com \
    --cc=dmurphy@ti.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-leds@vger.kernel.org \
    --cc=pavel@ucw.cz \
    /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).