Re: [PATCH v6 2/6] PM / Runtime: introduce pm_runtime_set_memalloc_noio()

From
Ming Lei <hidden>
Date
2012-11-28 09:47:24
Also in
linux-mm, linux-pm, lkml
Reply to
Rafael J. Wysocki, 2012-11-28
On Wed, Nov 28, 2012 at 5:29 PM, Rafael J. Wysocki [off-list ref] wrote:
But it doesn't have to walk the children.  Moreover, with counters it only
Yeah, I got it, it is the advantage of counter, but with extra 'int'
field introduced
in 'struct device'.
needs to walk the whole path if all devices in it need to be updated.  For
example, if you call pm_runtime_set_memalloc_noio(dev, true) for a device
whose parent's counter is greater than zero already, you don't need to
walk the path above the parent.
We still can do it with the flag only, pm_runtime_set_memalloc_noio(dev, true)
can return immediately if one parent or the 'dev' flag is true.

But considered that the pm_runtime_set_memalloc_noio(dev, false) is only
called in a very infrequent path(network/block device->remove()), looks the
introduced cost isn't worthy of the obtained advantage.

So could you accept not introducing counter? and I will update with the
above improvement you suggested.

Thanks,
--
Ming Lei

--
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>
Thread (19 messages) 19 messages, 3 authors, last reply 2012-11-28
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help