Commit 92fe7260 authored by Maged Michael's avatar Maged Michael Committed by Facebook GitHub Bot

hazptr: Clarify warning about reclamation executor

Summary:
Change WARNING to INFO because there are cases where not using a dedicated thread pool is the right choice. INFO still provides the debugging benefit if the lack of dedicated thread pool indeed leads to deadlock.

Clarify that the likely cause for the message about the reclamation executor is that the program did not call folly::enable_hazptr_thread_pool_executor which is called by folly::init.

Reviewed By: yfeldblum, joshkehn

Differential Revision: D23826463

fbshipit-source-id: a5906ee974b5fe87c2d38dcff9a0f2717afb2a5c
parent 09cfcf96
......@@ -667,10 +667,15 @@ class hazptr_domain {
FOLLY_EXPORT FOLLY_NOINLINE void hazptr_warning_using_inline_executor() {
static std::atomic<uint64_t> warning_count{0};
if ((warning_count++ % 10000) == 0) {
LOG(WARNING)
<< "Using the default inline executor for asynchronous reclamation "
"may be susceptible to deadlock if the current thread happens to "
"hold a resource needed by the deleter of a reclaimable object";
LOG(INFO) << "Using the default inline executor. "
"This is not necessarily a problem. "
"But if this program encounters deadlock, "
"then this may be the cause. "
"Most likely this program did not call "
"folly::enable_hazptr_thread_pool_executor "
"(which is normally called by folly::init). "
"If this is a problem check if your program is missing "
"a call to folly::init or an alternative.";
}
}
}; // namespace folly
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment