Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3005)

Unified Diff: content/renderer/render_thread_impl.cc

Issue 2334533002: base: Move renderer threads to the appropriate cpuset. (Closed)
Patch Set: use file thread Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/renderer/render_thread_impl.cc
diff --git a/content/renderer/render_thread_impl.cc b/content/renderer/render_thread_impl.cc
index eb7094a55a274d2384e6dd7d58d1202cb82a859a..7c267b35fa6afcdd8e0997e16bafbd8f9635900c 100644
--- a/content/renderer/render_thread_impl.cc
+++ b/content/renderer/render_thread_impl.cc
@@ -858,6 +858,13 @@ void RenderThreadImpl::Init(
time_zone_monitor->AddClient(
time_zone_monitor_binding_.CreateInterfacePtrAndBind());
+#if defined(OS_LINUX)
+ ChildProcess::current()->SetIOThreadPriority(base::ThreadPriority::DISPLAY);
+ ChildThreadImpl::current()->SetThreadPriority(
+ categorized_worker_pool_->background_worker_thread_id(),
Nico 2016/09/19 20:49:30 Doesn't the worker pool have more than one id?
reveman 2016/09/19 21:43:39 It has a single thread for background work and N n
+ base::ThreadPriority::BACKGROUND);
+#endif
+
is_renderer_suspended_ = false;
}
@@ -1134,6 +1141,10 @@ void RenderThreadImpl::InitializeCompositorThread() {
compositor_task_runner_->PostTask(
FROM_HERE,
base::Bind(base::IgnoreResult(&ThreadRestrictions::SetIOAllowed), false));
+#if defined(OS_LINUX)
+ ChildThreadImpl::current()->SetThreadPriority(compositor_thread_->threadId(),
+ base::ThreadPriority::DISPLAY);
+#endif
SynchronousInputHandlerProxyClient* synchronous_input_handler_proxy_client =
nullptr;

Powered by Google App Engine
This is Rietveld 408576698