diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2020-05-19 23:50:37 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-19 23:50:37 +0200 |
commit | b7f9eff3bff206122a39dcc436469a7be5c4f9a7 (patch) | |
tree | c16b2a3be57ec1edbe952a2224f48ceb9bc4c99c /searchcore/src | |
parent | 25dd6a302f8c06996801e811398292a1639bdb8f (diff) | |
parent | cdee9f2f3471fa018eadde13e1300a882a327460 (diff) |
Merge pull request #13307 from vespa-engine/havardpe/let-compile-cache-use-shared-executor
let compile cache use shared proton executor
Diffstat (limited to 'searchcore/src')
3 files changed, 7 insertions, 0 deletions
diff --git a/searchcore/src/vespa/searchcore/proton/server/proton.cpp b/searchcore/src/vespa/searchcore/proton/server/proton.cpp index c7000119861..719ba359ccf 100644 --- a/searchcore/src/vespa/searchcore/proton/server/proton.cpp +++ b/searchcore/src/vespa/searchcore/proton/server/proton.cpp @@ -212,6 +212,7 @@ Proton::Proton(const config::ConfigUri & configUri, _protonConfigFetcher(configUri, _protonConfigurer, subscribeTimeout), _warmupExecutor(), _sharedExecutor(), + _compile_cache_executor_binding(), _queryLimiter(), _clock(0.001), _threadPool(128 * 1024), @@ -302,6 +303,7 @@ Proton::init(const BootstrapConfig::SP & configSnapshot) const size_t sharedThreads = deriveCompactionCompressionThreads(protonConfig, hwInfo.cpu()); _sharedExecutor = std::make_unique<vespalib::BlockingThreadStackExecutor>(sharedThreads, 128*1024, sharedThreads*16, proton_shared_executor); + _compile_cache_executor_binding = vespalib::eval::CompileCache::bind(*_sharedExecutor); InitializeThreads initializeThreads; if (protonConfig.initialize.threads > 0) { initializeThreads = std::make_shared<vespalib::ThreadStackExecutor>(protonConfig.initialize.threads, 128 * 1024, initialize_executor); @@ -454,6 +456,7 @@ Proton::~Proton() _persistenceEngine.reset(); _tls.reset(); _warmupExecutor.reset(); + _compile_cache_executor_binding.reset(); _sharedExecutor.reset(); _clock.stop(); LOG(debug, "Explicit destructor done"); diff --git a/searchcore/src/vespa/searchcore/proton/server/proton.h b/searchcore/src/vespa/searchcore/proton/server/proton.h index 4c9d4c77cc4..d0b76bd5804 100644 --- a/searchcore/src/vespa/searchcore/proton/server/proton.h +++ b/searchcore/src/vespa/searchcore/proton/server/proton.h @@ -26,6 +26,7 @@ #include <vespa/vespalib/net/json_handler_repo.h> #include <vespa/vespalib/net/state_explorer.h> #include <vespa/vespalib/util/varholder.h> +#include <vespa/eval/eval/llvm/compile_cache.h> #include <mutex> #include <shared_mutex> @@ -112,6 +113,7 @@ private: ProtonConfigFetcher _protonConfigFetcher; std::unique_ptr<vespalib::ThreadStackExecutorBase> _warmupExecutor; std::unique_ptr<vespalib::ThreadStackExecutorBase> _sharedExecutor; + vespalib::eval::CompileCache::ExecutorBinding::UP _compile_cache_executor_binding; matching::QueryLimiter _queryLimiter; vespalib::Clock _clock; FastOS_ThreadPool _threadPool; diff --git a/searchcore/src/vespa/searchcore/proton/server/searchable_doc_subdb_configurer.cpp b/searchcore/src/vespa/searchcore/proton/server/searchable_doc_subdb_configurer.cpp index 9ef038b7325..c4a0ac5e099 100644 --- a/searchcore/src/vespa/searchcore/proton/server/searchable_doc_subdb_configurer.cpp +++ b/searchcore/src/vespa/searchcore/proton/server/searchable_doc_subdb_configurer.cpp @@ -9,6 +9,7 @@ #include <vespa/searchcore/proton/common/indexschema_inspector.h> #include <vespa/searchcore/proton/reference/i_document_db_reference_resolver.h> #include <vespa/searchcore/proton/reprocessing/attribute_reprocessing_initializer.h> +#include <vespa/eval/eval/llvm/compile_cache.h> using namespace vespa::config::search; using namespace config; @@ -87,6 +88,7 @@ void SearchableDocSubDBConfigurer::reconfigureSearchView(MatchView::SP matchView) { SearchView::SP curr = _searchView.get(); + vespalib::eval::CompileCache::wait_pending(); _searchView.set(SearchView::create(curr->getSummarySetup(), std::move(matchView))); } |