aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/export-to-sqlite.py
diff options
context:
space:
mode:
authorDavid Hildenbrand <[email protected]>2020-04-06 20:07:32 -0700
committerLinus Torvalds <[email protected]>2020-04-07 10:43:40 -0700
commitbc58ebd506c369c26337cf6b1a400af1a25c989c (patch)
tree4e5c7e1dc60f66276c96518ecfb7e1fa65a99caa /tools/perf/scripts/python/export-to-sqlite.py
parented7f9fec8c8f8227ebd1fb69feda60ce4a7df61f (diff)
hv_balloon: don't check for memhp_auto_online manually
We get the MEM_ONLINE notifier call if memory is added right from the kernel via add_memory() or later from user space. Let's get rid of the "ha_waiting" flag - the wait event has an inbuilt mechanism (->done) for that. Initialize the wait event only once and reinitialize before adding memory. Unconditionally call complete() and wait_for_completion_timeout(). If there are no waiters, complete() will only increment ->done - which will be reset by reinit_completion(). If complete() has already been called, wait_for_completion_timeout() will not wait. There is still the chance for a small race between concurrent reinit_completion() and complete(). If complete() wins, we would not wait - which is tolerable (and the race exists in current code as well). Note: We only wait for "some" memory to get onlined, which seems to be good enough for now. [[email protected]: register_memory_notifier() after init_completion(), per David] Signed-off-by: David Hildenbrand <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Reviewed-by: Vitaly Kuznetsov <[email protected]> Reviewed-by: Baoquan He <[email protected]> Cc: "K. Y. Srinivasan" <[email protected]> Cc: Haiyang Zhang <[email protected]> Cc: Stephen Hemminger <[email protected]> Cc: Wei Liu <[email protected]> Cc: Oscar Salvador <[email protected]> Cc: "Rafael J. Wysocki" <[email protected]> Cc: Wei Yang <[email protected]> Cc: Benjamin Herrenschmidt <[email protected]> Cc: Eduardo Habkost <[email protected]> Cc: Greg Kroah-Hartman <[email protected]> Cc: Igor Mammedov <[email protected]> Cc: Michael Ellerman <[email protected]> Cc: Paul Mackerras <[email protected]> Cc: Yumei Huang <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/export-to-sqlite.py')
0 files changed, 0 insertions, 0 deletions