Skip to contentSkip to conversation

what's the incompatibility between hibernation and hotplug memory

DISCUSSION Jeremy Fitzhardinge 3 participants 9 messages Mar 26, 2008 – Apr 2, 2008

lore
Share & tools
lore
#0 lore raw

Hi,

I noticed that Kconfig warns that hibernation and hotplug memory are not compatible. What's the issue?

Thanks,
J

#1 lore raw
Quoted 1 line · Jeremy Fitzhardinge

Hi,

Hi,

Quoted 2 lines

I noticed that Kconfig warns that hibernation and hotplug memory are not compatible. What's the issue?

Generally, we might not be able to handle memory unplugged at a wrong time (eg. after we've created the image).

Which part of Kconfig says that exactly?

Rafael

#2 lore raw
Quoted 3 lines · Rafael J. Wysocki

Generally, we might not be able to handle memory unplugged at a wrong time (eg. after we've created the image).

Hot memory unplugging is distinct from memory hotplug.

Quoted 2 lines

Which part of Kconfig says that exactly?

mm/Kconfig:

config MEMORY_HOTPLUG

	bool "Allow for memory hot-add"
	depends on SPARSEMEM || X86_64_ACPI_NUMA
	depends on HOTPLUG && !HIBERNATION && ARCH_ENABLE_MEMORY_HOTPLUG
	depends on (IA64 || X86 || PPC64 || SUPERH)

comment "Memory hotplug is currently incompatible with Software Suspend"

	depends on SPARSEMEM && HOTPLUG && HIBERNATION

J

#3 lore raw
In reply to Rafael J. Wysocki

Hi!

Quoted 7 lines
Quoted 2 lines

I noticed that Kconfig warns that hibernation and hotplug memory are not compatible. What's the issue?

Generally, we might not be able to handle memory unplugged at a wrong time (eg. after we've created the image).

Which part of Kconfig says that exactly?

Actually I believe it is simpler than that. We were not prepared to deal with memory holes in hibernation code, so we just disabled it in Kconfig...
Pavel

Signature · 3 lines
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
pomozte zachranit klanovicky les:  http://www.ujezdskystrom.info/
#4 lore raw
Quoted 8 lines · Pavel Machek

Hi!

Quoted 5 lines
Quoted 2 lines

I noticed that Kconfig warns that hibernation and hotplug memory are not compatible. What's the issue?

Generally, we might not be able to handle memory unplugged at a wrong time (eg. after we've created the image).

Quoted 6 lines
Quoted 2 lines

Which part of Kconfig says that exactly?

Actually I believe it is simpler than that. We were not prepared to deal with memory holes in hibernation code, so we just disabled it in Kconfig...

Doesn't that mean its generally incompatible with non-flatmem memory arrangements rather than hotplug memory specifically?

J

#5 lore raw
Quoted 13 lines · Jeremy Fitzhardinge
Quoted 12 lines · Pavel Machek

Hi!

Quoted 8 lines
Quoted 3 lines

I noticed that Kconfig warns that hibernation and hotplug memory are not compatible. What's the issue?

Generally, we might not be able to handle memory unplugged at a wrong time (eg. after we've created the image).

Which part of Kconfig says that exactly?

Quoted 6 lines
Quoted 3 lines

Actually I believe it is simpler than that. We were not prepared to deal with memory holes in hibernation code, so we just disabled it in Kconfig...

Doesn't that mean its generally incompatible with non-flatmem memory arrangements rather than hotplug memory specifically?

No, it should work with NUMA nowadays, actually.

Perhaps it's worth trying it with hotplug memory and see what problems arise?

Thanks,
Rafael

#6 lore raw

Re: what's the incompatibility between hibernation and hotplug?memory

Quoted 18 lines · Rafael J. Wysocki
Quoted 17 lines · Jeremy Fitzhardinge
Quoted 15 lines · Pavel Machek

Hi!

Quoted 8 lines
Quoted 3 lines

I noticed that Kconfig warns that hibernation and hotplug memory are not compatible. What's the issue?

Generally, we might not be able to handle memory unplugged at a wrong time (eg. after we've created the image).

Which part of Kconfig says that exactly?

Actually I believe it is simpler than that. We were not prepared to deal with memory holes in hibernation code, so we just disabled it in Kconfig...

Quoted 6 lines
Quoted 2 lines

Doesn't that mean its generally incompatible with non-flatmem memory arrangements rather than hotplug memory specifically?

No, it should work with NUMA nowadays, actually.

Perhaps it's worth trying it with hotplug memory and see what problems arise?

Good. I believe it is good chance it will work with hotplug, too... as long as memory is not inserted/removed during suspend/resume.
Pavel

Signature · 3 lines
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
pomozte zachranit klanovicky les:  http://www.ujezdskystrom.info/
#7 lore raw

Re: what's the incompatibility between hibernation and hotplug?memory

Quoted 22 lines · Pavel Machek
Quoted 21 lines · Rafael J. Wysocki
Quoted 19 lines · Jeremy Fitzhardinge
Quoted 9 lines · Pavel Machek

Hi!

Quoted 6 lines
Quoted 3 lines

I noticed that Kconfig warns that hibernation and hotplug memory are not compatible. What's the issue?

Generally, we might not be able to handle memory unplugged at a wrong time (eg. after we've created the image).

Quoted 6 lines
Quoted 2 lines

Which part of Kconfig says that exactly?

Actually I believe it is simpler than that. We were not prepared to deal with memory holes in hibernation code, so we just disabled it in Kconfig...

Doesn't that mean its generally incompatible with non-flatmem memory arrangements rather than hotplug memory specifically?

Quoted 6 lines
Quoted 3 lines

No, it should work with NUMA nowadays, actually.

Perhaps it's worth trying it with hotplug memory and see what problems arise?

Good. I believe it is good chance it will work with hotplug, too... as long as memory is not inserted/removed during suspend/resume.

Well, there may be a problem if it's inserted after we've created the image and before powering off, because the resumed kernel will not have any idea of the new memory. It probably will require us to add some resume callbacks for the memory hotplugging to handle this cleanly.

Thanks,
Rafael

#8 lore raw

Re: what's the incompatibility between hibernation and hotplug?memory

Quoted 27 lines · Rafael J. Wysocki
Quoted 26 lines · Pavel Machek
Quoted 24 lines · Rafael J. Wysocki
Quoted 13 lines · Jeremy Fitzhardinge
Quoted 12 lines · Pavel Machek

Hi!

Quoted 8 lines
Quoted 3 lines

I noticed that Kconfig warns that hibernation and hotplug memory are not compatible. What's the issue?

Generally, we might not be able to handle memory unplugged at a wrong time (eg. after we've created the image).

Which part of Kconfig says that exactly?

Quoted 6 lines
Quoted 3 lines

Actually I believe it is simpler than that. We were not prepared to deal with memory holes in hibernation code, so we just disabled it in Kconfig...

Doesn't that mean its generally incompatible with non-flatmem memory arrangements rather than hotplug memory specifically?

No, it should work with NUMA nowadays, actually.

Perhaps it's worth trying it with hotplug memory and see what problems arise?

Quoted 7 lines
Quoted 2 lines

Good. I believe it is good chance it will work with hotplug, too... as long as memory is not inserted/removed during suspend/resume.

Well, there may be a problem if it's inserted after we've created the image and before powering off, because the resumed kernel will not have any idea of the new memory. It probably will require us to add some resume callbacks for the memory hotplugging to handle this cleanly.

Well, "not having any idea of new memory" should not lead to big problems.

"Not being aware that memory was removed" would be worse ;-).

And I think that we have the ammount of memory check, and will refuse the resume which is good failsafe behaviour.

...so someone interested should just test it ;-).
Pavel

Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html