From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f73.google.com (mail-wm1-f73.google.com [209.85.128.73]) (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 1C89A3A5E9A for ; Wed, 4 Mar 2026 21:45:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.73 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772660703; cv=none; b=oCVQ2Eu+2NMo2lINX9iUin6S8ENJcgJ1vVj2GrG8uU99AQY0DNoWIyBL2utFXutxFZyEt8tel0hc90p3q2mOxtL3Sv1yINlij4v4vOv6S5FPDHpjlqvbszbsuN6HYYmSziVBYBleJu5dgAKbYpTmf2uBMYSkoIcfbkPKXJFvlYI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772660703; c=relaxed/simple; bh=AmgLJEMflZJVvXg92SkaJKauGJsAZ4vgvIzdnLeZ2g0=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=ha1VaSz1KMC1HRhOV2qBBm4xxSso9hXWPqCa5CdOWJK96UI5dhBmh5bfdaVOnMNlX2eBwBGTyWBXqUOkcpSTrZSg7Ki99/5u/SuAkO66qF2w52lTA3B8w6AP4fI53+7vKgg/pr+0gTcp1/JVHAtY8W+mRMrIfD2MBuGZHngzGio= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--aliceryhl.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=yl5gYwIf; arc=none smtp.client-ip=209.85.128.73 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--aliceryhl.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="yl5gYwIf" Received: by mail-wm1-f73.google.com with SMTP id 5b1f17b1804b1-4837bfcfe0dso93779515e9.1 for ; Wed, 04 Mar 2026 13:45:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1772660700; x=1773265500; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=IQJWEWEC3u4QRpXVmQh8ZOdiId8Pv3qkT2tXTUlQLLk=; b=yl5gYwIfOQAthitbrFsjTf/M7h+chWn9Kh4N9AC3k9AeaQuU4ITx/EegPQluZrJGzE NxctEdbNAzfzUt4i6ylIngl/IcSyl7dS7jA/HSe6oTa41OquYHxxhcujCwyQlqyhWnFG QmRp+irv6F9Jphg89LzY5PcnBqBvs5lwLV6pYpsMatYAYLaU0JDI1/gQ8AcYGwmGb1ur 7fbPr8YPW5bor5/vD/ct35hvLRRZf8uYp107KCYkrp3xXp4JTKwkjlOyqToAkKsTA5C2 GY3Njkbdi9AZlbDz7boB8UDsm6B974IDOlMbddvwBam8AB6ikxXtQf7jFwcLS495LoCy tR8A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772660700; x=1773265500; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=IQJWEWEC3u4QRpXVmQh8ZOdiId8Pv3qkT2tXTUlQLLk=; b=PgT+lNyZQxbSaTxCpaQ10o4WHq9aQyGXXYcJ1USm0JrKFt9pZqKyMyBszmUKT421Mw 5JaKvvKU6xiKj4de/uvR3hXYWGmGceYnKhu1oqOW43WN++RVq2Nq5sow91m+HXuY1sJG Yq2PEHW3qOSn+6xA4da+6tuneNglpttRjDjOomuNLixKIF8jfOLeOQzKvV5bMtdv+srz cR6dE97R1OW2YJhqDpo2vSb3RFfWWuPgKSkkYuTGHC1ALFEjrkucCKvBKVg8z/LqHoqI MciXt7xCVN58670XMcdMNvIoN7mKQCQhZp1yJA5+8uiRkhuDwOMscnVmzGxTL/mO3rd1 9irA== X-Forwarded-Encrypted: i=1; AJvYcCW2M5zQpAlI43hbkW+xDV87uVZDufados8G/7PpVv98zsrmeLYIOO5JtNYvG04iHahUYU8zrF3Vlp+7F6I=@vger.kernel.org X-Gm-Message-State: AOJu0YyxuHjWL4gpGttYvVSRCd++zy0joPquusJD6ov2kWzr+T2z5Lq8 tjxN+KZGSHfs7ZAJ7izSUcUYk8S7dg1K4HICVwZI/ItXBVWmvK9C+HUh75OpFt0aAHo2UpkQZ1+ H7dKwIXQUjAAqNqM0YQ== X-Received: from wmbe26.prod.google.com ([2002:a05:600c:591a:b0:47e:ddf0:fd00]) (user=aliceryhl job=prod-delivery.src-stubby-dispatcher) by 2002:a05:600c:8b26:b0:485:17a7:ba18 with SMTP id 5b1f17b1804b1-485198a6fd6mr52484545e9.30.1772660700447; Wed, 04 Mar 2026 13:45:00 -0800 (PST) Date: Wed, 4 Mar 2026 21:44:59 +0000 In-Reply-To: <20260304-vmalloc-shrink-v2-1-28c291d60100@zohomail.in> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20260304-vmalloc-shrink-v2-0-28c291d60100@zohomail.in> <20260304-vmalloc-shrink-v2-1-28c291d60100@zohomail.in> Message-ID: Subject: Re: [PATCH v2 1/2] mm/vmalloc: extract vmalloc_free_pages() helper from vfree() From: Alice Ryhl To: shivamkalra98@zohomail.in Cc: Andrew Morton , Uladzislau Rezki , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Danilo Krummrich Content-Type: text/plain; charset="utf-8" On Wed, Mar 04, 2026 at 08:23:15PM +0530, Shivam Kalra via B4 Relay wrote: > From: Shivam Kalra > > Extract the page-freeing loop and NR_VMALLOC stat accounting from > vfree() into a reusable vmalloc_free_pages() helper. The helper operates > on a range [start, end) of pages from a vm_struct, making it suitable > for both full free (vfree) and partial free (upcoming vrealloc shrink). > > No functional change. > > Signed-off-by: Shivam Kalra > - /* > - * High-order allocs for huge vmallocs are split, so > - * can be freed as an array of order-0 allocations > - */ > - if (!(vm->flags & VM_MAP_PUT_PAGES)) > - mod_lruvec_page_state(page, NR_VMALLOC, -1); Any reason this comment was dropped? Alice