linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Wen Congyang <wency@cn.fujitsu.com>
To: linux-kernel@vger.kernel.org, linux-mm@kvack.org,
	linux-acpi@vger.kernel.org, Len Brown <len.brown@intel.com>,
	"Rafael J. Wysocki" <rjw@sisk.pl>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Yasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com>,
	Lai Jiangshan <laijs@cn.fujitsu.com>,
	Jiang Liu <jiang.liu@huawei.com>,
	KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>,
	Minchan Kim <minchan.kim@gmail.com>, Mel Gorman <mgorman@suse.de>,
	David Rientjes <rientjes@google.com>,
	Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>,
	Toshi Kani <toshi.kani@hp.com>,
	Wen Congyang <wency@cn.fujitsu.com>
Subject: [Patch v5 0/7] acpi,memory-hotplug: implement framework for hot removing memory
Date: Thu, 15 Nov 2012 14:59:30 +0800	[thread overview]
Message-ID: <1352962777-24407-1-git-send-email-wency@cn.fujitsu.com> (raw)

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().

We may hotremove the memory device by this 2 ways at the same time.
So we remove the function acpi_memory_disable_device(), and use
acpi_bus_hot_remove_device() which is used by 2nd case to implement it.
We lock device in acpi_bus_hot_remove_device(), so there is no
need to add lock in acpi_memhotplug.

The last version of this patchset is here:
https://lkml.org/lkml/2012/11/8/121

Note:
1. The following commit in pm tree can be dropped now(The other two patches
   are already dropped):
   54c4c7db6cb94d7d1217df6d7fca6847c61744ab
2. This patchset requires the following patch(It is in pm tree now)
   https://lkml.org/lkml/2012/11/1/225

Changes from v4 to v5:
1. patch2: new patch. use acpi_bus_hot_remove_device() to implement memory
   device hotremove.

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: deal with eject request in hotplug queue
  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 | 206 ++++++++++++++++++++++-------------------
 1 file changed, 109 insertions(+), 97 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>

             reply	other threads:[~2012-11-15  6:53 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-15  6:59 Wen Congyang [this message]
2012-11-15  6:59 ` [Patch v5 1/7] acpi,memory-hotplug : add memory offline code to acpi_memory_device_remove() Wen Congyang
2012-11-15 23:03   ` David Rientjes
2012-11-15  6:59 ` [Patch v5 2/7] acpi,memory-hotplug: deal with eject request in hotplug queue Wen Congyang
2012-11-15  9:13   ` Yasuaki Ishimatsu
2012-11-15 22:09   ` Toshi Kani
2012-11-15 23:32   ` David Rientjes
2012-11-16  1:54     ` Wen Congyang
2012-11-15  6:59 ` [Patch v5 3/7] acpi_memhotplug.c: fix memory leak when memory device is unbound from the module acpi_memhotplug Wen Congyang
2012-11-15  9:15   ` Yasuaki Ishimatsu
2012-11-15 23:34   ` David Rientjes
2012-11-15  6:59 ` [Patch v5 4/7] acpi_memhotplug.c: free memory device if acpi_memory_enable_device() failed Wen Congyang
2012-11-15  9:17   ` Yasuaki Ishimatsu
2012-11-15 23:36   ` David Rientjes
2012-11-15  6:59 ` [Patch v5 5/7] acpi_memhotplug.c: don't allow to eject the memory device if it is being used Wen Congyang
2012-11-15  9:20   ` Yasuaki Ishimatsu
2012-11-15 23:39   ` David Rientjes
2012-11-29 13:15   ` andywu106建国
2012-11-15  6:59 ` [Patch v5 6/7] acpi_memhotplug.c: bind the memory device when the driver is being loaded Wen Congyang
2012-11-15  9:22   ` Yasuaki Ishimatsu
2012-11-15 23:40   ` David Rientjes
2012-11-15  6:59 ` [Patch v5 7/7] acpi_memhotplug.c: auto bind the memory device which is hotplugged before the driver is loaded Wen Congyang
2012-11-15  9:57   ` Yasuaki Ishimatsu
2012-11-15 22:45   ` Toshi Kani
2012-11-15 22:51 ` [Patch v5 0/7] acpi,memory-hotplug: implement framework for hot removing memory David Rientjes
2012-11-15 23:22   ` Rafael J. Wysocki
2012-11-15 23:33     ` Rafael J. Wysocki
2012-11-16  0:28 ` Rafael J. Wysocki
2012-11-16  0:40   ` Rafael J. Wysocki
2012-11-16  0:40     ` Toshi Kani
2012-11-16  1:02       ` Rafael J. Wysocki
2012-11-16  1:07   ` Yasuaki Ishimatsu
2012-11-16  1:28     ` Rafael J. Wysocki
2012-11-16  1:31       ` Yasuaki Ishimatsu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1352962777-24407-1-git-send-email-wency@cn.fujitsu.com \
    --to=wency@cn.fujitsu.com \
    --cc=akpm@linux-foundation.org \
    --cc=isimatu.yasuaki@jp.fujitsu.com \
    --cc=jiang.liu@huawei.com \
    --cc=konrad.wilk@oracle.com \
    --cc=kosaki.motohiro@jp.fujitsu.com \
    --cc=laijs@cn.fujitsu.com \
    --cc=len.brown@intel.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mgorman@suse.de \
    --cc=minchan.kim@gmail.com \
    --cc=rientjes@google.com \
    --cc=rjw@sisk.pl \
    --cc=toshi.kani@hp.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).