linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Michal Hocko <mhocko@suse.com>
To: Johannes Weiner <hannes@cmpxchg.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Roman Gushchin <roman.gushchin@linux.dev>,
	Shakeel Butt <shakeel.butt@linux.dev>,
	Muchun Song <muchun.song@linux.dev>,
	linux-mm@kvack.org, cgroups@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] mm: memcontrol: move stray ratelimit bits to v1
Date: Mon, 27 Jan 2025 13:51:11 +0100	[thread overview]
Message-ID: <Z5eBP_N4k_kBad8L@tiehlicka> (raw)
In-Reply-To: <20250124043859.18808-2-hannes@cmpxchg.org>

On Thu 23-01-25 23:38:59, Johannes Weiner wrote:
> 41213dd0f816 ("memcg: move mem_cgroup_event_ratelimit to v1 code")
> left this one behind. There are no v2 references.
> 
> Signed-off-by: Johannes Weiner <hannes@cmpxchg.org>

Acked-by: Michal Hocko <mhocko@suse.com>

Thanks!

> ---
>  mm/memcontrol-v1.c | 13 +++++++++++++
>  mm/memcontrol-v1.h | 12 ------------
>  2 files changed, 13 insertions(+), 12 deletions(-)
> 
> diff --git a/mm/memcontrol-v1.c b/mm/memcontrol-v1.c
> index 2be6b9112808..6d184fae0ad1 100644
> --- a/mm/memcontrol-v1.c
> +++ b/mm/memcontrol-v1.c
> @@ -490,6 +490,19 @@ static void mem_cgroup_threshold(struct mem_cgroup *memcg)
>  }
>  
>  /* Cgroup1: threshold notifications & softlimit tree updates */
> +
> +/*
> + * Per memcg event counter is incremented at every pagein/pageout. With THP,
> + * it will be incremented by the number of pages. This counter is used
> + * to trigger some periodic events. This is straightforward and better
> + * than using jiffies etc. to handle periodic memcg event.
> + */
> +enum mem_cgroup_events_target {
> +	MEM_CGROUP_TARGET_THRESH,
> +	MEM_CGROUP_TARGET_SOFTLIMIT,
> +	MEM_CGROUP_NTARGETS,
> +};
> +
>  struct memcg1_events_percpu {
>  	unsigned long nr_page_events;
>  	unsigned long targets[MEM_CGROUP_NTARGETS];
> diff --git a/mm/memcontrol-v1.h b/mm/memcontrol-v1.h
> index 6dd7eaf96856..4c8f36430fe9 100644
> --- a/mm/memcontrol-v1.h
> +++ b/mm/memcontrol-v1.h
> @@ -28,18 +28,6 @@ static inline bool do_memsw_account(void)
>  	return !cgroup_subsys_on_dfl(memory_cgrp_subsys);
>  }
>  
> -/*
> - * Per memcg event counter is incremented at every pagein/pageout. With THP,
> - * it will be incremented by the number of pages. This counter is used
> - * to trigger some periodic events. This is straightforward and better
> - * than using jiffies etc. to handle periodic memcg event.
> - */
> -enum mem_cgroup_events_target {
> -	MEM_CGROUP_TARGET_THRESH,
> -	MEM_CGROUP_TARGET_SOFTLIMIT,
> -	MEM_CGROUP_NTARGETS,
> -};
> -
>  unsigned long mem_cgroup_usage(struct mem_cgroup *memcg, bool swap);
>  
>  void drain_all_stock(struct mem_cgroup *root_memcg);
> -- 
> 2.48.1

-- 
Michal Hocko
SUSE Labs


  parent reply	other threads:[~2025-01-27 12:51 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-24  4:38 [PATCH 1/2] mm: memcontrol: unshare v2-only charge API bits again Johannes Weiner
2025-01-24  4:38 ` [PATCH 2/2] mm: memcontrol: move stray ratelimit bits to v1 Johannes Weiner
2025-01-25  1:26   ` Roman Gushchin
2025-01-25 20:12   ` Shakeel Butt
2025-01-27 12:51   ` Michal Hocko [this message]
2025-01-25  1:27 ` [PATCH 1/2] mm: memcontrol: unshare v2-only charge API bits again Roman Gushchin
2025-01-25 20:11 ` Shakeel Butt
2025-01-27 12:50 ` Michal Hocko

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=Z5eBP_N4k_kBad8L@tiehlicka \
    --to=mhocko@suse.com \
    --cc=akpm@linux-foundation.org \
    --cc=cgroups@vger.kernel.org \
    --cc=hannes@cmpxchg.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=muchun.song@linux.dev \
    --cc=roman.gushchin@linux.dev \
    --cc=shakeel.butt@linux.dev \
    /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