diff mbox series

[v2,4/7] memcg: cleanup __mod_memcg_lruvec_state

Message ID 20240427003733.3898961-5-shakeel.butt@linux.dev (mailing list archive)
State New
Headers show
Series memcg: reduce memory consumption by memcg stats | expand

Commit Message

Shakeel Butt April 27, 2024, 12:37 a.m. UTC
There are no memcg specific stats for NR_SHMEM_PMDMAPPED and
NR_FILE_PMDMAPPED. Let's remove them.

Signed-off-by: Shakeel Butt <shakeel.butt@linux.dev>
---
 mm/memcontrol.c | 2 --
 1 file changed, 2 deletions(-)

Comments

Yosry Ahmed April 27, 2024, 12:53 a.m. UTC | #1
On Fri, Apr 26, 2024 at 5:38 PM Shakeel Butt <shakeel.butt@linux.dev> wrote:
>
> There are no memcg specific stats for NR_SHMEM_PMDMAPPED and
> NR_FILE_PMDMAPPED. Let's remove them.
>
> Signed-off-by: Shakeel Butt <shakeel.butt@linux.dev>

Reviewed-by: Yosry Ahmed <yosryahmed@google.com>

> ---
>  mm/memcontrol.c | 2 --
>  1 file changed, 2 deletions(-)
>
> diff --git a/mm/memcontrol.c b/mm/memcontrol.c
> index c164bc9b8ed6..103e0e53e20a 100644
> --- a/mm/memcontrol.c
> +++ b/mm/memcontrol.c
> @@ -1009,8 +1009,6 @@ static void __mod_memcg_lruvec_state(struct lruvec *lruvec,
>                 case NR_ANON_MAPPED:
>                 case NR_FILE_MAPPED:
>                 case NR_ANON_THPS:
> -               case NR_SHMEM_PMDMAPPED:
> -               case NR_FILE_PMDMAPPED:
>                         if (WARN_ON_ONCE(!in_task()))
>                                 pr_warn("stat item index: %d\n", idx);
>                         break;
> --
> 2.43.0
>
>
Roman Gushchin April 29, 2024, 3:45 p.m. UTC | #2
On Fri, Apr 26, 2024 at 05:37:30PM -0700, Shakeel Butt wrote:
> There are no memcg specific stats for NR_SHMEM_PMDMAPPED and
> NR_FILE_PMDMAPPED. Let's remove them.
> 
> Signed-off-by: Shakeel Butt <shakeel.butt@linux.dev>

Reviewed-by: Roman Gushchin <roman.gushchin@linux.dev>
diff mbox series

Patch

diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index c164bc9b8ed6..103e0e53e20a 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -1009,8 +1009,6 @@  static void __mod_memcg_lruvec_state(struct lruvec *lruvec,
 		case NR_ANON_MAPPED:
 		case NR_FILE_MAPPED:
 		case NR_ANON_THPS:
-		case NR_SHMEM_PMDMAPPED:
-		case NR_FILE_PMDMAPPED:
 			if (WARN_ON_ONCE(!in_task()))
 				pr_warn("stat item index: %d\n", idx);
 			break;