Commit 57ad6ae5 authored by Haifeng Xu's avatar Haifeng Xu Committed by T.J. Mercier
Browse files

UPSTREAM: mm: list_lru: disable memcg_aware when cgroup.memory is set to "nokmem"

Actually, when using a boot time kernel option "cgroup.memory=nokmem", all
lru items are inserted to list_lru_node.  But for those users who invoke
list_lru_init_memcg() to initialize list_lru, list_lru_memcg_aware()
returns true.  And this brings unneeded operations related to memcg.

To make things more convenient, let's disable memcg_aware when
cgroup.memory is set to "nokmem".

Link: https://lkml.kernel.org/r/20231228062715.338672-1-haifeng.xu@shopee.com


Signed-off-by: default avatarHaifeng Xu <haifeng.xu@shopee.com>
Acked-by: default avatarRoman Gushchin <roman.gushchin@linux.dev>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Michal Hocko <mhocko@kernel.org>
Cc: Shakeel Butt <shakeelb@google.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
(cherry picked from commit 0057db47)
Bug: 445351250
Change-Id: I8406c2c362653501d5bf3cd26dac93c7d5436b91
Signed-off-by: default avatarT.J. Mercier <tjmercier@google.com>
parent c4bcbf92
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment