From: Shashank Balaji <shashank.mahadasyam@sony.com>
To: "Michal Koutný" <mkoutny@suse.com>
Cc: Tejun Heo <tj@kernel.org>, Johannes Weiner <hannes@cmpxchg.org>,
Shuah Khan <shuah@kernel.org>,
cgroups@vger.kernel.org, linux-kselftest@vger.kernel.org,
linux-kernel@vger.kernel.org,
Shinya Takumi <shinya.takumi@sony.com>
Subject: Re: [PATCH v2] selftests/cgroup: improve the accuracy of cpu.max tests
Date: Fri, 4 Jul 2025 18:07:12 +0900 [thread overview]
Message-ID: <aGeZwLAuysAmyX-q@JPC00244420> (raw)
In-Reply-To: <wnoymxwdikh6iawrcvhewq6er4si75oqzjdbibhl6n57swq3ff@glkzfmbaots7>
Hi Michal,
On Fri, Jul 04, 2025 at 10:59:15AM +0200, Michal Koutný wrote:
> On Fri, Jul 04, 2025 at 03:49:58PM +0900, Shashank Balaji <shashank.mahadasyam@sony.com> wrote:
> > > 1. We don't need to separately check user_usec because it'll always be
> > > less than user_usec^W usage_usec, and usage_usec is what's directly
> > > affected by throttling.
>
> When kernel is not preemptible, I'd expect the system time may more
> easily excess the quota, so I considered the user_usage check less prone
> to false results. But...
>
> > > 2. I changed the >= to > because, not that it'll ever happen, but we can
> > > let usage_usec = expected_usage_usec pass. Afterall, it's called
> > > "expected" for a reason.
> >
> > Hmm, here is something interesting. The following patch adds printfs to the
> > existing code to see what user_usec, usage_usec, the expected_usage_usec used in
> > the code, and the theoretical expected_usage_usec are. On running the modified test
> > a couple of times, here is the output:
>
> ...thanks for checking. I was misled by the previous test implementation
> (the expected_usage_usec had no relation to actual throttled usage in
> there). What you observe is thus likely explained by the default
> sched_cfs_bandwidth_slice (5 times the tested quota) and CONFIG_HZ.
>
> So I'd say keep only the two-sided tolerant check. (I want to avoid the
> test to randomly fail when there's no gaping issue.)
Yep, patch v2 is doing just that. So, I assume I have your Acked-by?
Thanks
Shashank
next prev parent reply other threads:[~2025-07-04 9:07 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-01 14:13 [PATCH 0/2] selftests/cgroup: better bound for cpu.max tests Shashank Balaji
2025-07-01 14:13 ` [PATCH 1/2] selftests/cgroup: rename `expected` to `duration` in " Shashank Balaji
2025-07-01 14:13 ` [PATCH 2/2] selftests/cgroup: better bound " Shashank Balaji
2025-07-02 12:34 ` [PATCH 0/2] selftests/cgroup: better bound for " Michal Koutný
2025-07-03 1:41 ` Shashank Balaji
2025-07-03 8:54 ` Michal Koutný
2025-07-03 12:03 ` [PATCH v2] selftests/cgroup: improve the accuracy of " Shashank Balaji
2025-07-03 15:58 ` Michal Koutný
2025-07-04 0:26 ` Shashank Balaji
2025-07-04 6:49 ` Shashank Balaji
2025-07-04 8:59 ` Michal Koutný
2025-07-04 9:07 ` Shashank Balaji [this message]
2025-07-04 9:15 ` Shashank Balaji
2025-07-04 9:41 ` Michal Koutný
2025-07-04 11:08 ` [PATCH v3] selftests/cgroup: fix " Shashank Balaji
2025-07-11 0:21 ` Shashank Balaji
2025-07-17 18:12 ` Tejun Heo
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=aGeZwLAuysAmyX-q@JPC00244420 \
--to=shashank.mahadasyam@sony.com \
--cc=cgroups@vger.kernel.org \
--cc=hannes@cmpxchg.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=mkoutny@suse.com \
--cc=shinya.takumi@sony.com \
--cc=shuah@kernel.org \
--cc=tj@kernel.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