linux/drivers/base
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
..
power Merge branches 'pm-core' and 'pm-domains' 2016-02-06 00:34:01 +01:00
regmap regmap: mmio: Revert to v4.4 endianness handling 2016-02-05 11:22:04 +00:00
Kconfig
Makefile
attribute_container.c
base.h
bus.c
cacheinfo.c
class.c
component.c component: remove device from master match list on failed add 2016-02-11 09:42:09 +00:00
container.c
core.c
cpu.c drivers/base/cpu.c: use __cpu_*_mask directly 2016-01-20 17:09:18 -08:00
dd.c
devcoredump.c
devres.c
devtmpfs.c wrappers for ->i_mutex access 2016-01-22 18:04:28 -05:00
dma-coherent.c
dma-contiguous.c
dma-mapping.c dma-mapping: remove <asm-generic/dma-coherent.h> 2016-01-20 17:09:18 -08:00
driver.c
firmware.c
firmware_class.c
hypervisor.c
init.c
isa.c
map.c
memory.c memory-hotplug: add automatic onlining policy for the newly added memory 2016-03-15 16:55:16 -07:00
module.c
node.c
pinctrl.c
platform-msi.c base: Export platform_msi_domain_[alloc,free]_irqs 2016-01-26 16:33:25 +01:00
platform.c base/platform: Fix platform drivers with no probe callback 2016-01-26 08:47:25 -08:00
property.c device property: fwnode->secondary may contain ERR_PTR(-ENODEV) 2016-03-09 01:07:43 +01:00
soc.c
syscore.c
topology.c
transport_class.c