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
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 Merge branch 'akpm' (patches from Andrew) 2015-09-10 18:19:42 -07:00
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
Kconfig xen/PMU: Sysfs interface for setting Xen PMU mode 2015-08-20 12:24:26 +01:00
Makefile xen: move xen_setup_runstate_info and get_runstate_snapshot to drivers/xen/time.c 2015-12-21 14:40:52 +00:00
manage.c xen: Use correctly the Xen memory terminologies 2015-09-08 18:03:49 +01:00
mcelog.c xen/mce: fix up xen_late_init_mcelog() error handling 2015-03-16 14:49:15 +00:00
pci.c xen/pci: Try harder to get PXM information for Xen 2015-04-15 10:57:28 +01:00
pcpu.c xen: rename dom0_op to platform_op 2015-12-21 14:40:55 +00:00
platform-pci.c drivers: xen: Mark function as static in platform-pci.c 2014-02-28 15:26:04 -05:00
preempt.c xen/preempt: use need_resched() instead of should_resched() 2015-08-20 12:24:14 +01:00
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 xen/PMU: Sysfs interface for setting Xen PMU mode 2015-08-20 12:24:26 +01:00
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 ACPICA: Resources: Provide common part for struct acpi_resource_address structures. 2015-01-26 16:09:56 +01:00
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: balloon: Use static attribute groups for sysfs entries 2015-03-16 14:49:13 +00:00
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 drivers:xen-selfballoon:reset 'frontswap_inertia_counter' after frontswap_shrink 2014-02-28 15:26:12 -05:00
xen-stub.c
xlate_mmu.c xen/privcmd: Add support for Linux 64KB page granularity 2015-10-23 14:20:42 +01:00