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

Issue 454053002: Return configured processors in NumberOfProcessors() on posix platforms (Closed)

Created:
6 years, 4 months ago by Justin Chuang
Modified:
6 years, 4 months ago
CC:
chromium-apps-reviews_chromium.org, chromium-reviews, erikwright+watch_chromium.org, extensions-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

Return configured processors in NumberOfProcessors() on posix platforms On Linux/Mac/FreeBSD platform, NumberOfProcessors() was returning the number of online processors. Change it to return the number of configured processors (incl. offline processors). 1. Most callers of this API expect it to return totally available cpu cores, mainly for threading optimization. 2. The number of online processors is changed within seconds on some embedded platforms. It is wrong to pass the cached value of the number of currently online processors to Blink sandbox. BUG=404364 TEST=Tested on nyan (it may have 1~4 cpu cores online) Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=290209

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : Explain more in comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+37 lines, -27 lines) Patch
M base/sys_info_posix.cc View 1 2 1 chunk +14 lines, -3 lines 0 comments Download
M chrome/browser/extensions/api/system_cpu/cpu_info_provider_linux.cc View 1 2 chunks +23 lines, -24 lines 0 comments Download

Messages

Total messages: 15 (0 generated)
jochen (gone - plz use gerrit)
if we have e.g. one core online, but 8 configured, we will completely overload the ...
6 years, 4 months ago (2014-08-11 14:29:55 UTC) #1
Justin Chuang
On 2014/08/11 14:29:55, jochen (slow - soon OOO) wrote: > if we have e.g. one ...
6 years, 4 months ago (2014-08-11 15:23:25 UTC) #2
Justin Chuang
Sorry the reply is too long. Let me recap: if the system has 4 configured ...
6 years, 4 months ago (2014-08-11 15:33:54 UTC) #3
jochen (gone - plz use gerrit)
On 2014/08/11 at 15:33:54, jchuang wrote: > Sorry the reply is too long. > > ...
6 years, 4 months ago (2014-08-13 13:05:35 UTC) #4
Justin Chuang
On 2014/08/13 13:05:35, jochen (slow - soon OOO) wrote: > ok, makes sense. > > ...
6 years, 4 months ago (2014-08-13 16:45:53 UTC) #5
jochen (gone - plz use gerrit)
this lgtm, but you will need a review from a //base owner.
6 years, 4 months ago (2014-08-14 11:07:18 UTC) #6
Justin Chuang
+ 2 owners of base/ PTAL
6 years, 4 months ago (2014-08-14 18:42:36 UTC) #7
Mark Mentovai
That seems fine, LGTM
6 years, 4 months ago (2014-08-14 19:46:57 UTC) #8
brettw
Please just add one owner to avoid duplicating effort.
6 years, 4 months ago (2014-08-14 22:55:44 UTC) #9
Justin Chuang
On 2014/08/14 22:55:44, brettw wrote: > Please just add one owner to avoid duplicating effort. ...
6 years, 4 months ago (2014-08-15 02:59:04 UTC) #10
Justin Chuang
Pawel points out another potential bug: On ARM big.LITTLE platform with 4+4 cores, sysconf(_SC_NPROCESSORS_CONF) returns ...
6 years, 4 months ago (2014-08-15 11:38:56 UTC) #11
Justin Chuang
On 2014/08/15 11:38:56, Justin Chuang wrote: > Pawel points out another potential bug: > > ...
6 years, 4 months ago (2014-08-18 03:13:02 UTC) #12
Justin Chuang
The CQ bit was checked by jchuang@chromium.org
6 years, 4 months ago (2014-08-18 03:13:06 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jchuang@chromium.org/454053002/40001
6 years, 4 months ago (2014-08-18 03:13:42 UTC) #14
commit-bot: I haz the power
6 years, 4 months ago (2014-08-18 04:52:56 UTC) #15
Message was sent while issue was closed.
Committed patchset #3 (40001) as 290209

Powered by Google App Engine
This is Rietveld 408576698