linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: "Michal Koutný" <mkoutny@suse.com>
To: JP Kobryn <inwardvessel@gmail.com>
Cc: tj@kernel.org, shakeel.butt@linux.dev, yosryahmed@google.com,
	 hannes@cmpxchg.org, akpm@linux-foundation.org,
	linux-mm@kvack.org,  cgroups@vger.kernel.org,
	kernel-team@meta.com
Subject: Re: [PATCH 2/4 v3] cgroup: use separate rstat trees for each subsystem
Date: Mon, 24 Mar 2025 18:48:01 +0100	[thread overview]
Message-ID: <lkrhbbdiuymh555eaibf3ziifi2dtx467buysiya77uuz4e22m@d27xvpj5l6o3> (raw)
In-Reply-To: <20250319222150.71813-3-inwardvessel@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1614 bytes --]

On Wed, Mar 19, 2025 at 03:21:48PM -0700, JP Kobryn <inwardvessel@gmail.com> wrote:
> --- a/kernel/cgroup/cgroup.c
> +++ b/kernel/cgroup/cgroup.c
> @@ -161,10 +161,12 @@ static struct static_key_true *cgroup_subsys_on_dfl_key[] = {
>  };
>  #undef SUBSYS
>  
> -static DEFINE_PER_CPU(struct cgroup_rstat_cpu, cgrp_dfl_root_rstat_cpu);
> +static DEFINE_PER_CPU(struct css_rstat_cpu, root_self_rstat_cpu);

root_base_rstat_cpu
cgrp_dfl_root_base_rstat_cpu

(not a big deal, it's only referenced once next to definition)

> --- a/kernel/cgroup/rstat.c
> +++ b/kernel/cgroup/rstat.c
...
> -static struct cgroup *cgroup_rstat_push_children(struct cgroup *head,
> -						 struct cgroup *child, int cpu)
> +static struct cgroup_subsys_state *cgroup_rstat_push_children(
> +		struct cgroup_subsys_state *head,
> +		struct cgroup_subsys_state *child, int cpu)

Forgotten rename?

> diff --git a/tools/testing/selftests/bpf/progs/btf_type_tag_percpu.c b/tools/testing/selftests/bpf/progs/btf_type_tag_percpu.c
> index 38f78d9345de..f362f7d41b9e 100644
> --- a/tools/testing/selftests/bpf/progs/btf_type_tag_percpu.c
> +++ b/tools/testing/selftests/bpf/progs/btf_type_tag_percpu.c
> @@ -45,7 +45,7 @@ int BPF_PROG(test_percpu2, struct bpf_testmod_btf_type_tag_2 *arg)
>  SEC("tp_btf/cgroup_mkdir")
>  int BPF_PROG(test_percpu_load, struct cgroup *cgrp, const char *path)
>  {
> -       g = (__u64)cgrp->rstat_cpu->updated_children;
> +       g = (__u64)cgrp->self.rstat_cpu->updated_children;
>         return 0;
>  }

There are also some comments above needing an update.


Michal

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

  parent reply	other threads:[~2025-03-24 17:48 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-19 22:21 [PATCH 0/4 v3] cgroup: separate rstat trees JP Kobryn
2025-03-19 22:21 ` [PATCH 1/4 v3] cgroup: use separate rstat api for bpf programs JP Kobryn
2025-03-24 17:47   ` Michal Koutný
2025-03-25 18:03     ` JP Kobryn
2025-03-26  0:39       ` Yosry Ahmed
2025-03-19 22:21 ` [PATCH 2/4 v3] cgroup: use separate rstat trees for each subsystem JP Kobryn
2025-03-20 21:31   ` Tejun Heo
2025-03-21 17:22     ` JP Kobryn
2025-03-24 17:48   ` Michal Koutný [this message]
2025-03-19 22:21 ` [PATCH 3/4 v3] cgroup: use subsystem-specific rstat locks to avoid contention JP Kobryn
2025-03-20 21:38   ` Tejun Heo
2025-03-24 17:48   ` Michal Koutný
2025-03-19 22:21 ` [PATCH 4/4 v3] cgroup: save memory by splitting cgroup_rstat_cpu into compact and full versions JP Kobryn
2025-03-20 21:44   ` Tejun Heo
2025-03-21 17:45     ` JP Kobryn
2025-03-24 17:49       ` Michal Koutný
2025-03-25 13:55       ` Shakeel Butt

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=lkrhbbdiuymh555eaibf3ziifi2dtx467buysiya77uuz4e22m@d27xvpj5l6o3 \
    --to=mkoutny@suse.com \
    --cc=akpm@linux-foundation.org \
    --cc=cgroups@vger.kernel.org \
    --cc=hannes@cmpxchg.org \
    --cc=inwardvessel@gmail.com \
    --cc=kernel-team@meta.com \
    --cc=linux-mm@kvack.org \
    --cc=shakeel.butt@linux.dev \
    --cc=tj@kernel.org \
    --cc=yosryahmed@google.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