public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Vishal Chourasia <vishalc@linux.ibm.com>
To: Cheng Yu <serein.chengyu@huawei.com>
Cc: mingo@redhat.com, peterz@infradead.org, juri.lelli@redhat.com,
	vincent.guittot@linaro.org, dietmar.eggemann@arm.com,
	rostedt@goodmis.org, bsegall@google.com, mgorman@suse.de,
	bristot@redhat.com, vschneid@redhat.com,
	changhuaixin@linux.alibaba.com, shanpeic@linux.alibaba.com,
	dtcccc@linux.alibaba.com, tj@kernel.org,
	linux-kernel@vger.kernel.org, zhangqiao22@huawei.com,
	judy.chenhui@huawei.com, yusongping@huawei.com,
	zhaowenhui8@huawei.com, liaoqixin@huawei.com
Subject: Re: [PATCH 0/2] cgroup cpu: set burst to zero when cfs bandwidth is
Date: Fri, 24 May 2024 16:22:39 +0530	[thread overview]
Message-ID: <ZlBxUB-bQ2lvxumP@linux.ibm.com> (raw)
In-Reply-To: <20240522031007.643498-1-serein.chengyu@huawei.com>

On Wed, May 22, 2024 at 11:10:05AM +0800, Cheng Yu wrote:
> In the cgroup cpu subsystem, when we remove the restriction on cfs
> bandwidth, the burst feature is also turned off. At that time, we expect
> that the value of burst is zero.
> 
> Patch 1 fixes it in cgroup v1 by Zhao Wenhui and patch 2 fixes it in
> cgroup v2.
> 
> Cheng Yu (1):
>   sched/fair: set burst to zero when set max to cpu.max
> 
> Zhao Wenhui (1):
>   sched/fair: limit burst to zero when cfs bandwidth is turned off
> 

## Before patch
# uname -r
6.9.0-12124-g6d69b6c12fce-dirty
# mkdir test
# cd test/
# cat cpu.max cpu.max.burst
max 100000
0
# echo 10000000 > cpu.max.burst
# echo 1000000000000 > cpu.max.burst
# cat cpu.max cpu.max.burst
max 100000
1000000000000
# echo "1000 100000" > cpu.max
-bash: echo: write error: Invalid argument
# echo 1000 > cpu.max.burst
# echo "1000 100000" > cpu.max
# cat cpu.max cpu.max.burst
1000 100000
1000

## After patch

# uname -r
6.9.0-12126-g7eb1a247b675-dirty
# mkdir test
# cd test/
# cat cpu.max cpu.max.burst
max 100000
0
# echo 1134535435 > cpu.max.burst
-bash: echo: write error: Invalid argument
# echo 1 > cpu.max.burst
-bash: echo: write error: Invalid argument
# echo -1 > cpu.max.burst
-bash: echo: write error: Invalid argument
# echo "10000 100000" > cpu.max
# echo 1000 > cpu.max.burst
# cat cpu.max cpu.max.burst
10000 100000
1000
# echo "max 100000" > cpu.max
# cat cpu.max cpu.max.burst
max 100000
0

# git log --oneline
7eb1a247b6753 (HEAD) sched/fair: set burst to zero when set max to cpu.max
421647086da9e sched/fair: limit burst to zero when cfs bandwidth is turned off
6d69b6c12fce4 (origin/master, origin/HEAD, master) Merge tag 'nfs-for-6.10-1' o

Now, the burst value can only be set after setting 
the quota. This change also prevents setting excessively
large burst values.

Thank you the fix.

Tested-by: Vishal Chourasia <vishalc@linux.ibm.com>

>  kernel/sched/core.c | 15 +++++++++++++--
>  1 file changed, 13 insertions(+), 2 deletions(-)
> 
> -- 
> 2.25.1
> 

      parent reply	other threads:[~2024-05-24 10:53 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-22  3:10 [PATCH 0/2] cgroup cpu: set burst to zero when cfs bandwidth is Cheng Yu
2024-05-22  3:10 ` [PATCH 1/2] sched/fair: limit burst to zero when cfs bandwidth is turned off Cheng Yu
2024-05-22  3:10 ` [PATCH 2/2] sched/fair: set burst to zero when set max to cpu.max Cheng Yu
2024-05-28 23:10   ` Benjamin Segall
2024-05-29  6:20     ` Cheng Yu
2024-05-24 10:52 ` Vishal Chourasia [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=ZlBxUB-bQ2lvxumP@linux.ibm.com \
    --to=vishalc@linux.ibm.com \
    --cc=bristot@redhat.com \
    --cc=bsegall@google.com \
    --cc=changhuaixin@linux.alibaba.com \
    --cc=dietmar.eggemann@arm.com \
    --cc=dtcccc@linux.alibaba.com \
    --cc=judy.chenhui@huawei.com \
    --cc=juri.lelli@redhat.com \
    --cc=liaoqixin@huawei.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mgorman@suse.de \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.org \
    --cc=serein.chengyu@huawei.com \
    --cc=shanpeic@linux.alibaba.com \
    --cc=tj@kernel.org \
    --cc=vincent.guittot@linaro.org \
    --cc=vschneid@redhat.com \
    --cc=yusongping@huawei.com \
    --cc=zhangqiao22@huawei.com \
    --cc=zhaowenhui8@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