]> rtime.felk.cvut.cz Git - linux-imx.git/commit
ACPI / scan: Add second pass of companion offlining to hot-remove code
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 23 May 2013 08:43:13 +0000 (10:43 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Sat, 1 Jun 2013 19:37:10 +0000 (21:37 +0200)
commit303bfdb1a14d0460feb859cd008ff81da36b517c
treeb83243cb57f069ceb5b3c97efaf22612b777f996
parentea50be59345a2b714fd3ed43e1bba89906c177c3
ACPI / scan: Add second pass of companion offlining to hot-remove code

As indicated by comments in mm/memory_hotplug.c:remove_memory(),
if CONFIG_MEMCG is set, it may not be possible to offline all of the
memory blocks held by one module (FRU) in one pass (because one of
them may be used by the others to store page cgroup in that case
and that block has to be offlined before the other ones).

To handle that arguably corner case, add a second pass of companion
device offlining to acpi_scan_hot_remove() and make it ignore errors
returned in the first pass (and make it skip the second pass if the
first one is successful).

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: Toshi Kani <toshi.kani@hp.com>
drivers/acpi/scan.c