Gautier Delorme and Johannes Weiss
0695662d7d
fix cores count in containers ( #1518 )
...
Motivation:
The current System.coreCount implementation relies on _SC_NPROCESSORS_ONLN so isn't cgroups aware which might have a bad impact for apps runnings in containers (e.g. Docker, Kubernetes, Amazon ECS...).
Modifications:
- Changed System.coreCount on Linux only to make it read from CFS quotas and cpusets when present.
- Removed incorrect precondition in Sources/NIO/LinuxCPUSet.swift
Result:
System.coreCount returns correct values when apps run in containers.
Co-authored-by: Johannes Weiss <johannesweiss@apple.com >
2020-05-15 10:09:35 +01:00
..
2020-05-05 10:30:17 +01:00
2020-05-13 13:07:35 +01:00
2020-05-11 15:13:58 +01:00
2020-01-31 17:57:30 +00:00
2020-05-13 18:29:29 +01:00
2020-05-11 15:13:58 +01:00
2020-05-07 13:14:35 +01:00
2020-03-31 09:23:25 +01:00
2020-02-04 14:38:11 +00:00
2020-02-06 11:59:10 +00:00
2020-02-19 18:12:38 +00:00
2020-04-08 07:42:38 +01:00
2019-03-25 09:39:03 +02:00
2019-11-27 18:37:38 +00:00
2019-02-01 15:34:59 +00:00
2020-04-04 17:01:08 +01:00
2019-11-27 18:37:38 +00:00
2019-12-10 16:26:38 +00:00
2020-03-04 16:22:06 +00:00
2019-03-05 13:52:17 +00:00
2019-02-19 18:31:26 +00:00
2020-03-18 16:20:19 +00:00
2020-05-11 15:47:05 +01:00
2019-12-06 14:37:11 +00:00
2019-10-16 22:06:55 -07:00
2019-10-16 22:06:55 -07:00
2019-03-05 09:23:25 +00:00
2020-04-07 22:17:30 +01:00
2020-04-07 11:45:20 +01:00
2019-12-11 18:41:51 +00:00
2019-12-04 15:43:15 +00:00
2019-03-08 16:53:55 +00:00
2020-03-23 16:29:14 +00:00
2019-03-27 11:53:17 +00:00
2020-05-15 10:09:35 +01:00
2020-05-15 10:09:35 +01:00
2019-11-12 15:11:32 +00:00
2019-02-14 13:25:30 +00:00
2019-03-06 16:43:13 +00:00
2019-04-30 12:06:24 +01:00
2020-03-31 20:01:56 +01:00
2020-03-11 08:35:39 +00:00
2020-01-31 17:57:30 +00:00
2020-01-31 17:57:30 +00:00
2019-10-16 22:06:55 -07:00
2020-04-02 19:06:48 +01:00
2019-12-18 11:32:58 +00:00
2018-08-01 15:57:27 +01:00
2018-03-02 15:40:52 +09:00
2020-03-18 15:48:40 +00:00
2020-05-11 15:33:02 +01:00
2020-03-26 08:16:28 +00:00
2020-04-07 11:45:20 +01:00
2019-12-03 11:29:38 +00:00
2020-05-11 15:13:58 +01:00
2020-04-07 22:17:30 +01:00
2020-05-11 15:13:58 +01:00
2020-05-11 15:13:58 +01:00
2020-04-02 19:06:48 +01:00
2020-04-07 22:17:30 +01:00
2020-03-04 15:12:10 +00:00
2020-03-31 20:01:56 +01:00
2020-03-05 08:32:51 +00:00
2018-12-07 21:15:34 +00:00
2020-04-17 18:13:49 +01:00
2020-05-15 10:09:35 +01:00