1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-10-28 23:34:53 +03:00
Files
glibc/sysdeps/unix/sysv/linux
Adhemerval Zanella 342298278e linux: Revert the use of sched_getaffinity on get_nproc (BZ #28310)
The use of sched_getaffinity on get_nproc and
sysconf (_SC_NPROCESSORS_ONLN) done in 903bc7dcc2 (BZ #27645)
breaks the top command in common hypervisor configurations and also
other monitoring tools.

The main issue using sched_getaffinity changed the symbols semantic
from system-wide scope of online CPUs to per-process one (which can
be changed with kernel cpusets or book parameters in VM).

This patch reverts mostly of the 903bc7dcc2, with the
exceptions:

  * No more cached values and atomic updates, since they are inherent
    racy.

  * No /proc/cpuinfo fallback, since /proc/stat is already used and
    it would require to revert more arch-specific code.

  * The alloca is replace with a static buffer of 1024 bytes.

So the implementation first consult the sysfs, and fallbacks to procfs.

Checked on x86_64-linux-gnu.

Reviewed-by: Florian Weimer <fweimer@redhat.com>
2021-09-27 09:18:43 -03:00
..
2021-09-22 21:25:31 +00:00
2021-09-22 21:25:31 +00:00
2021-09-22 21:25:31 +00:00
2021-09-22 21:25:31 +00:00
2021-09-22 21:25:31 +00:00
2021-09-03 22:06:44 +05:30
2021-09-22 21:25:31 +00:00
2021-09-22 21:25:31 +00:00
2021-09-22 21:25:31 +00:00
2021-09-22 21:25:31 +00:00
2021-09-22 21:25:31 +00:00
2021-09-22 21:25:31 +00:00
2021-09-03 22:06:44 +05:30
2021-09-22 21:25:31 +00:00
2021-09-22 21:25:31 +00:00
2021-09-22 21:25:31 +00:00
2021-09-22 21:25:31 +00:00
2021-09-22 21:25:31 +00:00
2021-09-22 21:25:31 +00:00
2021-09-03 22:06:44 +05:30
2021-09-22 21:25:31 +00:00
2021-09-03 22:06:44 +05:30
2021-09-03 22:06:44 +05:30
2021-09-03 22:06:44 +05:30
2021-09-03 22:06:44 +05:30
2021-09-03 22:06:44 +05:30
2021-07-21 11:58:16 +02:00
2021-06-22 12:09:52 -03:00
2021-06-22 12:09:52 -03:00
2021-09-03 22:06:44 +05:30
2021-09-03 22:06:44 +05:30
2021-09-03 22:06:44 +05:30
2021-09-03 22:06:44 +05:30
2021-09-03 22:06:44 +05:30
2021-09-03 22:06:44 +05:30
2021-03-18 15:54:39 -03:00
2021-03-26 13:36:17 -03:00
2021-07-21 11:58:16 +02:00
2021-09-03 22:06:44 +05:30
2021-09-03 22:06:44 +05:30
2021-09-03 22:06:44 +05:30
2021-09-03 22:06:44 +05:30
2021-09-03 22:06:44 +05:30
2021-09-03 22:06:44 +05:30
2021-09-03 22:06:44 +05:30
2021-03-26 13:37:14 -03:00
2021-09-03 22:06:44 +05:30
2021-06-22 12:09:52 -03:00
2021-06-22 12:09:52 -03:00
2021-09-03 22:06:44 +05:30
2021-07-21 11:58:16 +02:00
2021-09-03 22:06:44 +05:30
2021-09-03 22:06:44 +05:30
2021-09-03 22:06:44 +05:30
2021-09-03 22:06:44 +05:30
2021-09-03 22:06:44 +05:30
2021-09-03 22:06:44 +05:30
2021-09-03 22:06:44 +05:30
2021-07-21 11:58:16 +02:00
2021-09-03 22:06:44 +05:30
2021-09-03 22:06:44 +05:30
2021-09-03 22:06:44 +05:30
2021-09-03 22:06:44 +05:30
2021-03-26 13:36:17 -03:00
2021-09-03 22:06:44 +05:30
2021-07-21 11:58:16 +02:00
2021-09-03 22:06:44 +05:30
2021-09-03 22:06:44 +05:30
2021-09-03 22:06:44 +05:30
2021-09-03 22:06:44 +05:30
2021-09-03 22:06:44 +05:30
2021-09-03 22:06:44 +05:30
2021-09-03 22:06:44 +05:30
2021-03-29 10:22:13 -03:00
2021-07-08 14:08:13 -03:00
2021-03-26 13:36:17 -03:00
2021-05-03 08:15:53 +02:00
2021-09-03 22:06:44 +05:30
2021-09-03 22:06:44 +05:30
2021-09-03 22:06:44 +05:30
2021-09-03 22:06:44 +05:30
2021-09-03 22:06:44 +05:30
2021-09-03 22:06:44 +05:30
2021-05-17 20:55:21 +00:00
2021-06-15 10:42:11 -03:00
2021-03-08 22:41:41 +01:00
2021-06-15 10:42:11 -03:00
2021-07-21 11:58:16 +02:00
2021-06-15 10:42:11 -03:00
2021-06-22 12:09:52 -03:00
2021-06-22 12:09:52 -03:00
2021-09-03 22:06:44 +05:30
2021-09-03 22:06:44 +05:30
2021-09-03 22:06:44 +05:30
2021-09-03 22:06:44 +05:30
2021-09-03 22:06:44 +05:30