linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Charan Teja Kalla <quic_charante@quicinc.com>
To: Matthew Wilcox <willy@infradead.org>
Cc: <gregkh@linuxfoundation.org>, <akpm@linux-foundation.org>,
	<vbabka@suse.cz>, <dhowells@redhat.com>, <david@redhat.com>,
	<surenb@google.com>, <linux-mm@kvack.org>,
	<linux-kernel@vger.kernel.org>,
	# see patch description <stable@vger.kernel.org>
Subject: Re: [PATCH] mm/huge_memory: fix swap entry values of tail pages of THP
Date: Tue, 13 Feb 2024 14:40:02 +0530	[thread overview]
Message-ID: <50d61d66-e17c-55b9-23f4-ceea93e81e68@quicinc.com> (raw)
In-Reply-To: <ZcsuLLhNPPylU-hi@casper.infradead.org>

Thanks Matthew!!

On 2/13/2024 2:24 PM, Matthew Wilcox wrote:
> I am deeply confused by this commit message.
> 
> Are you saying there is a problem in current HEAD which this fixes, or
> are you saying that this problem has already been fixed, and this patch
> is for older kernels?

Sorry, I meant this patch is __only for older kernels__. We are seeing
this issue on 6.1 LTS kernel.

At least I am not expecting this issue on the HEAD of the linux-next branch.

Seems the below message is not clear from my side to say that:
a) why this issue won't be seen on the latest kernel and
b) the problems associated with the respective patches in back porting
to LTS branch?

"On the recent kernels, this issues is indirectly getting fixed with the
series[1], to be specific[2].

When tried to back port this series, it is observed many merge
conflicts and also seems dependent on many other changes. As backporting
to LTS branches is not a trivial one, the similar change from [2] is
picked as a fix.

[1] https://lore.kernel.org/all/20230821160849.531668-1-david@redhat.com/
[2] https://lore.kernel.org/all/20230821160849.531668-5-david@redhat.com/"

IOW, the below couple of line is ensuring the proper swap entry is
stored in the tail pages which is somehow missed on the older kernels.

static void __split_huge_page_tail(struct folio *folio, int tail,
 		struct lruvec *lruvec, struct list_head *list)
{
     .............
+	if (folio_test_swapcache(folio))
+		new_folio->swap.val = folio->swap.val + tail;
     .............
}

Thanks.


  reply	other threads:[~2024-02-13  9:10 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 [this message]
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
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=50d61d66-e17c-55b9-23f4-ceea93e81e68@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=stable@vger.kernel.org \
    --cc=surenb@google.com \
    --cc=vbabka@suse.cz \
    --cc=willy@infradead.org \
    /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