linux/drivers/xen
Vitaly Kuznetsov 31bc3858ea memory-hotplug: add automatic onlining policy for the newly added memory
Currently, all newly added memory blocks remain in 'offline' state
unless someone onlines them, some linux distributions carry special udev
rules like:

  SUBSYSTEM=="memory", ACTION=="add", ATTR{state}=="offline", ATTR{state}="online"

to make this happen automatically.  This is not a great solution for
virtual machines where memory hotplug is being used to address high
memory pressure situations as such onlining is slow and a userspace
process doing this (udev) has a chance of being killed by the OOM killer
as it will probably require to allocate some memory.

Introduce default policy for the newly added memory blocks in
/sys/devices/system/memory/auto_online_blocks file with two possible
values: "offline" which preserves the current behavior and "online"
which causes all newly added memory blocks to go online as soon as
they're added.  The default is "offline".

Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Daniel Kiper <daniel.kiper@oracle.com>
Cc: Dan Williams <dan.j.williams@intel.com>
Cc: Tang Chen <tangchen@cn.fujitsu.com>
Cc: David Vrabel <david.vrabel@citrix.com>
Acked-by: David Rientjes <rientjes@google.com>
Cc: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
Cc: Xishi Qiu <qiuxishi@huawei.com>
Cc: Mel Gorman <mgorman@techsingularity.net>
Cc: "K. Y. Srinivasan" <kys@microsoft.com>
Cc: Igor Mammedov <imammedo@redhat.com>
Cc: Kay Sievers <kay@vrfy.org>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2016-03-15 16:55:16 -07:00
..
events tags: Fix DEFINE_PER_CPU expansions 2016-03-15 16:55:16 -07:00
xen-pciback xen/pciback: Save the number of MSI-X entries to be copied later. 2016-02-15 14:21:10 +00:00
xenbus Xen bug fixes for 4.5-rc5 2016-02-22 13:57:01 -08:00
xenfs xen: rename dom0_op to platform_op 2015-12-21 14:40:55 +00:00
Kconfig
Makefile xen: move xen_setup_runstate_info and get_runstate_snapshot to drivers/xen/time.c 2015-12-21 14:40:52 +00:00
acpi.c xen: rename dom0_op to platform_op 2015-12-21 14:40:55 +00:00
balloon.c memory-hotplug: add automatic onlining policy for the newly added memory 2016-03-15 16:55:16 -07:00
biomerge.c xen/biomerge: Don't allow biovec's to be merged when Linux is not using 4KB pages 2015-10-23 14:20:36 +01:00
cpu_hotplug.c xen, cpu_hotplug: call device_offline instead of cpu_down 2015-10-23 14:20:48 +01:00
dbgp.c
efi.c xen: rename dom0_op to platform_op 2015-12-21 14:40:55 +00:00
evtchn.c xen/evtchn: dynamically grow pending event channel ring 2015-11-26 18:49:54 +00:00
fallback.c
features.c
gntalloc.c
gntdev.c xen/gntdev: add ioctl for grant copy 2016-01-07 13:21:53 +00:00
grant-table.c xen/grant-table: constify gnttab_ops structure 2015-12-21 14:41:01 +00:00
manage.c
mcelog.c
pci.c
pcpu.c xen: rename dom0_op to platform_op 2015-12-21 14:40:55 +00:00
platform-pci.c
preempt.c
privcmd.c xen/privcmd: Add support for Linux 64KB page granularity 2015-10-23 14:20:42 +01:00
privcmd.h
swiotlb-xen.c xen/swiotlb: Add support for 64KB page granularity 2015-10-23 14:20:43 +01:00
sys-hypervisor.c
time.c xen/time: use READ_ONCE 2015-12-21 14:41:00 +00:00
tmem.c cleancache: constify cleancache_ops structure 2016-01-27 09:09:57 -05:00
xen-acpi-cpuhotplug.c xen: rename dom0_op to platform_op 2015-12-21 14:40:55 +00:00
xen-acpi-memhotplug.c
xen-acpi-pad.c xen: rename dom0_op to platform_op 2015-12-21 14:40:55 +00:00
xen-acpi-processor.c xen: rename dom0_op to platform_op 2015-12-21 14:40:55 +00:00
xen-balloon.c
xen-scsiback.c xen/scsiback: avoid warnings when adding multiple LUNs to a domain 2016-02-08 16:51:36 +00:00
xen-selfballoon.c
xen-stub.c
xlate_mmu.c xen/privcmd: Add support for Linux 64KB page granularity 2015-10-23 14:20:42 +01:00