[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <3156c69f-b52d-4777-ba38-4c32ebc16b24@vivo.com>
Date: Fri, 17 Jan 2025 18:25:13 +0800
From: zhiguojiang <justinjiang@...o.com>
To: Michal Hocko <mhocko@...e.com>
Cc: Johannes Weiner <hannes@...xchg.org>,
Roman Gushchin <roman.gushchin@...ux.dev>,
Shakeel Butt <shakeel.butt@...ux.dev>, Muchun Song <muchun.song@...ux.dev>,
Andrew Morton <akpm@...ux-foundation.org>, cgroups@...r.kernel.org,
linux-mm@...ck.org, linux-kernel@...r.kernel.org, opensource.kernel@...o.com
Subject: Re: [PATCH] mm: memcg supports freeing the specified zone's memory
在 2025/1/17 17:33, Michal Hocko 写道:
> On Fri 17-01-25 12:41:40, zhiguojiang wrote:
> [...]
>> In response to the above situation, we need reclaim only the normal
>> zone's memory occupied by memcg by try_to_free_mem_cgroup_pages(), in
>> order to solve the issues of the gfp flags allocations and failure due
>> to gfp flags limited only to alloc memory from the normal zone. At this
>> point, if the memcg memory reclaimed by try_to_free_mem_cgroup_pages()
>> mainly comes from the movable zone, which cannot solve such problems.
> Memory cgroup reclaim doesn't allocate the memory directly. This is done
Yes, what I mean is that we hope to reclaim accurately the specified
zone's memory occupied by memcg through try_to_free_mem_cgroup_pages(),
in order to meet the current system's memory allocation requirements
for the specified zone on the memory allocate path.
> by the page allocator called before the memory is charged. The memcg
> charging is then responsible for reclaiming charges and that is not
> really zone aware.
>
> Could you describe problem that you are trying to solve?
In a dual zone system with both movable and normal zones, we encountered
the problem where the GFP_KERNEL flag failed to allocate memory from the
normal zone and crashed. Analyzing the logs, we found that there was
very little free memory in the normal zone, but more free memory in the
movable zone at this time. Therefore, we want to reclaim accurately
the normal zone's memory occupied by memcg through
try_to_free_mem_cgroup_pages().
Thanks
Powered by blists - more mailing lists