From: Hao Jia <jiahao.os@bytedance.com>
To: "Michal Koutný" <mkoutny@suse.com>
Cc: tj@kernel.org, lizefan.x@bytedance.com, hannes@cmpxchg.org,
cgroups@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [External] Re: [PATCH] cgroup: rstat: Simplified cgroup_base_stat_flush() update last_bstat logic
Date: Mon, 12 Jun 2023 11:13:41 +0800 [thread overview]
Message-ID: <d6d19a61-a584-1839-e6cc-ea63479ca800@bytedance.com> (raw)
In-Reply-To: <remnwctqmxleig7ywt6puhxnpmzjo7xm6hlfhpnul46ulfnw7j@36sbuxhuatto>
On 2023/5/24 Michal Koutný wrote:
> On Wed, May 24, 2023 at 02:54:10PM +0800, Hao Jia <jiahao.os@bytedance.com> wrote:
>> Yes, so we need @curr to record the bstat value after the sequence fetch is
>> completed.
>
> No, I still don't see a problem that it solves. If you find incorrect
> data being reported, please explain it more/with an example.
>
>> Yes, but it may not be obvious.
>> Another reason is that when we complete an update, we snapshot last_bstat as
>> the current bstat, which is better for readers to understand. Arithmetics is
>> somewhat obscure.
>
> The readability here is subjective. It'd be interesting to have some
> data comparing arithmetics vs copying though.
>
Sorry for replying you so late. I am using RDTSC on my machine (an Intel
Xeon(R) Platinum 8260 CPU@2.40GHz machine with 2 NUMA nodes each of
which has 24 cores with SMT2 enabled, so 96 CPUs in total.) to compare
the time consumption of arithmetics vs copying. There is almost no
difference in the time consumption between arithmetics and copying.
> HTH,
> Michal
next prev parent reply other threads:[~2023-06-12 3:14 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-18 12:41 Hao Jia
2023-05-19 4:15 ` Hao Jia
2023-05-23 15:14 ` Michal Koutný
2023-05-24 6:54 ` [External] " Hao Jia
2023-05-24 8:02 ` Michal Koutný
2023-05-24 8:41 ` Hao Jia
2023-06-12 3:13 ` Hao Jia [this message]
2023-06-13 11:52 ` Michal Koutný
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=d6d19a61-a584-1839-e6cc-ea63479ca800@bytedance.com \
--to=jiahao.os@bytedance.com \
--cc=cgroups@vger.kernel.org \
--cc=hannes@cmpxchg.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lizefan.x@bytedance.com \
--cc=mkoutny@suse.com \
--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
all inboxes | Powered by JetHome®