The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Shuah Khan <skhan@linuxfoundation.org>
To: "Mateusz Jaśkiewicz" <jaskiewiczteo@gmail.com>,
	"John B . Wyatt IV" <jwyatt@redhat.com>,
	"John Kacur" <jkacur@redhat.com>,
	"Thomas Renninger" <trenn@suse.com>
Cc: linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org,
	Shuah Khan <skhan@linuxfoundation.org>
Subject: Re: [PATCH v4] cpupower: Implement powercap enabled setters
Date: Thu, 18 Jun 2026 09:23:49 -0600	[thread overview]
Message-ID: <a376a0c4-8fb7-406c-84be-5adce388398a@linuxfoundation.org> (raw)
In-Reply-To: <CA+Z_OmRN0bFXCxRg4SVNP-M0v6G2cME0HszPNyHhP5w7ti2Usw@mail.gmail.com>

On 6/17/26 22:18, Mateusz Jaśkiewicz wrote:
>  > So when you tried to write it worked looks like. The new
> 

Please follow the kernel mailing list convention of posting
at the bottom of the message you are replying you instead
adding your response at the top. You can find the details
in the kernel documentation.

> What I meant by "silent failure" is the situation, when we call a function and it just returns success without doing anything (the situation with current implementation).



> 
> 
>  > value is 1 - what was it before you ran echo 1?
> 
> It was 0 before. That being said there are zones that after writing 0 to them remained 1. Should I add check for this and fail if the value remains unchanged despite intention?

Okay so in this case it worked the way it should and the
value changed. When writing 0 (echo 0) to the file, did
you see a message that says "not supported"

I would like to see an concrete use-case for adding the
set enable API. We added this stub when SWIG support was
added.

powercap_set_enabled() could return ENOTSUPP instead of
0 if we don't have a concrete use-case that uses this
API.

Also if you are looking to improve things cpupower,
looks like sysfs_read_file() could be improved. The
return values are inconsistent and confusing. In some
return values aren't checked.

thanks,
-- Shuah

      parent reply	other threads:[~2026-06-18 15:23 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-08 22:35 [PATCH] cpupower: Implement powercap enabled setters Mateusz Jaśkiewicz
2026-05-11 21:01 ` Shuah Khan
2026-05-12 16:11   ` [PATCH v2] " Mateusz Jaśkiewicz
2026-05-14 21:28     ` Shuah Khan
2026-05-26 19:53     ` Shuah Khan
2026-05-27  8:12       ` [PATCH v3] " Mateusz Jaśkiewicz
2026-05-27 15:26         ` Shuah Khan
2026-05-28 15:32           ` [PATCH v4] " Mateusz Jaśkiewicz
2026-06-03 18:17             ` Shuah Khan
     [not found]               ` <CA+Z_OmTMGTib=eCEGNhCbd=7pmR8Zq7cResyRb=v_wWyRoEdfg@mail.gmail.com>
     [not found]                 ` <e056d7f2-935f-4efd-bdef-d0f696026d7b@linuxfoundation.org>
     [not found]                   ` <CA+Z_OmRN0bFXCxRg4SVNP-M0v6G2cME0HszPNyHhP5w7ti2Usw@mail.gmail.com>
2026-06-18 15:23                     ` Shuah Khan [this message]

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=a376a0c4-8fb7-406c-84be-5adce388398a@linuxfoundation.org \
    --to=skhan@linuxfoundation.org \
    --cc=jaskiewiczteo@gmail.com \
    --cc=jkacur@redhat.com \
    --cc=jwyatt@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=trenn@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