linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Daniel Jordan <daniel.m.jordan@oracle.com>
To: Zhang Qiao <zhangqiao22@huawei.com>
Cc: juri.lelli@redhat.com, linux-kernel@vger.kernel.org,
	mingo@redhat.com, peterz@infradead.org, pjt@google.com,
	vincent.guittot@linaro.org
Subject: Re: [PATCH -next v3] sched: Dec cfs_bandwidth_used in destroy_cfs_bandwidth()
Date: Fri, 16 Jul 2021 09:53:53 -0400	[thread overview]
Message-ID: <20210716135353.zcuth5cqzuuajc3u@oracle.com> (raw)
In-Reply-To: <20210716022756.193817-1-zhangqiao22@huawei.com>

On Fri, Jul 16, 2021 at 10:27:56AM +0800, Zhang Qiao wrote:
> cfs_bandwidth_used is a static_key to control cfs bandwidth
> feature. When adding a cfs_bandwidth group, we need increase
> the key, and decrease it when removing. But currently when we
> remove a cfs bandwidth group, we don't decrease the key and
> this switch will always be on even if there is no cfs bandwidth
> group in the system.
> 
> Fix the problem as two steps:
> 1.Rename cfs_bandwidth_usage_{dec, inc}() to
> cfs_bandwidth_usage_{dec,inc}_cpuslocked() and its caller need to
> hold the hotplug lock.
> 2.Add cfs_bandwidth_usage_dec() and its caller don't need
> to hold the hotplug lock. And when removing a cfs bandwidth group,
> we decrease cfs_bandwidth_used by calling cfs_bandwidth_usage_dec().
> 
> Fixes: 56f570e512ee ("sched: use jump labels to reduce overhead when bandwidth control is inactive")
> Signed-off-by: Zhang Qiao <zhangqiao22@huawei.com>

Reviewed-by: Daniel Jordan <daniel.m.jordan@oracle.com>

  reply	other threads:[~2021-07-16 13:54 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-06  8:38 [PATCH -next] sched: Dec __cfs_bandwith_used in destroy_cfs_bandwidth() Zhang Qiao
2021-07-12 16:26 ` Daniel Jordan
2021-07-15 11:24 ` [PATCH -next v2] sched: Dec cfs_bandwith_used " Zhang Qiao
2021-07-15 20:28   ` Daniel Jordan
2021-07-16  2:27 ` [PATCH -next v3] sched: Dec cfs_bandwidth_used " Zhang Qiao
2021-07-16 13:53   ` Daniel Jordan [this message]
2021-08-31 11:17   ` Zhang Qiao

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=20210716135353.zcuth5cqzuuajc3u@oracle.com \
    --to=daniel.m.jordan@oracle.com \
    --cc=juri.lelli@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=pjt@google.com \
    --cc=vincent.guittot@linaro.org \
    --cc=zhangqiao22@huawei.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;
as well as URLs for NNTP newsgroup(s).