From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-lj1-f171.google.com (mail-lj1-f171.google.com [209.85.208.171]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 739A33CCA16 for ; Mon, 30 Mar 2026 12:27:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.171 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774873650; cv=none; b=FpRKR6dxz+XUdatZI9+nJuTe2H8yFuG/KE6xB32FbvkVWJ0/B/LMphv5xJ489vzJCEqE7TpWmx10Mb8SYgy7rc5OOkpsapLPQ8JRvSZmzuLQcfIzVpbBfAOmffSb1cptOrR/Q7gIJ6zJuODrztK5lQZweo1mP6X5zCkrOsAWG40= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774873650; c=relaxed/simple; bh=NdHLSpgD4MtDnKpflaETZOhLbX1iIIRPkg4AZXRznAM=; h=From:Date:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=FzWYnLvmzXkqwMjsZ45h3PlULmSnZaIc/+aAh7pgpFnL19Sc+bVmr520hnvXVtEJRdYe2mZCr7BuFp1zygWuUhwXEJ5RBDM1Cq25ko3nFdtpqyu/bgAe3NPHlwIldzdRtIzXUgFnBT/ZW5kE+ZohndCovDf7FNibUcc63FgS8sI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=gCUxuttI; arc=none smtp.client-ip=209.85.208.171 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="gCUxuttI" Received: by mail-lj1-f171.google.com with SMTP id 38308e7fff4ca-38a27d39067so32291581fa.1 for ; Mon, 30 Mar 2026 05:27:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1774873645; x=1775478445; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:date:from:from:to:cc:subject:date:message-id:reply-to; bh=oNFRwD93ezdvk32DPCCegnt+dt260d8Q+7V4aeXvIS8=; b=gCUxuttIje5Jyw+GmwnW+JH89Nuf/du0fg07/K4JRFqZYp8CDSTC+MlJK1VZQ+rZMQ at4+zZFtbvmX7rN6fBThsWlST7b2+sId0aIhzadK8GouCxRve9PBb6HZb7bU9FasnAUh hctQiUgJAKUfDJpkzu5NEssX39L8KSfVPZCjGNOi4W6e96Tdl0Sn71d9qJyXpZuRxErD HCiaAZs+fWlbMfVETm71dqYXdtsM4vF9HVa3mzZO+yRxgzYLvXpnph3a4Te3NNvvNLMc /1o2o1v+80jCdkkWqv/ZSj+JxeKmQO8w57q+8IEQGGAigbDHXbwhcuhHTbC20hWzzH/e b6FQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1774873645; x=1775478445; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:date:from:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=oNFRwD93ezdvk32DPCCegnt+dt260d8Q+7V4aeXvIS8=; b=AWjuSrFC+N6b/ef6uTkPlVyc+NQ0kGEpUk3CSMH9hJCr7tkXsq0BbE9MLvCILE/CJQ Jq7RYbHYZtaboOixwwpV+uiBrXA1FdlOxPmGRkPW6D2zWU70VlPByzsGQuFL8EwH/sZD bdNPrpiaOHcoM+t38qcGJ9eoCulDb5DUfUrrWBM+53kY18DbSwtVyEYa05f9FZiGL73R BULZ74yXJjWnspYaKkIneouJpWwut3cHpEAXiI4SszjtfQf0jce1ETl1ra89zp01Zo1u bcY052H42aZ/ivprnADUK6w/KSWHtGqjsySd8wW0lnSGQswj+cnrKbZiYCYhLQynqNlg bpqw== X-Forwarded-Encrypted: i=1; AJvYcCX2/7NDeE7nRwvTkdsp1jYjhKFrY9QeSNULKIhYizo3jP5fRZzeQG080uLoPrf5wxN1lk4d9zqpunX2GPQ=@vger.kernel.org X-Gm-Message-State: AOJu0Yzr3+omT1kuRYsWG6EkBaXifXnkMG2LFTYx7dWcExqy4dH70gRc t/mhytWWlZOOmNUQPOJmLz5zWG2H74KwjVZWBvmcG903Zn7/EElxwIBF X-Gm-Gg: ATEYQzzSgllsSq34fpRiVVnYn4PqizoIhTvWEH5OJ+a4FXfd+NNTRQDG+qbpZKVqAk/ 0LXh06T4klQPhdSyNUwa/cJR+BoOr3v9Zyp8YlYduktDoaIFWaE0wg1TPKIumrMCF55HnVIAaMK xZ+/wID2bCQwYuX7qvraQ5Z5FRcsSrLTYMbBesKZIrA0JLlxaa0QS4PzpOn7qH+lFwW6m4eeXjT fnQefhZNuVp5OP2QuytyIqNQmgmKlzpMabl3urAJSYwBtXniiFmrKa9v5VV7dLcG44koHiJfnhd ERbRUQJZJtSe2sFsb6AFSpPFxLwShq224fDFUiNQK4VdSDGDPncUIXHKbub/ni9irBcEdJrWBWt EJfJmYSEKLHOaxcRVMWBDDdjRJYc0pn/QnXCpwjqu4ou3UM1JFlaM2wp2pGOJAVg8 X-Received: by 2002:a05:651c:12c8:b0:38b:cd7e:3fb6 with SMTP id 38308e7fff4ca-38c7326630fmr40959821fa.21.1774873644865; Mon, 30 Mar 2026 05:27:24 -0700 (PDT) Received: from milan ([2001:9b1:d5a0:a500::24b]) by smtp.gmail.com with ESMTPSA id 38308e7fff4ca-38c8389202asm14847641fa.24.2026.03.30.05.27.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Mar 2026 05:27:24 -0700 (PDT) From: Uladzislau Rezki X-Google-Original-From: Uladzislau Rezki Date: Mon, 30 Mar 2026 14:27:22 +0200 To: Alice Ryhl , Andrew Morton Cc: Andrew Morton , shivamkalra98@zohomail.in, Shivam Kalra via B4 Relay , Uladzislau Rezki , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Danilo Krummrich Subject: Re: [PATCH v8 0/6] mm/vmalloc: free unused pages on vrealloc() shrink Message-ID: References: <20260327-vmalloc-shrink-v8-0-cc6b57059ed7@zohomail.in> <20260327113758.75f04588310a707b4d4b1aac@linux-foundation.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Mon, Mar 30, 2026 at 08:05:44AM +0000, Alice Ryhl wrote: > On Fri, Mar 27, 2026 at 11:37:58AM -0700, Andrew Morton wrote: > > On Fri, 27 Mar 2026 15:18:36 +0530 Shivam Kalra via B4 Relay wrote: > > > > > This series implements the TODO in vrealloc() to unmap and free unused > > > pages when shrinking across a page boundary. > > > > Thanks. I'd prefer to defer this until the next -rc cycle > > (https://lkml.kernel.org/r/20260323202941.08ddf2b0411501cae801ab4c@linux-foundation.org). > > If Ulad would prefer that we push ahead then OK. > > That's fine. No rush from my side. > > > Are we able to describe how much memory this change might save under > > various scenarios? If the savings are impressively large then that > > would get attention. > > The primary purpose of this is to ensure that this scenario is not > possible: > > * There is a global list in the Binder driver. It's an array allocated > using kvmalloc and resized on demand using kvrealloc. > * A process decides to add a bajillion elements to that global list. > * The process exits, taking its entries with it. > * The global list now remains extremely large for no good reason. > > I don't know if it would save a significant amount of memory for > well-behaved programs. > > Alice Agree, let's postpone this, so i have a chance to check it one more time even though it seems ready. -- Uladzislau Rezki