From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 21FC1D3C92A for ; Sun, 20 Oct 2024 18:54:00 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 73A196B007B; Sun, 20 Oct 2024 14:54:00 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 6E9CD6B0082; Sun, 20 Oct 2024 14:54:00 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 58A706B0083; Sun, 20 Oct 2024 14:54:00 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id 3AA106B007B for ; Sun, 20 Oct 2024 14:54:00 -0400 (EDT) Received: from smtpin18.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id A6EAF141420 for ; Sun, 20 Oct 2024 18:53:44 +0000 (UTC) X-FDA: 82694879946.18.77E7BB9 Received: from out-177.mta1.migadu.com (out-177.mta1.migadu.com [95.215.58.177]) by imf16.hostedemail.com (Postfix) with ESMTP id 225FE180012 for ; Sun, 20 Oct 2024 18:53:43 +0000 (UTC) Authentication-Results: imf16.hostedemail.com; dkim=pass header.d=linux.dev header.s=key1 header.b=HQEtbAp2; dmarc=pass (policy=none) header.from=linux.dev; spf=pass (imf16.hostedemail.com: domain of kent.overstreet@linux.dev designates 95.215.58.177 as permitted sender) smtp.mailfrom=kent.overstreet@linux.dev ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1729450316; a=rsa-sha256; cv=none; b=kbcTeL3O2mde1aI9d6epCQo2LC7dO8GeFft3P9tJfobWr1frBBuC/MwLrAE34t4fecwSZ5 3ZT91p8ONtEsWMtkXYO1r7WFEe28Tn785dU8tGfoBgy1LfH4fgfcjSR0AY973YD+D1CStK tJOX11evMVhOuoCzbcDeyCqIQf1QTqg= ARC-Authentication-Results: i=1; imf16.hostedemail.com; dkim=pass header.d=linux.dev header.s=key1 header.b=HQEtbAp2; dmarc=pass (policy=none) header.from=linux.dev; spf=pass (imf16.hostedemail.com: domain of kent.overstreet@linux.dev designates 95.215.58.177 as permitted sender) smtp.mailfrom=kent.overstreet@linux.dev ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1729450316; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=88nKpjSii+8FZBtg4/D+7ialdSkZyzZjLExZxeMz0+U=; b=3DNDC/+9I8u7OaNbcC4uZ3bhzT0u1qCPOyIjtGNPHaTS7k7Mskoz9afLF2v5nuKB0Phcfb V1+D0Syy8KIjdNWP7LRNb0e0A+0E2gpdvKo0HYELidA5ID7qLmgMzOHE6KJ8ulwKVp7939 wKiEcA23P2ncm1/c0Zrt/RjnPl+FUAA= Date: Sun, 20 Oct 2024 14:53:52 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1729450435; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=88nKpjSii+8FZBtg4/D+7ialdSkZyzZjLExZxeMz0+U=; b=HQEtbAp2YII6KOCVbkhQnqSll79ia4rsR4rQ0zM5XKRYQzMsNI28ELPmCtcwNCiqq11hye 6hrBbn7S7Yp1dDXKn0uz55NuahiT35+5FnLDhuiOILOMZBJrowGgJSEeVWdcvDCkPqXMTd Wd3mtzwlt/swTU4zp6KaVyf0tsWJitI= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Kent Overstreet To: Linus Torvalds Cc: Lorenzo Stoakes , linux-bcachefs@vger.kernel.org, linux-mm@kvack.org, Vlastimil Babka , Andrew Morton , Uladzislau Rezki , Christoph Hellwig Subject: Re: [PATCH] mm: Drop INT_MAX limit from kvmalloc() Message-ID: References: <20241019210037.146825-1-kent.overstreet@linux.dev> <90bc0794-4cab-415f-a442-4af85a32eed8@lucifer.local> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Migadu-Flow: FLOW_OUT X-Rspamd-Server: rspam12 X-Rspamd-Queue-Id: 225FE180012 X-Stat-Signature: mep149hqaua3oh4wgkufzr9bin6zb9m8 X-Rspam-User: X-HE-Tag: 1729450423-100651 X-HE-Meta: U2FsdGVkX1+Y3zVXVj6SqjIqGjMrrmW0NuAgml+KG3P8Y/HtQjtGcZosj/+B49lzUsTETimwKmtfPQDSy9Co4qXinte/fbFKJ5nTbonkHjto99IeBBL/MfzpCUiQ82E5c1hWexl9TQUPWhxFqN/KZWDmNjO04GikTeUEJO8EhjZ7yXLTnF/tW0m/wS70mrZ8HCZKF2afV43G5EaC/xAzG1U6jbAj8Qy42m1AEMu+tRqX8Kal5wwBqF5lqrgHcIzCASRbYSVyuOmSKjvuQEzv24oiYbHL16gcoCWoNZvYz6R5+CSY0/48MTF57s0+wxGVWOeloTiPblgf6nGNzfTXdeOPiluitdPC5YIHydxxGgy7qWFVXP9okGa1t9kUzvsQ5GPsso7x+fU98Z/fF6m793wqdXCnM1QlNhHTvOzXIqfqHFWlnOksK9b1G0vDOAb/t71fher/O+uMAyMJuvHkIkyev8GedwNh3WcV4p1yNacbR2N0JTm/p4s4DQqRfcTF3ExuDFieqn3kX3IGdFXzXWLD6sRJu51KB+12WcXlZ8/4lIbdSyzpeint8FLz8/G9kdkz+C7i9mfGayGloh3UWAgjA2IsnC9r4gsm9wCXjbHb1Jk5nH7ZSG8C5uZGriZdpryApZUyCJmxgxcjSPWiWwHu5wQg9+QKgT2HGl27KI0tfAAkRKv28CuCppc+EPRAOgHFx8RKwyIFWbhBr554nq52hewbdflxRfQnDQGbC9j1/FeWtFdT+FGc+kGuri8mWHzpJ+GmLTSCiDwFsYclH2ygUdjM4yxG9ZZHQhmoqBH5zwNv5jynZwXp+Gj51J+60ayaBYVK0M5SpzbIU3nmtHDkw+0cS+mSd4YjGDDkU0tzpPFNFVcD2FJCqbZZTfs4e1nGp8sczbVj621QGHjnVLAJ31+9cGab8prAa6y46ZjO1SBcJlR+Ybqn5mGmlIgZgDPo87FJA/JxHwijJOG SV+Rfkv0 hwqFoJFOD7GdkZP4iWetFWiPB3nTjhGgf30OF8NBDZjHTtleekJIswpL85mDvQs1CrNh9kCRnm165JXWScneYHNi3Msl6Ph3vG+wBkZ/jYF1sKk3MFOL6EX+wGieoHz8BFe5ERiOyZUbkBsQZNevo4i4AWI4/0N8eSHr2LefVtYGT5x36IWDB/lZZW2Y9DJPO/5vM X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: On Sun, Oct 20, 2024 at 11:46:11AM -0700, Linus Torvalds wrote: > On Sun, 20 Oct 2024 at 10:04, Kent Overstreet 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.