Linux Power Management development
 help / color / mirror / Atom feed
From: Christian Loehle <christian.loehle@arm.com>
To: Juri Lelli <juri.lelli@redhat.com>
Cc: "Rafael J. Wysocki" <rafael@kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	linux-pm <linux-pm@vger.kernel.org>,
	Qais Yousef <qyousef@layalina.io>, Ingo Molnar <mingo@redhat.com>,
	Viresh Kumar <viresh.kumar@linaro.org>,
	Dietmar Eggemann <dietmar.eggemann@arm.com>,
	Pierre Gondois <pierre.gondois@arm.com>
Subject: Re: [PATCH] cpufreq/schedutil: Only bind threads if needed
Date: Wed, 25 Sep 2024 10:36:51 +0100	[thread overview]
Message-ID: <cf17f56c-0f64-44ef-8cd1-8d57ddcf4668@arm.com> (raw)
In-Reply-To: <ZvPGacuDDXNa5k62@jlelli-thinkpadt14gen4.remote.csb>

On 9/25/24 09:14, Juri Lelli wrote:
> Hi,
> 
> On 12/09/24 17:01, Christian Loehle wrote:
>> On 9/12/24 16:41, Rafael J. Wysocki wrote:
>>> On Thu, Sep 12, 2024 at 3:53 PM Christian Loehle
> 
> ...
> 
>>>> diff --git a/kernel/sched/syscalls.c b/kernel/sched/syscalls.c
>>>> index c62acf509b74..7d4a4edfcfb9 100644
>>>> --- a/kernel/sched/syscalls.c
>>>> +++ b/kernel/sched/syscalls.c
>>>> @@ -1159,6 +1159,9 @@ int dl_task_check_affinity(struct task_struct *p, const struct cpumask *mask)
>>>>         if (!task_has_dl_policy(p) || !dl_bandwidth_enabled())
>>>>                 return 0;
>>>>
>>>> +       if (dl_entity_is_special(&p->dl))
>>>> +               return 0;
>>>> +
>>>
>>> Care to explain this particular piece?
>>
>> Looks suspicious but the truncated comment below explains it:
>> 	/*
>> 	 * Since bandwidth control happens on root_domain basis,
>> 	 * if admission test is enabled, we only admit -deadline
>> 	 * tasks allowed to run on all the CPUs in the task's
>> 	 * root_domain.
>> 	 */
>> So that would only allow setting it to all CPUs for the relevant
>> platforms unfortunately.
>>
>> That should be fine though since the sugov task is pretty much
>> a dummy in terms of bandwidth / admission control internally, so
>> no harm done to not enforce this when userspace wants to set
>> affinities.
>> ...Unless Juri disagrees.
> 
> Nope, I agree. :)
> 
> Wonder if we should put a comment along the lines of what you said above
> right above the new conditions (so that people will not need to wonder
> about it in the future). But not a strict requirement for me.
> 
> Thanks! (and apologies for the delay in replying)
> Juri

Thank you Juri for taking a look. I agree with the comment, will
do a v2.
Regards,
Christian

  reply	other threads:[~2024-09-25  9:36 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-12 13:53 [PATCH] cpufreq/schedutil: Only bind threads if needed Christian Loehle
2024-09-12 15:41 ` Rafael J. Wysocki
2024-09-12 16:01   ` Christian Loehle
2024-09-25  8:14     ` Juri Lelli
2024-09-25  9:36       ` Christian Loehle [this message]
2024-10-01 10:00   ` Viresh Kumar
2024-09-12 16:58 ` Christian Loehle
  -- strict thread matches above, loose matches on Subject: below --
2025-01-20 10:09 Christian Loehle
2025-01-23 20:10 ` Rafael J. Wysocki

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=cf17f56c-0f64-44ef-8cd1-8d57ddcf4668@arm.com \
    --to=christian.loehle@arm.com \
    --cc=dietmar.eggemann@arm.com \
    --cc=juri.lelli@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=pierre.gondois@arm.com \
    --cc=qyousef@layalina.io \
    --cc=rafael@kernel.org \
    --cc=viresh.kumar@linaro.org \
    /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