• Barry Song's avatar
    mm: add nr argument in mem_cgroup_swapin_uncharge_swap() helper to support large folios · 325efb16
    Barry Song authored
    With large folios swap-in, we might need to uncharge multiple entries all
    together, add nr argument in mem_cgroup_swapin_uncharge_swap().
    
    For the existing two users, just pass nr=1.
    
    Link: https://lkml.kernel.org/r/20240908232119.2157-3-21cnbao@gmail.comSigned-off-by: default avatarBarry Song <v-songbaohua@oppo.com>
    Acked-by: default avatarChris Li <chrisl@kernel.org>
    Reviewed-by: default avatarYosry Ahmed <yosryahmed@google.com>
    Cc: Shakeel Butt <shakeel.butt@linux.dev>
    Cc: Baolin Wang <baolin.wang@linux.alibaba.com>
    Cc: Christoph Hellwig <hch@infradead.org>
    Cc: David Hildenbrand <david@redhat.com>
    Cc: Gao Xiang <xiang@kernel.org>
    Cc: "Huang, Ying" <ying.huang@intel.com>
    Cc: Hugh Dickins <hughd@google.com>
    Cc: Johannes Weiner <hannes@cmpxchg.org>
    Cc: Kairui Song <kasong@tencent.com>
    Cc: Kairui Song <ryncsn@gmail.com>
    Cc: Kalesh Singh <kaleshsingh@google.com>
    Cc: Matthew Wilcox (Oracle) <willy@infradead.org>
    Cc: Michal Hocko <mhocko@suse.com>
    Cc: Minchan Kim <minchan@kernel.org>
    Cc: Nhat Pham <nphamcs@gmail.com>
    Cc: Ryan Roberts <ryan.roberts@arm.com>
    Cc: Sergey Senozhatsky <senozhatsky@chromium.org>
    Cc: Suren Baghdasaryan <surenb@google.com>
    Cc: Yang Shi <shy828301@gmail.com>
    Cc: Chuanhua Han <hanchuanhua@oppo.com>
    Cc: Kanchana P Sridhar <kanchana.p.sridhar@intel.com>
    Cc: Usama Arif <usamaarif642@gmail.com>
    Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
    325efb16
swap_state.c 25.6 KB