* [folded-merged] mm-shmem-fix-thp-allocation-and-fallback-loop-v3.patch removed from -mm tree
@ 2025-11-09 19:09 Andrew Morton
0 siblings, 0 replies; only message in thread
From: Andrew Morton @ 2025-11-09 19:09 UTC (permalink / raw)
To: mm-commits, ziy, willy, stable, ryan.roberts, npache,
lorenzo.stoakes, liam.howlett, hughd, dev.jain, david,
baolin.wang, baohua, kasong, akpm
The quilt patch titled
Subject: mm-shmem-fix-thp-allocation-and-fallback-loop-v3
has been removed from the -mm tree. Its filename was
mm-shmem-fix-thp-allocation-and-fallback-loop-v3.patch
This patch was dropped because it was folded into mm-shmem-fix-thp-allocation-and-fallback-loop.patch
------------------------------------------------------
From: Kairui Song <kasong@tencent.com>
Subject: mm-shmem-fix-thp-allocation-and-fallback-loop-v3
Date: Thu, 23 Oct 2025 14:59:13 +0800
introduce a temporary variable to improve code
Link: https://lkml.kernel.org/r/20251023065913.36925-1-ryncsn@gmail.com
Link: https://lore.kernel.org/linux-mm/CAMgjq7DqgAmj25nDUwwu1U2cSGSn8n4-Hqpgottedy0S6YYeUw@mail.gmail.com/ [1]
Fixes: e7a2ab7b3bb5 ("mm: shmem: add mTHP support for anonymous shmem")
Signed-off-by: Kairui Song <kasong@tencent.com>
Cc: Baolin Wang <baolin.wang@linux.alibaba.com>
Cc: Barry Song <baohua@kernel.org>
Cc: David Hildenbrand <david@redhat.com>
Cc: Dev Jain <dev.jain@arm.com>
Cc: Hugh Dickins <hughd@google.com>
Cc: Liam Howlett <liam.howlett@oracle.com>
Cc: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
Cc: Matthew Wilcox (Oracle) <willy@infradead.org>
Cc: Nico Pache <npache@redhat.com>
Cc: Ryan Roberts <ryan.roberts@arm.com>
Cc: Zi Yan <ziy@nvidia.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
mm/shmem.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
--- a/mm/shmem.c~mm-shmem-fix-thp-allocation-and-fallback-loop-v3
+++ a/mm/shmem.c
@@ -1882,6 +1882,7 @@ static struct folio *shmem_alloc_and_add
struct shmem_inode_info *info = SHMEM_I(inode);
unsigned long suitable_orders = 0;
struct folio *folio = NULL;
+ pgoff_t aligned_index;
long pages;
int error, order;
@@ -1895,9 +1896,10 @@ static struct folio *shmem_alloc_and_add
order = highest_order(suitable_orders);
while (suitable_orders) {
pages = 1UL << order;
- folio = shmem_alloc_folio(gfp, order, info, round_down(index, pages));
+ aligned_index = round_down(index, pages);
+ folio = shmem_alloc_folio(gfp, order, info, aligned_index);
if (folio) {
- index = round_down(index, pages);
+ index = aligned_index;
goto allocated;
}
_
Patches currently in -mm which might be from kasong@tencent.com are
mm-shmem-fix-thp-allocation-and-fallback-loop.patch
mm-swap-do-not-perform-synchronous-discard-during-allocation.patch
mm-swap-rename-helper-for-setup-bad-slots.patch
mm-swap-cleanup-swap-entry-allocation-parameter.patch
mm-migrate-swap-drop-usage-of-folio_index.patch
mm-swap-remove-redundant-argument-for-isolating-a-cluster.patch
revert-mm-swap-avoid-redundant-swap-device-pinning.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2025-11-09 19:09 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-09 19:09 [folded-merged] mm-shmem-fix-thp-allocation-and-fallback-loop-v3.patch removed from -mm tree Andrew Morton
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).