public inbox for glibc-bugs@sourceware.org help / color / mirror / Atom feed
From: "steffen at sdaoden dot eu" <sourceware-bugzilla@sourceware.org> To: glibc-bugs@sourceware.org Subject: [Bug libc/30135] sysconf: _SC_NPROCESSORS*: tweak? Date: Tue, 21 Feb 2023 17:31:16 +0000 [thread overview] Message-ID: <bug-30135-131-yd2TZG7MWM@http.sourceware.org/bugzilla/> (raw) In-Reply-To: <bug-30135-131@http.sourceware.org/bugzilla/> https://sourceware.org/bugzilla/show_bug.cgi?id=30135 --- Comment #6 from Steffen Nurpmeso <steffen at sdaoden dot eu> --- Quite honestly. That is too high for me. All i know is nproc(1) (of busybox, coreutils, now also FreeBSD (devel)) gets it right, but (portable) compiled applications using sysconf(3) do not. (I was only looking at two known-threaded, xz and zstd, they both will be trapped in doing the wrong thing.) And "not stable" sounds a bit peculiar given that cgroups are decades old, no? Linux documentation in-file dates are 2004 for v1 and 2015 for v2. And cpuset.cpus is actually in both, i think mkdir /sys/fs/cgroup/NAME || return echo 1-3 > /sys/fs/cgroup/NAME/cpuset.cpus To me this looks as if Linux userspace is forcing (somewhat, now standardized) portable applications to do the wrong thing for many, many years. I do not know about "cgroup protocol" or why that is slow -- sched_getaffinity(2) is what is used by nproc(1)s. Broken synchronization patterns. Heh. -- You are receiving this mail because: You are on the CC list for the bug.
prev parent reply other threads:[~2023-02-21 17:31 UTC|newest] Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-02-18 20:25 [Bug libc/30135] New: " steffen at sdaoden dot eu 2023-02-18 20:26 ` [Bug libc/30135] " steffen at sdaoden dot eu 2023-02-20 20:28 ` adhemerval.zanella at linaro dot org 2023-02-20 20:50 ` steffen at sdaoden dot eu 2023-02-20 22:46 ` adhemerval.zanella at linaro dot org 2023-02-20 23:47 ` steffen at sdaoden dot eu 2023-02-21 8:59 ` sam at gentoo dot org 2023-02-21 10:25 ` fweimer at redhat dot com 2023-02-21 17:31 ` steffen at sdaoden dot eu [this message]
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-30135-131-yd2TZG7MWM@http.sourceware.org/bugzilla/ \ --to=sourceware-bugzilla@sourceware.org \ --cc=glibc-bugs@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).