Files
linux/include/linux
Gregory Price 44d46b76c3 mm: add build-time option for hotplug memory default online type
Memory hotplug presently auto-onlines memory into a zone the kernel deems
appropriate if CONFIG_MEMORY_HOTPLUG_DEFAULT_ONLINE=y.

The memhp_default_state boot param enables runtime config, but it's not
possible to do this at build-time.

Remove CONFIG_MEMORY_HOTPLUG_DEFAULT_ONLINE, and replace it with
CONFIG_MHP_DEFAULT_ONLINE_TYPE_* choices that sync with the boot param.

Selections:
  CONFIG_MHP_DEFAULT_ONLINE_TYPE_OFFLINE
    => mhp_default_online_type = "offline"
       Memory will not be onlined automatically.

  CONFIG_MHP_DEFAULT_ONLINE_TYPE_ONLINE_AUTO
    => mhp_default_online_type = "online"
       Memory will be onlined automatically in a zone deemed.
       appropriate by the kernel.

  CONFIG_MHP_DEFAULT_ONLINE_TYPE_ONLINE_KERNEL
    => mhp_default_online_type = "online_kernel"
       Memory will be onlined automatically.
       The zone may allow kernel data (e.g. ZONE_NORMAL).

  CONFIG_MHP_DEFAULT_ONLINE_TYPE_ONLINE_MOVABLE
    => mhp_default_online_type = "online_movable"
       Memory will be onlined automatically.
       The zone will be ZONE_MOVABLE.

Default to CONFIG_MHP_DEFAULT_ONLINE_TYPE_OFFLINE to match the existing
default CONFIG_MEMORY_HOTPLUG_DEFAULT_ONLINE=n behavior.

Existing users of CONFIG_MEMORY_HOTPLUG_DEFAULT_ONLINE=y should use
CONFIG_MHP_DEFAULT_ONLINE_TYPE_ONLINE_AUTO.

[gourry@gourry.net: update KConfig comments]
  Link: https://lkml.kernel.org/r/20241226182918.648799-1-gourry@gourry.net
Link: https://lkml.kernel.org/r/20241220210709.300066-1-gourry@gourry.net
Signed-off-by: Gregory Price <gourry@gourry.net>
Acked-by: David Hildenbrand <david@redhat.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Huacai Chen <chenhuacai@kernel.org>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Oscar Salvador <osalvador@suse.de>
Cc: "Rafael J. Wysocki" <rafael@kernel.org>
Cc: WANG Xuerui <kernel@xen0n.name>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2025-01-25 20:22:21 -08:00
..
2024-10-22 15:54:11 +02:00
2024-10-11 14:34:11 -04:00
2024-10-13 17:16:57 +02:00
2024-10-11 14:37:29 +05:30
2024-10-14 23:27:57 +05:30
2024-11-11 10:45:03 +01:00
2024-10-09 15:42:48 +01:00
2024-08-28 06:53:58 -07:00
2024-11-07 14:38:07 -08:00
2024-10-14 18:33:04 -07:00
2024-07-08 01:51:05 -06:00
2024-09-03 21:15:36 -07:00
2024-06-24 18:29:20 +02:00
2024-06-11 12:57:49 -05:00
2024-11-05 13:32:21 +01:00
2024-10-22 11:16:56 +02:00
2024-10-19 14:16:45 +02:00
2024-10-01 17:01:40 +02:00
2024-05-19 14:36:17 -07:00
2025-01-13 22:40:31 -08:00
2024-11-09 14:55:33 +01:00
2024-11-28 14:49:28 +01:00
2024-08-29 10:39:37 +02:00
2024-11-24 17:05:27 -08:00
2024-07-31 13:49:48 +01:00
2024-08-08 17:15:02 +02:00
2024-10-16 21:56:59 +02:00
2024-06-24 22:24:56 -07:00
2024-10-30 19:47:20 +01:00
2024-09-03 21:15:46 -07:00
2024-09-20 18:28:26 +03:00
2024-09-01 20:26:03 -07:00
2024-11-05 16:56:26 -08:00
2024-07-03 19:30:23 -07:00
2024-10-14 16:33:24 -05:00
2024-08-11 17:04:29 +01:00
2024-07-31 09:57:18 -07:00
2024-07-28 16:47:51 -06:00
2024-09-23 15:03:30 -04:00
2024-06-24 22:25:02 -07:00
2024-11-05 16:56:26 -08:00
2024-08-30 08:22:38 +02:00
2024-11-16 10:09:30 -06:00
2024-10-02 16:23:10 -05:00
2024-11-05 12:55:38 +01:00
2025-01-13 22:40:50 -08:00
2024-09-11 20:44:31 -07:00
2024-09-11 20:44:32 -07:00
2024-05-04 18:57:21 +02:00
2024-11-30 22:41:35 -05:00
2024-11-11 00:26:44 -08:00
2024-07-10 07:59:03 +02:00
2024-11-06 12:59:44 -05:00
2024-10-02 16:53:38 +02:00
2024-05-06 12:05:00 +02:00
2024-08-06 13:42:40 +02:00
2024-11-18 11:56:21 +00:00
2024-09-12 12:20:39 +02:00
2024-06-24 18:16:44 +01:00
2024-11-06 12:59:44 -05:00