Re: [PATCH v5 2/4] mm: Introduce mem_cgroup_swapin_uncharge_swap_nr() helper for large folios swap-in

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux