linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mm: Drop INT_MAX limit from kvmalloc()
@ 2024-10-19 21:00 Kent Overstreet
  2024-10-20 11:45 ` Lorenzo Stoakes
  0 siblings, 1 reply; 28+ messages in thread
From: Kent Overstreet @ 2024-10-19 21:00 UTC (permalink / raw)
  To: linux-bcachefs, linux-mm; +Cc: Kent Overstreet, Vlastimil Babka, Andrew Morton

A user with a 75 TB filesystem reported the following journal replay
error:
https://github.com/koverstreet/bcachefs/issues/769

In journal replay we have to sort and dedup all the keys from the
journal, which means we need a large contiguous allocation. Given that
the user has 128GB of ram, the 2GB limit on allocation size has become
far too small.

Cc: Vlastimil Babka <vbabka@suse.cz>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
---
 mm/util.c | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/mm/util.c b/mm/util.c
index 4f1275023eb7..c60df7723096 100644
--- a/mm/util.c
+++ b/mm/util.c
@@ -665,12 +665,6 @@ void *__kvmalloc_node_noprof(DECL_BUCKET_PARAMS(size, b), gfp_t flags, int node)
 	if (!gfpflags_allow_blocking(flags))
 		return NULL;
 
-	/* Don't even allow crazy sizes */
-	if (unlikely(size > INT_MAX)) {
-		WARN_ON_ONCE(!(flags & __GFP_NOWARN));
-		return NULL;
-	}
-
 	/*
 	 * kvmalloc() can always use VM_ALLOW_HUGE_VMAP,
 	 * since the callers already cannot assume anything
-- 
2.45.2



^ permalink raw reply	[flat|nested] 28+ messages in thread

end of thread, other threads:[~2024-10-27 19:58 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-10-19 21:00 [PATCH] mm: Drop INT_MAX limit from kvmalloc() Kent Overstreet
2024-10-20 11:45 ` Lorenzo Stoakes
2024-10-20 13:00   ` Kent Overstreet
2024-10-20 16:44     ` Lorenzo Stoakes
2024-10-20 17:03       ` Kent Overstreet
2024-10-20 18:46         ` Linus Torvalds
2024-10-20 18:53           ` Kent Overstreet
2024-10-20 19:09             ` Linus Torvalds
2024-10-20 19:09               ` Linus Torvalds
2024-10-20 19:16                 ` Kent Overstreet
2024-10-21 16:15                   ` Uladzislau Rezki
2024-10-20 20:10                 ` Kent Overstreet
2024-10-20 20:19                   ` Linus Torvalds
2024-10-20 20:29                     ` Kent Overstreet
2024-10-20 20:54                       ` Linus Torvalds
2024-10-20 21:21                         ` Linus Torvalds
2024-10-20 21:40                           ` Kent Overstreet
2024-10-27 19:58                           ` Kent Overstreet
2024-10-20 21:29                         ` Kent Overstreet
2024-10-20 21:30                           ` Linus Torvalds
2024-10-20 21:42                             ` Kent Overstreet
2024-10-20 21:51                       ` Joshua Ashton
2024-10-20 21:57                         ` Kent Overstreet
2024-10-21  8:46                       ` Janpieter Sollie
2024-10-21  9:22                         ` Janpieter Sollie
2024-10-20 19:10               ` Kent Overstreet
2024-10-20 19:53             ` Vlastimil Babka
2024-10-20 20:08               ` Kent Overstreet

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox