Thread (20 messages) 20 messages, 4 authors, 2011-11-21

Re: [PATCH v3] PM/Memory-hotplug: Avoid task freezing failures

From: Rafael J. Wysocki <hidden>
Date: 2011-11-21 20:03:08
Also in: lkml

On Monday, November 21, 2011, Srivatsa S. Bhat wrote:
On 11/21/2011 11:22 PM, Tejun Heo wrote:
quoted
Hello,

On Mon, Nov 21, 2011 at 10:34:40PM +0530, Srivatsa S. Bhat wrote:
quoted
quoted
quoted
I haven't tested this solution yet. Let me know if this solution looks
good and I'll send it out as a patch after testing and analyzing some
corner cases, if any.
I tested this, and it works great! I'll send the patch in some time.
Awesome.
quoted
quoted
* I think it would be better to remove direct access to pm_mutex and
  use [un]lock_system_sleep() universally.  I don't think hinging it
  on CONFIG_HIBERNATE_CALLBACKS buys us anything.
Which direct access to pm_mutex are you referring to?
Other than suspend/hibernation call paths, I think mem-hotplug is the only
subsystem trying to access pm_mutex. I haven't checked thoroughly though. 

But yes, using lock_system_sleep() for mutually excluding some code path
from suspend/hibernation is good, and that is one reason why I wanted
to fix this API ASAP. But as long as memory hotplug is the only direct user
of pm_mutex, is it justified to remove the CONFIG_HIBERNATE_CALLBACKS
restriction and make it generic? I don't know...

Or, are you saying that we should use these APIs even in suspend/hibernate
call paths? That's not such a bad idea either...
Yeap, all.  It's just confusing to have two different types of access
to a single lock and I don't believe CONFIG_HIBERNATE_CALLBACKS is a
meaningful optimization in this case.
Ok that sounds good, I'll send a separate patch for that.
Rafael, do you also agree that this would be better?
Yes, it would.

Thanks,
Rafael

--
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/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help