2020-09-08 08:13:48

by Alex Shi

[permalink] [raw]
Subject: [PATCH] mm/memcg: no one use charge_type

After commit 0a31bc97c80c3f mm: memcontrol: rewrite uncharge API, no one
using MEM_CGROUP_CHARGE_TYPE_xxx, let's remove them.

Signed-off-by: Alex Shi <[email protected]>
Cc: Johannes Weiner <[email protected]>
Cc: Michal Hocko <[email protected]>
Cc: Vladimir Davydov <[email protected]>
Cc: Andrew Morton <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
---
mm/memcontrol.c | 8 --------
1 file changed, 8 deletions(-)

diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index 5d52b8a88bea..d925905920bf 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -199,14 +199,6 @@ struct mem_cgroup_event {
#define MEM_CGROUP_MAX_RECLAIM_LOOPS 100
#define MEM_CGROUP_MAX_SOFT_LIMIT_RECLAIM_LOOPS 2

-enum charge_type {
- MEM_CGROUP_CHARGE_TYPE_CACHE = 0,
- MEM_CGROUP_CHARGE_TYPE_ANON,
- MEM_CGROUP_CHARGE_TYPE_SWAPOUT, /* for accounting swapcache */
- MEM_CGROUP_CHARGE_TYPE_DROP, /* a page was unused swap cache */
- NR_CHARGE_TYPE,
-};
-
/* for encoding cft->private value on file */
enum res_type {
_MEM,
--
1.8.3.1


2020-09-08 08:15:25

by Chris Down

[permalink] [raw]
Subject: Re: [PATCH] mm/memcg: no one use charge_type

Alex Shi writes:
>After commit 0a31bc97c80c3f mm: memcontrol: rewrite uncharge API, no one
>using MEM_CGROUP_CHARGE_TYPE_xxx, let's remove them.
>
>Signed-off-by: Alex Shi <[email protected]>
>Cc: Johannes Weiner <[email protected]>
>Cc: Michal Hocko <[email protected]>
>Cc: Vladimir Davydov <[email protected]>
>Cc: Andrew Morton <[email protected]>
>Cc: [email protected]
>Cc: [email protected]
>Cc: [email protected]

Acked-by: Chris Down <[email protected]>

2020-09-08 08:29:08

by Michal Hocko

[permalink] [raw]
Subject: Re: [PATCH] mm/memcg: no one use charge_type

On Tue 08-09-20 16:12:07, Alex Shi wrote:
> After commit 0a31bc97c80c3f mm: memcontrol: rewrite uncharge API, no one
> using MEM_CGROUP_CHARGE_TYPE_xxx, let's remove them.
>
> Signed-off-by: Alex Shi <[email protected]>
> Cc: Johannes Weiner <[email protected]>
> Cc: Michal Hocko <[email protected]>
> Cc: Vladimir Davydov <[email protected]>
> Cc: Andrew Morton <[email protected]>
> Cc: [email protected]
> Cc: [email protected]
> Cc: [email protected]

Acked-by: Michal Hocko <[email protected]>

Thanks!

> ---
> mm/memcontrol.c | 8 --------
> 1 file changed, 8 deletions(-)
>
> diff --git a/mm/memcontrol.c b/mm/memcontrol.c
> index 5d52b8a88bea..d925905920bf 100644
> --- a/mm/memcontrol.c
> +++ b/mm/memcontrol.c
> @@ -199,14 +199,6 @@ struct mem_cgroup_event {
> #define MEM_CGROUP_MAX_RECLAIM_LOOPS 100
> #define MEM_CGROUP_MAX_SOFT_LIMIT_RECLAIM_LOOPS 2
>
> -enum charge_type {
> - MEM_CGROUP_CHARGE_TYPE_CACHE = 0,
> - MEM_CGROUP_CHARGE_TYPE_ANON,
> - MEM_CGROUP_CHARGE_TYPE_SWAPOUT, /* for accounting swapcache */
> - MEM_CGROUP_CHARGE_TYPE_DROP, /* a page was unused swap cache */
> - NR_CHARGE_TYPE,
> -};
> -
> /* for encoding cft->private value on file */
> enum res_type {
> _MEM,
> --
> 1.8.3.1

--
Michal Hocko
SUSE Labs