From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pg1-f201.google.com (mail-pg1-f201.google.com [209.85.215.201]) (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 745922BDC2C for ; Wed, 18 Mar 2026 23:41:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773877290; cv=none; b=gpWY5Byu5dffplgblKglkOX4Df6hShcQvAy41hPjksw55VFAegBbLssbJb6N8pmDizBWzTbz/MW0MyaAgDp2Yj2cC9N4mIB5qM97/vQxjy6UXgLxVFXOToGNMnZjV+qAFht0ZOyulmjaMqlRGcX9tbELrF7n/XlM8H6L+y/2lho= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773877290; c=relaxed/simple; bh=PUkuqbC/2hA+Ie7zjgbbTXguOya6xqePKuGAMAO1KO0=; h=Date:Mime-Version:Message-ID:Subject:From:To:Cc:Content-Type; b=O7YRLD89gXJ6Ozv878aADDD78NpCUO+JKBw78lU2a6ItZgublz38I5l+/xlAyexyXprvcCTxrXdITnBKqPcrq3LgVTgbI1WExMsX7k4gsPEHGbG0E07LYJ0pmll1YKlCxC861NplOa1Ik6L/y408Q9ZHnARqU8sQUOjRp+DTD8M= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--souravpanda.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=nPmEw4QH; arc=none smtp.client-ip=209.85.215.201 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--souravpanda.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="nPmEw4QH" Received: by mail-pg1-f201.google.com with SMTP id 41be03b00d2f7-c741c4cebf3so306757a12.2 for ; Wed, 18 Mar 2026 16:41:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20251104; t=1773877289; x=1774482089; darn=vger.kernel.org; h=cc:to:from:subject:message-id:mime-version:date:from:to:cc:subject :date:message-id:reply-to; bh=da/no8+opguB6P/AaUZzqXEtIBqgc3BRBZUSTCjb+wg=; b=nPmEw4QH79q8VB6mpXzzLdxXxQQmNgdjfsO+o5u1kelooen5LnGOA2LRV7WCZyC8HR 2e6P95PHiILdlmzl6qSKGzrKCugjPBnBI2WrYi3Kmd829FYQSYblz88i0iQGZle2+S60 /jygbZBCJs/YpDSG79mWofcCPXaKkloFU5+1i37XHmwZitFNWB9uTq5kP1cSj9vfZJLW V9qcaQR6IOFbLOQmu8Ti8WMICW2QfHPPZfuY2U8iqvpSq8T7C9rjpKQ7w2yzZjW9XUXL dB1UokZOOuVM8bEeBfDg5y6Y8goyq2DybNlkReOYWUNwjMcrRaBSKEvesPhh1mP7C60n imng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1773877289; x=1774482089; h=cc:to:from:subject:message-id:mime-version:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=da/no8+opguB6P/AaUZzqXEtIBqgc3BRBZUSTCjb+wg=; b=gUq01fqiIKvo5bnFwVSX7PkgK3Q8SeNnQ+DQX2+EKvmv3MCy7ENju9C3+1kLfEGzzC EqQxyLWieK0PU4CDECUvGptSSTEQF+8U5aSxn1DPfsiqewp0BF/OvyPhg3NGrsC4/ASP itPQsiQn01CMXiSalHRnubJPDs/v9IAq3vbfl8ytQYYgpYGMwoT/54hphIrMOGZoDR8b LTLElXVNlIR17kDxeL4k+B/CmWDEnaNfzoWz31iub/kI8o7RYXPZib99s+g2OBLEIO6+ MJWzCFJHDT8+xt+f1TRBUEzKDWiQ6UCU+h7WdExprWYAwFB/RXOSy4NoEbmR2CDkBc7r w3kw== X-Forwarded-Encrypted: i=1; AJvYcCVoMTWoLVG1s5SQZuDvVBYMCfPXg1DNhC1sU80MMB1M+WSy9PUOhb3+redO06Lnw0g83B1oOX/+0siPBJo=@vger.kernel.org X-Gm-Message-State: AOJu0Yww9WjyOPLNDjJtdS7CDGiUYlq1oIYzmr0Gjhysp7eT82tBO0de 0RQOOUwGedWtd7plxKJEoSPPT2hmnxojL4gr7MyyfZ/jbcl30h16PMfcf75TsLRD1wMMiefFt0k fTuW61iJnpNZEDVo8pjG9pytWfg== X-Received: from pfbfd31.prod.google.com ([2002:a05:6a00:2e9f:b0:829:808f:cb8d]) (user=souravpanda job=prod-delivery.src-stubby-dispatcher) by 2002:a05:6a21:778a:b0:39b:a3d8:d81c with SMTP id adf61e73a8af0-39ba3d8e864mr3052896637.61.1773877288488; Wed, 18 Mar 2026 16:41:28 -0700 (PDT) Date: Wed, 18 Mar 2026 23:41:24 +0000 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 X-Mailer: git-send-email 2.53.0.983.g0bb29b3bc5-goog Message-ID: <20260318234126.3216529-1-souravpanda@google.com> Subject: [LSF/MM/BPF TOPIC][RFC PATCH 0/2] Hugetlb Fungibility for page metadata savings and network performance From: Sourav Panda To: akpm@linux-foundation.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Cc: lsf-pc@lists.linux-foundation.org, songmuchun@bytedance.com, osalvador@suse.de, mike.kravetz@oracle.com, mathieu.desnoyers@efficios.com, willy@infradead.org, david@redhat.com, pasha.tatashin@soleen.com, rientjes@google.com, weixugc@google.com, gthelen@google.com, souravpanda@google.com, surenb@google.com Content-Type: text/plain; charset="UTF-8" The purpose of this RFC is to supplement our discussion in LSF/MM-26. This is sent as a proof of concept. It applies on top of v7.0-rc3. In VM environments, the guest frequently utilizes 1GB HugeTLB pages to reduce TLB misses and minimize page table walk overhead for network-functions. This has the added benefit that it reduces redundant struct page metadata overhead through Hugepage Vmemmap Optimization (HVO). While this saves significant overhead memory, this memory is not available for other purposes; such as the hosted VM-workload or pagecache. The guest must balance two competing memory requirements: HugeTLB Pool: 1GB pages reserved for high-performance NFV applications and yielding page metadata savings. Buddy Allocator: 4KB pages required for business logic, system services, and page cache. Current kernel limitations prevent fungibility of memory between these two pools. As a starting point we propose a hugetlb-shrinker to provide one-way fungibility wherein ~90% guest memory is allocated as 1G hugepages at boot and then converted to buddy pages on demand. Sourav Panda (2): mm: add hugepage shrinker for frozen memory mm/hugetlb: skip hugetlb shrinking for proactive reclaim include/linux/shrinker.h | 3 + mm/Kconfig | 8 +++ mm/hugetlb.c | 131 +++++++++++++++++++++++++++++++++++++++ mm/internal.h | 2 +- mm/shrinker.c | 12 ++-- mm/vmscan.c | 6 +- 6 files changed, 154 insertions(+), 8 deletions(-) -- 2.53.0.959.g497ff81fa9-goog