From: Charan Teja Kalla <quic_charante@quicinc.com>
To: Zi Yan <ziy@nvidia.com>, David Hildenbrand <david@redhat.com>
Cc: Matthew Wilcox <willy@infradead.org>,
<gregkh@linuxfoundation.org>, <akpm@linux-foundation.org>,
<vbabka@suse.cz>, <dhowells@redhat.com>, <surenb@google.com>,
<linux-mm@kvack.org>, <linux-kernel@vger.kernel.org>,
# see patch description <stable@vger.kernel.org>,
Huang Ying <ying.huang@intel.com>,
Naoya Horiguchi <naoya.horiguchi@linux.dev>
Subject: Re: [PATCH] mm/huge_memory: fix swap entry values of tail pages of THP
Date: Wed, 28 Feb 2024 21:06:19 +0530 [thread overview]
Message-ID: <acdf3d44-b20e-8491-6302-bfb1b354bc62@quicinc.com> (raw)
In-Reply-To: <07A26237-B17E-4418-9A19-E86F450B9695@nvidia.com>
Thanks David/Zi Yan,
On 2/27/2024 9:45 PM, Zi Yan wrote:
> So likely we'd have to fix the stable kernels:
>
> 4.19
> 5.4
> 5.10
> 5.15
> 6.1
>
> That's a lot of pre-folio code. A backport of my series likely won't really make any sense.
So, I assume this is a consensus to have stable-only fix for this issue.
>
> For v6.1, the fix would like below?
>
> diff --git a/mm/migrate.c b/mm/migrate.c
> index c93dd6a31c31..c5968021fde0 100644
> --- a/mm/migrate.c
> +++ b/mm/migrate.c
> @@ -423,8 +423,12 @@ int folio_migrate_mapping(struct address_space *mapping,
> if (folio_test_swapbacked(folio)) {
> __folio_set_swapbacked(newfolio);
> if (folio_test_swapcache(folio)) {
> + int i;
> +
> folio_set_swapcache(newfolio);
> - newfolio->private = folio_get_private(folio);
> + for (i = 0; i < nr; i++)
> + set_page_private(folio_page(newfolio, i),
> + page_private(folio_page(folio, i)));
> }
> entries = nr;
> } else {
Similar to this is what we had tested[1] internally and observed no issues.
Can this be taken to 6.1, please?
[1]https://lore.kernel.org/linux-mm/8620c1a0-e091-46e9-418a-db66e621b9c4@quicinc.com/
Thanks,
Charan
next prev parent reply other threads:[~2024-02-28 15:36 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-13 8:48 Charan Teja Kalla
2024-02-13 8:54 ` Matthew Wilcox
2024-02-13 9:10 ` Charan Teja Kalla
2024-02-13 9:25 ` David Hildenbrand
2024-02-13 16:27 ` Charan Teja Kalla
2024-02-13 18:36 ` David Hildenbrand
2024-02-14 6:34 ` Charan Teja Kalla
2024-02-14 14:18 ` Matthew Wilcox
2024-02-14 14:34 ` David Hildenbrand
2024-02-27 14:11 ` David Hildenbrand
2024-02-27 14:52 ` Zi Yan
2024-02-27 15:01 ` David Hildenbrand
2024-02-27 15:20 ` Zi Yan
2024-02-27 16:15 ` Zi Yan
2024-02-28 15:36 ` Charan Teja Kalla [this message]
2024-03-04 10:48 ` Greg KH
2024-02-13 9:41 ` Greg KH
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=acdf3d44-b20e-8491-6302-bfb1b354bc62@quicinc.com \
--to=quic_charante@quicinc.com \
--cc=akpm@linux-foundation.org \
--cc=david@redhat.com \
--cc=dhowells@redhat.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=naoya.horiguchi@linux.dev \
--cc=stable@vger.kernel.org \
--cc=surenb@google.com \
--cc=vbabka@suse.cz \
--cc=willy@infradead.org \
--cc=ying.huang@intel.com \
--cc=ziy@nvidia.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox