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

Issue 1660273004: base: Set initial thread priority in ThreadFunc. (Closed)

Created:
4 years, 10 months ago by reveman
Modified:
4 years, 10 months ago
CC:
DaleCurtis, chromium-reviews, piman, Robert Sesek, spang, vmpstr+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

base: Set initial thread priority in ThreadFunc. Instead of relying on base::InitOnThread to set the initial thread priority to normal, always set it to thread_params->priority in ThreadFunc. The result is that thread priority will be set correctly on all posix platforms and not only Android. BUG=584025 TEST=base_unittests --gtest_filter=PlatformThreadTest.ThreadPriorityCurrentThread Committed: https://crrev.com/45828eb26e18f1ba333f0c39b20036a60932886b Cr-Commit-Position: refs/heads/master@{#373761}

Patch Set 1 #

Total comments: 2

Patch Set 2 : remove InitOnThread #

Patch Set 3 : refactor #

Patch Set 4 : remove pthread_getschedparam/pthread_setschedparam calls #

Patch Set 5 : nacl fix #

Patch Set 6 : cl format and add comment #

Unified diffs Side-by-side diffs Delta from patch set Stats (+41 lines, -57 lines) Patch
M base/threading/platform_thread.h View 1 2 3 4 5 1 chunk +2 lines, -1 line 0 comments Download
M base/threading/platform_thread_android.cc View 1 3 1 chunk +0 lines, -6 lines 0 comments Download
M base/threading/platform_thread_freebsd.cc View 1 3 1 chunk +0 lines, -2 lines 0 comments Download
M base/threading/platform_thread_linux.cc View 1 2 3 3 chunks +1 line, -14 lines 0 comments Download
M base/threading/platform_thread_mac.mm View 1 3 1 chunk +0 lines, -3 lines 0 comments Download
M base/threading/platform_thread_posix.cc View 1 2 3 4 3 chunks +6 lines, -5 lines 0 comments Download
M base/threading/platform_thread_unittest.cc View 1 2 3 4 5 3 chunks +32 lines, -26 lines 0 comments Download

Messages

Total messages: 41 (16 generated)
reveman
4 years, 10 months ago (2016-02-03 23:16:13 UTC) #2
Robert Sesek
https://codereview.chromium.org/1660273004/diff/1/base/threading/platform_thread_android.cc File base/threading/platform_thread_android.cc (right): https://codereview.chromium.org/1660273004/diff/1/base/threading/platform_thread_android.cc#newcode87 base/threading/platform_thread_android.cc:87: void InitOnThread() { I think you can just remove ...
4 years, 10 months ago (2016-02-03 23:23:19 UTC) #4
reveman
https://codereview.chromium.org/1660273004/diff/1/base/threading/platform_thread_android.cc File base/threading/platform_thread_android.cc (right): https://codereview.chromium.org/1660273004/diff/1/base/threading/platform_thread_android.cc#newcode87 base/threading/platform_thread_android.cc:87: void InitOnThread() { On 2016/02/03 at 23:23:19, Robert Sesek ...
4 years, 10 months ago (2016-02-03 23:31:03 UTC) #5
Nico
Looks ok. +toyoshim who worked with this code not too long ago, and +epenner who ...
4 years, 10 months ago (2016-02-03 23:31:24 UTC) #7
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1660273004/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1660273004/20001
4 years, 10 months ago (2016-02-03 23:54:44 UTC) #9
Robert Sesek
lgtm
4 years, 10 months ago (2016-02-04 00:10:00 UTC) #10
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: linux_chromium_chromeos_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_chromeos_rel_ng/builds/161729)
4 years, 10 months ago (2016-02-04 00:36:14 UTC) #12
Takashi Toyoshima
looks nice clean up, but the test failures seem like real failures. Some sandbox configurations ...
4 years, 10 months ago (2016-02-04 04:48:19 UTC) #13
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1660273004/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1660273004/40001
4 years, 10 months ago (2016-02-04 12:53:25 UTC) #15
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: chromeos_daisy_chromium_compile_only_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromeos_daisy_chromium_compile_only_ng/builds/88777) mac_chromium_compile_dbg_ng on ...
4 years, 10 months ago (2016-02-04 13:08:32 UTC) #17
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1660273004/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1660273004/60001
4 years, 10 months ago (2016-02-04 14:23:31 UTC) #19
reveman
PTAL. I had to remove the pthread_getschedparam call done each time we try to set ...
4 years, 10 months ago (2016-02-04 14:41:56 UTC) #20
reveman
On 2016/02/04 at 04:48:19, toyoshim wrote: > looks nice clean up, but the test failures ...
4 years, 10 months ago (2016-02-04 14:42:53 UTC) #21
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1660273004/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1660273004/80001
4 years, 10 months ago (2016-02-04 15:03:17 UTC) #23
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 10 months ago (2016-02-04 16:27:38 UTC) #25
reveman
I'd like to land this. thakis, does the latest patch look ok to you?
4 years, 10 months ago (2016-02-04 22:51:36 UTC) #26
Nico
I'd like toyoshim to ok effectively the revert of https://codereview.chromium.org/1205703005 (sounds like this was for ...
4 years, 10 months ago (2016-02-04 22:58:23 UTC) #27
reveman
toyoshim, does the latest patch look ok? I fixed the sandbox problems by removing the ...
4 years, 10 months ago (2016-02-04 23:35:57 UTC) #28
Takashi Toyoshima
I just found and fixed the issue in the process of my work. And there ...
4 years, 10 months ago (2016-02-05 04:39:55 UTC) #30
Takashi Toyoshima
> The result is that once we've changed to realtime priority we can't go back ...
4 years, 10 months ago (2016-02-05 04:46:14 UTC) #31
reveman
On 2016/02/05 at 04:46:14, toyoshim wrote: > > The result is that once we've changed ...
4 years, 10 months ago (2016-02-05 05:22:08 UTC) #32
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1660273004/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1660273004/100001
4 years, 10 months ago (2016-02-05 05:22:53 UTC) #35
commit-bot: I haz the power
Committed patchset #6 (id:100001)
4 years, 10 months ago (2016-02-05 07:08:09 UTC) #37
commit-bot: I haz the power
Patchset 6 (id:??) landed as https://crrev.com/45828eb26e18f1ba333f0c39b20036a60932886b Cr-Commit-Position: refs/heads/master@{#373761}
4 years, 10 months ago (2016-02-05 07:09:02 UTC) #39
DaleCurtis
4 years, 10 months ago (2016-02-05 18:11:51 UTC) #41
Message was sent while issue was closed.
Thanks for the cc, this should be fine. I don't think we reduce priority
anywhere from REALTIME_AUDIO (though maybe we should have when the thread is
idle). lgtm

Powered by Google App Engine
This is Rietveld 408576698