On Sun, Oct 20, 2024 at 11:46:11AM -0700, Linus Torvalds wrote: > On Sun, 20 Oct 2024 at 10:04, Kent Overstreet <kent.overstreet@xxxxxxxxx> wrote: > > > > But given that vmalloc() already supports > INT_MAX requests, and memory > > sizes keep growing so 2GB is getting pretty small - I think it's time, > > this is going to come up in other places sooner or later. > > No. > > If you need 2GB+ memory for filesystem operations, you fix your code. This is for journal replay, where we've got a big array of keys and we need to sort them. The keys have to fit in memory (and had to fit in memory previously, for them to be dirty in the journal); this array is just _references_ to those keys. > 2GB is more than you *can* allocate on 32-bit platforms, and even on > 64-bit ones it is often quite a lot. This came up on a machine with 128GB of ram.