Bug 974679
Summary: | Incorrect example for sched_getaffinity relying on EINVAL return. | |||
---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Carlos O'Donell <codonell> | |
Component: | man-pages | Assignee: | Peter Schiffer <pschiffe> | |
Status: | CLOSED CURRENTRELEASE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | |
Severity: | unspecified | Docs Contact: | ||
Priority: | unspecified | |||
Version: | 18 | CC: | fweimer, pschiffe | |
Target Milestone: | --- | |||
Target Release: | --- | |||
Hardware: | Unspecified | |||
OS: | Unspecified | |||
Whiteboard: | ||||
Fixed In Version: | Doc Type: | Bug Fix | ||
Doc Text: | Story Points: | --- | ||
Clone Of: | ||||
: | 974685 (view as bug list) | Environment: | ||
Last Closed: | 2013-07-04 14:16:35 UTC | Type: | Bug | |
Regression: | --- | Mount Type: | --- | |
Documentation: | --- | CRM: | ||
Verified Versions: | Category: | --- | ||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | ||
Cloudforms Team: | --- | Target Upstream Version: | ||
Embargoed: | ||||
Bug Depends On: | ||||
Bug Blocks: | 974685 |
Description
Carlos O'Donell
2013-06-14 19:29:18 UTC
This message is a reminder that Fedora 17 is nearing its end of life. Approximately 4 (four) weeks from now Fedora will stop maintaining and issuing updates for Fedora 17. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as WONTFIX if it remains open with a Fedora 'version' of '17'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version prior to Fedora 17's end of life. Bug Reporter: Thank you for reporting this issue and we are sorry that we may not be able to fix it before Fedora 17 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior to Fedora 17's end of life. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete. Peter, Please note that I didn't file this against F18, because AFAICT in F18 the example patch was dropped and is no longer present. Oh, I'm sorry, I've missed the note. So in that case, can I close this bug as CURRENTRELEASE? (In reply to Peter Schiffer from comment #3) > Oh, I'm sorry, I've missed the note. So in that case, can I close this bug > as CURRENTRELEASE? Please confirm the example is missing from f19 and rawhide? Then I think it's OK to close as CURRENTRELEASE. Yes, the example is missing in F19 and rawhide. Closing as CURRENTRELEASE. (In reply to Carlos O'Donell from comment #0) > The only easy way to determine the online cpus is to use sysconf > (_SC_PROCESSORS_ONLN); Just noting in case someone else stumbles upon this bug report: This is not the number of CPUs which is relevant to the sched_getaffinity system call. I have system which reports _NPROCESSORS_ONLN and _NPROCESSORS_CONF as 40 (and /proc/cpuinfo and /proc/stat match that), yet calling sched_getaffinity with small arguments fails: [pid 3420] sched_getaffinity(0, 8, 0x146b010) = -1 EINVAL (Invalid argument) [pid 3420] sched_getaffinity(0, 16, 0x146b010) = -1 EINVAL (Invalid argument) [pid 3420] sched_getaffinity(0, 32, {ffffffffff, 0, 0, 0}) = 32 The kernel seems to operate with a nr_cpu_ids value of 240: kernel: setup_percpu: NR_CPUS:5120 nr_cpumask_bits:240 nr_cpu_ids:240 nr_node_ids:2 kernel: RCU restricting CPUs from NR_CPUS=5120 to nr_cpu_ids=240. nr_cpu_ids is not directly exposed to user space, I think, so the EINVAL behavior is pretty much required. (In reply to Florian Weimer from comment #6) > nr_cpu_ids is not directly exposed to user space, I think, so the EINVAL > behavior is pretty much required. No, EINVAL is not required. There is no race, we spoke with Kosaki Motohiro about this and the kernel always allocates a static mask (nr_cpumask_bits) and it is a kernel compile time constant. |