* [folded-merged] mm-store-zero-pages-to-be-swapped-out-in-a-bitmap-v7.patch removed from -mm tree
@ 2024-07-06 18:46 Andrew Morton
0 siblings, 0 replies; only message in thread
From: Andrew Morton @ 2024-07-06 18:46 UTC (permalink / raw)
To: mm-commits, yosryahmed, ying.huang, willy, shakeel.butt, nphamcs,
hughd, hannes, david, chengming.zhou, ak, usamaarif642, akpm
The quilt patch titled
Subject: mm-store-zero-pages-to-be-swapped-out-in-a-bitmap-v7
has been removed from the -mm tree. Its filename was
mm-store-zero-pages-to-be-swapped-out-in-a-bitmap-v7.patch
This patch was dropped because it was folded into mm-store-zero-pages-to-be-swapped-out-in-a-bitmap.patch
------------------------------------------------------
From: Usama Arif <usamaarif642@gmail.com>
Subject: mm-store-zero-pages-to-be-swapped-out-in-a-bitmap-v7
Date: Thu, 27 Jun 2024 11:55:29 +0100
Change to kvmalloc_array for zeromap allocation instead of kvzalloc as it
does an additional overflow check, and use sizeof(unsigned long) for
allocation size calculation to take into account 32 bit kernels.
Link: https://lkml.kernel.org/r/20240627105730.3110705-2-usamaarif642@gmail.com
Signed-off-by: Usama Arif <usamaarif642@gmail.com>
Cc: Chengming Zhou <chengming.zhou@linux.dev>
Cc: Yosry Ahmed <yosryahmed@google.com>
Cc: Nhat Pham <nphamcs@gmail.com>
Cc: David Hildenbrand <david@redhat.com>
Cc: "Huang, Ying" <ying.huang@intel.com>
Cc: Hugh Dickins <hughd@google.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Matthew Wilcox (Oracle) <willy@infradead.org>
Cc: Shakeel Butt <shakeel.butt@linux.dev>
Cc: Usama Arif <usamaarif642@gmail.com>
Cc: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
mm/swapfile.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
--- a/mm/swapfile.c~mm-store-zero-pages-to-be-swapped-out-in-a-bitmap-v7
+++ a/mm/swapfile.c
@@ -3180,7 +3180,12 @@ SYSCALL_DEFINE2(swapon, const char __use
goto bad_swap_unlock_inode;
}
- p->zeromap = kvzalloc(DIV_ROUND_UP(maxpages, 8), GFP_KERNEL);
+ /*
+ * Use kvmalloc_array instead of bitmap_zalloc as the allocation order might
+ * be above MAX_PAGE_ORDER incase of a large swap file.
+ */
+ p->zeromap = kvmalloc_array(BITS_TO_LONGS(maxpages), sizeof(unsigned long),
+ GFP_KERNEL | __GFP_ZERO);
if (!p->zeromap) {
error = -ENOMEM;
goto bad_swap_unlock_inode;
_
Patches currently in -mm which might be from usamaarif642@gmail.com are
mm-store-zero-pages-to-be-swapped-out-in-a-bitmap.patch
mm-store-zero-pages-to-be-swapped-out-in-a-bitmap-v8.patch
mm-remove-code-to-handle-same-filled-pages.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-07-06 18:46 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-06 18:46 [folded-merged] mm-store-zero-pages-to-be-swapped-out-in-a-bitmap-v7.patch removed from -mm tree Andrew Morton
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.