linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [Patch v4 0/7] acpi,memory-hotplug : implement framework for hot removing memory
@ 2012-11-08 11:04 Wen Congyang
  2012-11-08 11:04 ` [Patch v4 1/7] acpi,memory-hotplug: introduce a mutex lock to protect the list in acpi_memory_device Wen Congyang
                   ` (6 more replies)
  0 siblings, 7 replies; 12+ messages in thread
From: Wen Congyang @ 2012-11-08 11:04 UTC (permalink / raw)
  To: linux-kernel, linux-mm, linux-acpi, Len Brown
  Cc: Rafael J. Wysocki, Andrew Morton, Yasuaki Ishimatsu,
	Lai Jiangshan, Jiang Liu, KOSAKI Motohiro, Minchan Kim,
	Mel Gorman, David Rientjes, Konrad Rzeszutek Wilk, Toshi Kani,
	Wen Congyang

The memory device can be removed by 2 ways:
1. send eject request by SCI
2. echo 1 >/sys/bus/pci/devices/PNP0C80:XX/eject

In the 1st case, acpi_memory_disable_device() will be called.
In the 2nd case, acpi_memory_device_remove() will be called.
acpi_memory_device_remove() will also be called when we unbind the
memory device from the driver acpi_memhotplug or a driver initialization
fails.

acpi_memory_disable_device() has already implemented a code which
offlines memory and releases acpi_memory_info struct . But
acpi_memory_device_remove() has not implemented it yet.

So the patch prepares the framework for hot removing memory and
adds the framework into acpi_memory_device_remove().

The last version of this patchset is here:
https://lkml.org/lkml/2012/10/26/175

Note: patch1-2 are in pm tree now. And there is a bug in patch1, so I resend
them. The commit in pm tree is:
patch1: 85fcb3758c10e063a2a30dfad75017097999deed
patch2: d0fbb400b6f3a6191bdc5024f8733b2e2b86338f

Changes from v3 to v4:
1. patch1: unlock list_lock when removing memory fails.
2. patch2: just rebase them
3. patch3-7: these patches are in -mm tree, and they conflict with this
   patchset, so Adrew Morton drop them from -mm tree. I rebase and merge
   them into this patchset.

Wen Congyang (6):
  acpi,memory-hotplug: introduce a mutex lock to protect the list in
    acpi_memory_device
  acpi_memhotplug.c: fix memory leak when memory device is unbound from
    the module acpi_memhotplug
  acpi_memhotplug.c: free memory device if acpi_memory_enable_device()
    failed
  acpi_memhotplug.c: don't allow to eject the memory device if it is
    being used
  acpi_memhotplug.c: bind the memory device when the driver is being
    loaded
  acpi_memhotplug.c: auto bind the memory device which is hotplugged
    before the driver is loaded

Yasuaki Ishimatsu (1):
  acpi,memory-hotplug : add memory offline code to
    acpi_memory_device_remove()

 drivers/acpi/acpi_memhotplug.c | 168 ++++++++++++++++++++++++++++++++---------
 1 file changed, 133 insertions(+), 35 deletions(-)

-- 
1.8.0

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2012-11-15  1:29 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-08 11:04 [Patch v4 0/7] acpi,memory-hotplug : implement framework for hot removing memory Wen Congyang
2012-11-08 11:04 ` [Patch v4 1/7] acpi,memory-hotplug: introduce a mutex lock to protect the list in acpi_memory_device Wen Congyang
2012-11-12 21:00   ` Toshi Kani
2012-11-13  2:04     ` Wen Congyang
2012-11-14 23:34       ` Rafael J. Wysocki
2012-11-15  1:24         ` Wen Congyang
2012-11-08 11:04 ` [Patch v4 2/7] acpi,memory-hotplug : add memory offline code to acpi_memory_device_remove() Wen Congyang
2012-11-08 11:04 ` [Patch v4 3/7] acpi_memhotplug.c: fix memory leak when memory device is unbound from the module acpi_memhotplug Wen Congyang
2012-11-08 11:04 ` [Patch v4 4/7] acpi_memhotplug.c: free memory device if acpi_memory_enable_device() failed Wen Congyang
2012-11-08 11:04 ` [Patch v4 5/7] acpi_memhotplug.c: don't allow to eject the memory device if it is being used Wen Congyang
2012-11-08 11:04 ` [Patch v4 6/7] acpi_memhotplug.c: bind the memory device when the driver is being loaded Wen Congyang
2012-11-08 11:04 ` [Patch v4 7/7] acpi_memhotplug.c: auto bind the memory device which is hotplugged before the driver is loaded Wen Congyang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).