gecko-dev/xpcom
Nathan Froyd 1b72ad9705 Bug 1593812 - add I/O awareness for the background thread target; r=KrisWright
We need some way of differentiating "tasks that just consume CPU"
vs. "tasks that block on some external resource" like reading from a
socket or a file.  If we didn't have this, we'd either a) have a thread
pool sized for the number of CPUs where having all the threads blocked
on I/O--and therefore no new tasks are able to run--or b) have a thread
pool that tries to increase the number of working threads based on the
number of submitted tasks and winds up having too many tasks running
with not enough CPUs to run them on.

This flag enables us to theoretically get the best of both worlds: we
can set aside `~#CPUs` threads for CPU-intensive work, and
`$SOME_NUMBER` threads for I/O work.  The latter number can be adjusted
up if the I/O load on the system is particularly heavy.

The implementation strategy of this patch is to use two separate thread
pools for the two different kinds of work.  It's entirely possible that
we'll want to use a single thread pool to coordinate thread create
between the two kinds of work, or even migrate threads from one kind of
work to the other, but such improvements can be future work.  The focus
right now is providing the rest of Gecko with a common funnel to put
tasks into, and we can adjust what's at the end of the funnel at a later
point.

Differential Revision: https://phabricator.services.mozilla.com/D51708

--HG--
extra : moz-landing-system : lando
2019-11-05 18:33:25 +00:00
..
base Merge mozilla-inbound to mozilla-central. a=merge 2019-11-06 14:54:44 +01:00
build Backed out changeset 955256297d6d (bug 1579367) for causing a top crash in Bug 1594404. a=backout 2019-11-06 23:19:09 +02:00
components Bug 1591823 - Part 2: Switch nsIComponentRegistrar.enumerateContractIDs away from using nsISimpleEnumerator; r=froydnj 2019-10-28 13:26:50 +00:00
doc
ds Bug 1594275 - Parse the exportparts attribute. r=bzbarsky 2019-11-06 18:03:51 +00:00
glue Bug 1580128 - Simplify required env variables for fuzzing interface. r=froydnj 2019-09-10 14:33:58 +00:00
idl-parser Bug 1587206 - [lint.flake8] Enable F632 across the tree, r=sylvestre 2019-10-10 18:50:33 +00:00
io Backed out 7 changesets (bug 1593560) for crashtest failures at tests/layout/base/crashtests/446328.html on a CLOSED TREE 2019-11-07 00:32:53 +02:00
libxpt/xptcall
reflect Bug 1586358 - Replace existing instances of GENERATED_FILES with references to the GeneratedFile template r=firefox-build-system-reviewers,mshal 2019-10-07 21:15:19 +00:00
rust Bug 1589738 - nsACString::as_str_unchecked should actually check in debug builds. r=nika 2019-10-18 19:09:55 +00:00
string Bug 1591191 - Move compare and EqualsIgnoreAsciiCase to nsTStringRepr. r=erahm 2019-11-04 11:27:05 +00:00
system Bug 1591174 - Fix some references to nsIDOMWindow. r=bzbarsky 2019-11-05 04:52:53 +00:00
tests Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan 2019-10-06 18:29:55 +00:00
threads Bug 1593812 - add I/O awareness for the background thread target; r=KrisWright 2019-11-05 18:33:25 +00:00
windbgdlg
xpidl
moz.build
xpcom-config.h.in Bug 1570982 - remove CPP_THROW_NEW; r=glandium 2019-08-14 01:32:41 +00:00
xpcom-private.h.in