[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZqcP6ucX6yHA0l9i@casper.infradead.org>
Date: Mon, 29 Jul 2024 04:43:38 +0100
From: Matthew Wilcox <willy@...radead.org>
To: Barry Song <21cnbao@...il.com>
Cc: yosryahmed@...gle.com, akpm@...ux-foundation.org,
baolin.wang@...ux.alibaba.com, chrisl@...nel.org, david@...hat.com,
hannes@...xchg.org, hughd@...gle.com, kaleshsingh@...gle.com,
kasong@...cent.com, linux-kernel@...r.kernel.org,
linux-mm@...ck.org, mhocko@...e.com, minchan@...nel.org,
nphamcs@...il.com, ryan.roberts@....com, senozhatsky@...omium.org,
shakeel.butt@...ux.dev, shy828301@...il.com, surenb@...gle.com,
v-songbaohua@...o.com, xiang@...nel.org, ying.huang@...el.com
Subject: Re: [PATCH v5 2/4] mm: Introduce
mem_cgroup_swapin_uncharge_swap_nr() helper for large folios swap-in
On Mon, Jul 29, 2024 at 02:02:22PM +1200, Barry Song wrote:
> -void mem_cgroup_swapin_uncharge_swap(swp_entry_t entry);
> +
> +void mem_cgroup_swapin_uncharge_swap_nr(swp_entry_t entry, unsigned int nr_pages);
[...]
> +static inline void mem_cgroup_swapin_uncharge_swap(swp_entry_t entry)
> +{
> + mem_cgroup_swapin_uncharge_swap_nr(entry, 1);
> +}
There are only two callers of mem_cgroup_swapin_uncharge_swap! Just
add an argument to mem_cgroup_swapin_uncharge_swap() and change the two
callers. It would be _less_ code than this extra wrapper, and certainly
less confusing.
Powered by blists - more mailing lists