WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
273675
Need to change the method for determining the number of CPUs on Linux
https://bugs.webkit.org/show_bug.cgi?id=273675
Summary
Need to change the method for determining the number of CPUs on Linux
haiweiwang1109
Reported
2024-05-03 01:03:55 PDT
Determine the number of CPUs on Linux by directly interpreting /proc/cpuinfo, as using the nproc tool may yield incorrect results (`determineNumberOfCPUs` in Tools/Scripts/webkitdirs.pm). Incorrect results (usually bigger than the true number) can lead to OOM issue. In my ubuntu virtual machine: ``` $ nproc 6 $ nproc --all 128 ``` And there are similar discussions on the Arch Linux forum as well. -[nproc indicating higher number of cpu cores than CPU has](
https://bbs.archlinux.org/viewtopic.php?id=278874
) ``` $ nproc 24 $ nproc --all 128 ```
Attachments
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2024-05-10 01:04:14 PDT
<
rdar://problem/127865622
>
Michael Catanzaro
Comment 2
2024-05-10 07:07:59 PDT
It looks like determineNumberOfCPUs only gets used if you're compiling with make rather than ninja. And that should only happen if you use `build-webkit --no-ninja` or do not have ninja installed. You probably want to build with ninja. It will compute the number of CPUs to use on its own. (Although I wouldn't be surprised if it also uses nproc!) Anyway, I'll remove the use of nproc.
Michael Catanzaro
Comment 3
2024-05-10 07:11:49 PDT
Pull request:
https://github.com/WebKit/WebKit/pull/28388
Adrian Perez
Comment 4
2024-05-16 02:20:38 PDT
Pull request:
https://github.com/WebKit/WebKit/pull/28645
EWS
Comment 5
2024-05-16 11:54:07 PDT
Committed
278879@main
(9bf347ad34b3): <
https://commits.webkit.org/278879@main
> Reviewed commits have been landed. Closing PR #28645 and removing active labels.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug