Re: [PATCH v6.12 hotfix] mm/zswap: fix inconsistent charging when zswap_store_page() fails

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

 



On Tue, Jan 28, 2025 at 6:42 PM Vlastimil Babka <vbabka@xxxxxxx> wrote:
>
> On 1/28/25 19:18, Hyeonggon Yoo wrote:
> > On Tue, Jan 28, 2025 at 6:14 PM Greg KH <gregkh@xxxxxxxxxxxxxxxxxxx> wrote:
> >>
> >> 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 :(
> >
> > Oh, thanks for catching. Will fix it.
> > Also, I noticed I incorrectly described the problem.
> >
> > Will send v2 (for v6.13!) after adjusting them.
>
> I think we use e.g. "v6.13 hotfix" only while the stabilization of 6.13 is
> ongoing, to indicate the urgency.

Yes.

> Now it's too late so it would only confuse stable maintainers
> while the patch is not directly aimed at stable
> but through mm to mainline and then stable backport as usual.

Right, that's what I'm trying to do.

> So I think you can just use [PATCH mm-hotfixes] at this point.

Adjusted the subject and sent v2.
Thanks for the explanation, that makes sense to me!

Best,
Hyeonggon





[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