From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E87AF341AB7 for ; Tue, 21 Oct 2025 15:00:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761058853; cv=none; b=r9YEaDqGZZjalQPV+3cBsT5t8WzwVUgg7bs6EsUvKvXqMOJbAGPR3I89eMmn5clX0F46NSrkQF7tQpO7aHnhDxzSMWAtiyi0MDBDSoeeVmFrS5mnUAxJVf+GxpxLD0MdlkDbHPt2Aa2LxyCvTfN/E624KuL/mOmZB2xttY80KwQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761058853; c=relaxed/simple; bh=ptuaLzDjZgkWF1wvDAN8KY/453EoHUcLMwhjUdNpArU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=m7KCt8Eof6JBWKfopWCOXAdPIEEYMcUyX8zvsxrsQVyBD8DDynMOJCIJbVN68gFPASLy52LVbTCRFawuIYER3fN4hq8eXLbhA8OdvI60s51lT66nzv4IocAWRQVxZFcgZv3Gyth9KX6nFtlglgDS8f+EA7+i9jq547Z2M+7XyoU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=IpC93jUa; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="IpC93jUa" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1761058851; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=0WXJD5DBTOSdH4OFa5cGG6Bl5vxCoyITjfVMpwdlj+A=; b=IpC93jUaR4FQ0f+1kLL1Kh3QcitskR4dzhJ3YM147BN/OJ/B8lx6DtJX0uh8zMsCVK20rV UaLSVvqbSXD4wvSvl1Rj9YiPrzOT9km10BaHFIAurE/agMoP7qtElA3UEl2NDgvChPP9cn mxyXS/Gdt9OAMg6fUEZ4/WXm/G8bztk= Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-191-sFbFrAvVMSu5hhcfluv10Q-1; Tue, 21 Oct 2025 11:00:49 -0400 X-MC-Unique: sFbFrAvVMSu5hhcfluv10Q-1 X-Mimecast-MFC-AGG-ID: sFbFrAvVMSu5hhcfluv10Q_1761058848 Received: by mail-wm1-f71.google.com with SMTP id 5b1f17b1804b1-47105bfcf15so31382245e9.2 for ; Tue, 21 Oct 2025 08:00:49 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1761058848; x=1761663648; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=0WXJD5DBTOSdH4OFa5cGG6Bl5vxCoyITjfVMpwdlj+A=; b=PeOGHULG6L3bD0YJlqn6U6XWA52yM6NoiACvEItJ0oc1Du29bpzxwZivyz9uYh7UY0 loiWn1kLvrYEnTEnp06KlV22+MsebwsVwm1kLg8J5YQFpY7nbmGBp0TCkJH4YLc8TzGA 9QNsp3d1isd2YUdTRUpDZX/LuUtwz3rzhuVZxZJXyIYjQHfRXPPwG+U2kffAP8VuLHts DLSUza1p6xLBDmMqx70s6s8h/p4DLw17XHp8nx4JQuFIGHOAJT1WSiAtQKO3Z1+td0YT up90Msixciw78uvqzfsGtJRTB7757ZKXV9sxZUQE+4fBmBoEp/LOj6WG4AFUjvCw/Skq xGMQ== X-Gm-Message-State: AOJu0YxLvjyoJ+oimEnO2h6FKAg5gQ5TLpWvJuBVJsAgLjCAj4ZjyzPA ltnxuLwTNY9YwmQqJdPJnvwhNjlrrRT0GWZhs1O1kkL5til32gg0RCZ8Gi5vl4RNTsxC0Xappr7 Oo7C78xN8L4udQ5EHQtS2tBjR0cyBpCXEvsSyEtMHHRawknpSOBw/rw1ecXOfHsyoMlgMoU7n8m 2JbOkte0caKVOAOutTiWqkVtLLQ7dJ+tv59YQwoiJqxK1r6A== X-Gm-Gg: ASbGnctPdc7CPuX5jOhe8ibSX1SFE8D83LK+l4ERQWj8G7PY8cBsTzuE3JKRkdsERLb DdISs5zCJHNeBjviwd6f6KU6TxmV+8O68/eC8FMomCuETqsWw9NKEGV3wdRzsiQOt+dE1uGQ1Uf pXasn1MROhwHuy1hFdwGC/124+NCLNSYj5wS3Y1ZEm15He+RwvgRatmubwVAxFqukUf7Leam6Ki U7lH66Wu6KmMWi9VYxZQKU1MGRRlycZ/agJXWWdPWaeeUeZM4bv5MpHn2Clj3V/MKg8WfXXKyW7 y2m/ICszpRU6k9z9ifElR0CcgYnY9nYP0gAkwIIAyC++jJ0DBshKXdhEo0fehLCMjhX+aPkk+Pt UZDBKfeeHvsTFEc8fSzUYBS3+Hq45KVha+CNvvOS9GxNonHUlfKnuUp6iY9CD X-Received: by 2002:a05:600c:4e89:b0:46f:b42e:e392 with SMTP id 5b1f17b1804b1-47117931c1dmr117960825e9.39.1761058848198; Tue, 21 Oct 2025 08:00:48 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGDebz8te/SdK4RMl9FXThAzS3UlvHbYsiUZ1AXYYoG1U9LkInArDMPFE9fh7553nINZVhlvg== X-Received: by 2002:a05:600c:4e89:b0:46f:b42e:e392 with SMTP id 5b1f17b1804b1-47117931c1dmr117959965e9.39.1761058847485; Tue, 21 Oct 2025 08:00:47 -0700 (PDT) Received: from localhost (p200300d82f4e3200c99da38b3f3ad4b3.dip0.t-ipconnect.de. [2003:d8:2f4e:3200:c99d:a38b:3f3a:d4b3]) by smtp.gmail.com with UTF8SMTPSA id 5b1f17b1804b1-471144b5c91sm283508025e9.11.2025.10.21.08.00.46 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 21 Oct 2025 08:00:47 -0700 (PDT) From: David Hildenbrand To: linux-kernel@vger.kernel.org Cc: linux-mm@kvack.org, linuxppc-dev@lists.ozlabs.org, Broadcom internal kernel review list , linux-doc@vger.kernel.org, virtualization@lists.linux.dev, Andrew Morton , Oscar Salvador , Lorenzo Stoakes , "Liam R . Howlett" , Vlastimil Babka , Mike Rapoport , Suren Baghdasaryan , Michal Hocko , Jonathan Corbet , Madhavan Srinivasan , Michael Ellerman , Nicholas Piggin , Christophe Leroy , Arnd Bergmann , Greg Kroah-Hartman , Jerrin Shaji George , "Michael S . Tsirkin" , Jason Wang , Xuan Zhuo , =?UTF-8?q?Eugenio=20P=C3=A9rez?= , Zi Yan , David Hildenbrand Subject: [PATCH v1 19/23] mm: rename balloon_compaction.(c|h) to balloon.(c|h) Date: Tue, 21 Oct 2025 17:00:36 +0200 Message-ID: <20251021150040.498160-3-david@redhat.com> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20251021150040.498160-1-david@redhat.com> References: <20251021125929.377194-1-david@redhat.com> <20251021150040.498160-1-david@redhat.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Even without CONFIG_BALLOON_COMPACTION this infrastructure implements basic list and page management for a memory balloon. Signed-off-by: David Hildenbrand --- Documentation/core-api/mm-api.rst | 2 +- MAINTAINERS | 4 ++-- arch/powerpc/platforms/pseries/cmm.c | 2 +- drivers/misc/vmw_balloon.c | 2 +- drivers/virtio/virtio_balloon.c | 2 +- include/linux/{balloon_compaction.h => balloon.h} | 11 +++++------ mm/Makefile | 2 +- mm/{balloon_compaction.c => balloon.c} | 7 +++---- 8 files changed, 15 insertions(+), 17 deletions(-) rename include/linux/{balloon_compaction.h => balloon.h} (92%) rename mm/{balloon_compaction.c => balloon.c} (98%) diff --git a/Documentation/core-api/mm-api.rst b/Documentation/core-api/mm-api.rst index 68193a4cfcf52..aabdd3cba58e8 100644 --- a/Documentation/core-api/mm-api.rst +++ b/Documentation/core-api/mm-api.rst @@ -130,5 +130,5 @@ More Memory Management Functions .. kernel-doc:: mm/vmscan.c .. kernel-doc:: mm/memory_hotplug.c .. kernel-doc:: mm/mmu_notifier.c -.. kernel-doc:: mm/balloon_compaction.c +.. kernel-doc:: mm/balloon.c .. kernel-doc:: mm/huge_memory.c diff --git a/MAINTAINERS b/MAINTAINERS index 46126ce2f968e..878e53d0f65ed 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -27062,9 +27062,9 @@ M: David Hildenbrand L: virtualization@lists.linux.dev S: Maintained F: drivers/virtio/virtio_balloon.c -F: include/linux/balloon_compaction.h +F: include/linux/balloon.h F: include/uapi/linux/virtio_balloon.h -F: mm/balloon_compaction.c +F: mm/balloon.c VIRTIO BLOCK AND SCSI DRIVERS M: "Michael S. Tsirkin" diff --git a/arch/powerpc/platforms/pseries/cmm.c b/arch/powerpc/platforms/pseries/cmm.c index 9ed71683ae402..c5aee15e192ea 100644 --- a/arch/powerpc/platforms/pseries/cmm.c +++ b/arch/powerpc/platforms/pseries/cmm.c @@ -19,7 +19,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/drivers/misc/vmw_balloon.c b/drivers/misc/vmw_balloon.c index 53e9335b6718c..7fd3f709108c2 100644 --- a/drivers/misc/vmw_balloon.c +++ b/drivers/misc/vmw_balloon.c @@ -29,7 +29,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/drivers/virtio/virtio_balloon.c b/drivers/virtio/virtio_balloon.c index 4b22de6a5f845..5434a7739d588 100644 --- a/drivers/virtio/virtio_balloon.c +++ b/drivers/virtio/virtio_balloon.c @@ -13,7 +13,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/include/linux/balloon_compaction.h b/include/linux/balloon.h similarity index 92% rename from include/linux/balloon_compaction.h rename to include/linux/balloon.h index 7757e0e314fdb..82585542300d6 100644 --- a/include/linux/balloon_compaction.h +++ b/include/linux/balloon.h @@ -1,8 +1,7 @@ /* SPDX-License-Identifier: GPL-2.0 */ /* - * include/linux/balloon_compaction.h - * - * Common interface definitions for making balloon pages movable by compaction. + * Common interface for implementing a memory balloon, including support + * for migration of pages inflated in a memory balloon. * * Balloon page migration makes use of the general "movable_ops page migration" * feature. @@ -35,8 +34,8 @@ * * Copyright (C) 2012, Red Hat, Inc. Rafael Aquini */ -#ifndef _LINUX_BALLOON_COMPACTION_H -#define _LINUX_BALLOON_COMPACTION_H +#ifndef _LINUX_BALLOON_H +#define _LINUX_BALLOON_H #include #include #include @@ -75,4 +74,4 @@ static inline void balloon_devinfo_init(struct balloon_dev_info *balloon) balloon->migratepage = NULL; balloon->adjust_managed_page_count = false; } -#endif /* _LINUX_BALLOON_COMPACTION_H */ +#endif /* _LINUX_BALLOON_H */ diff --git a/mm/Makefile b/mm/Makefile index 21abb33535501..ab012157b5109 100644 --- a/mm/Makefile +++ b/mm/Makefile @@ -121,7 +121,7 @@ obj-$(CONFIG_CMA) += cma.o obj-$(CONFIG_NUMA) += numa.o obj-$(CONFIG_NUMA_MEMBLKS) += numa_memblks.o obj-$(CONFIG_NUMA_EMU) += numa_emulation.o -obj-$(CONFIG_MEMORY_BALLOON) += balloon_compaction.o +obj-$(CONFIG_MEMORY_BALLOON) += balloon.o obj-$(CONFIG_PAGE_EXTENSION) += page_ext.o obj-$(CONFIG_PAGE_TABLE_CHECK) += page_table_check.o obj-$(CONFIG_CMA_DEBUGFS) += cma_debug.o diff --git a/mm/balloon_compaction.c b/mm/balloon.c similarity index 98% rename from mm/balloon_compaction.c rename to mm/balloon.c index f41e4a179a431..5734dae81e318 100644 --- a/mm/balloon_compaction.c +++ b/mm/balloon.c @@ -1,15 +1,14 @@ // SPDX-License-Identifier: GPL-2.0-only /* - * mm/balloon_compaction.c - * - * Common interface for making balloon pages movable by compaction. + * Common interface for implementing a memory balloon, including support + * for migration of pages inflated in a memory balloon. * * Copyright (C) 2012, Red Hat, Inc. Rafael Aquini */ #include #include #include -#include +#include /* * Lock protecting the balloon_dev_info of all devices. We don't really -- 2.51.0