[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <bhcxyl2xir27ds7jlcsncajathj6fbpzo5hoymdvb7h6a44gfu@lxdsu5up344n>
Date: Fri, 18 Oct 2024 14:34:52 -0700
From: Shakeel Butt <shakeel.butt@...ux.dev>
To: Joshua Hahn <joshua.hahnjy@...il.com>
Cc: hannes@...xchg.org, nphamcs@...il.com, mhocko@...nel.org,
roman.gushchin@...ux.dev, muchun.song@...ux.dev, akpm@...ux-foundation.org,
cgroups@...r.kernel.org, linux-mm@...ck.org, linux-kernel@...r.kernel.org, lnyng@...a.com
Subject: Re: [PATCH 1/1] memcg/hugetlb: Adding hugeTLB counters to memory
controller
On Thu, Oct 17, 2024 at 09:04:38AM GMT, Joshua Hahn wrote:
> HugeTLB is added as a metric in memcg_stat_item, and is updated in the
> alloc and free methods for hugeTLB, after (un)charging has already been
> committed. Changes are batched and updated / flushed like the rest of
> the memcg stats, which makes additional overhead by the infrequent
> hugetlb allocs / frees minimal.
>
> Signed-off-by: Joshua Hahn <joshua.hahnjy@...il.com>
I have an orthogonal cleanup request (i.e. after you are done with this
work). Hugetlb is the last user of try-charge + commit protocol for
memcg charging. I think we should just remove that and use a simple
charge interface. You will need to reorder couple of things like
allocating the folio first and then charge and you will need to do right
cleanup on charge failing but I think it will cleanup the error path of
alloc_hugetlb_folio() a lot.
Powered by blists - more mailing lists