On Wed, Jan 29, 2025 at 02:49:38AM +0900, Hyeonggon Yoo wrote: > Commit b7c0ccdfbafd ("mm: zswap: support large folios in zswap_store()") > mistakenly skipped charging any zswapped pages when a single call to > zswap_store_page() failed, even if some pages in the folio are > successfully stored in zswap. > > Making things worse, these not-charged pages are uncharged in > zswap_entry_free(), making zswap charging inconsistent. > > This inconsistency triggers two warnings when following these steps: > # On a machine with 64GiB of RAM and 36GiB of zswap > $ stress-ng --bigheap 2 # wait until the OOM-killer kills stress-ng > $ sudo reboot > > Two warnings are: > in mm/memcontrol.c:163, function obj_cgroup_release(): > WARN_ON_ONCE(nr_bytes & (PAGE_SIZE - 1)); > > in mm/page_counter.c:60, function page_counter_cancel(): > if (WARN_ONCE(new < 0, "page_counter underflow: %ld nr_pages=%lu\n", > new, nr_pages)) > > Charge zswapped pages even if some pages of the folio are not zswapped. > After resolving the inconsistency, these warnings disappear. > > Fixes: b7c0ccdfbafd ("mm: zswap: support large folios in zswap_store()") This commit is in 6.13, not 6.12, so your subject line is a bit confusing :(