12012-06-18 Dirk Pranke <dpranke@chromium.org>
2
3 NRWT should not take memory used as disk cache into account when deciding how many processes to launch
4 https://bugs.webkit.org/show_bug.cgi?id=81379
5
6 Reviewed by NOBODY (OOPS!).
7
8 The 'free memory' calculation we were running on the mac seemed
9 to underestimate how many children we can run in parallel, and
10 it was complex. This patch replaces that calculation with a
11 simpler one that reserves 2GB for overhead and assumes 256MB per
12 DRT/WTR, so if we had 4GB of RAM we can run up to 8 DRTs.
13
14 Also, there was a bug where we were truncating the memory
15 installed on the machine to 4GB by casting to an int instead of
16 a long; this was probably the source of some of the earlier
17 problems when using total memory.
18
19 This patch also removes the no-longer-needed restrictions on the
20 number of workers on beefy Lion boxes for both Apple Mac and Chromium
21 Mac; we should now use all of the cores by default.
22
23 The memory calculations have only been implemented on the mac;
24 having the calculation in base.default_child_processes() was IMO
25 misleading, and so this patch also moves the computation into
26 the MacPort. I have not heard of the # of workers being an issue
27 on any other ports, so this should be fine.
28
29 * Scripts/webkitpy/common/system/platforminfo.py:
30 (PlatformInfo.display_name):
31 (PlatformInfo.total_bytes_memory):
32 (PlatformInfo._win_version_tuple_from_cmd):
33 * Scripts/webkitpy/common/system/platforminfo_unittest.py:
34 (TestPlatformInfo.test_total_bytes_memory):
35 * Scripts/webkitpy/layout_tests/port/base.py:
36 (Port.default_child_processes):
37 * Scripts/webkitpy/layout_tests/port/chromium_mac.py:
38 (ChromiumMacPort.operating_system):
39 * Scripts/webkitpy/layout_tests/port/mac.py:
40 (MacPort.default_child_processes):
41