- removed man-pages-3.22-sched_setaffinity.patch because the problem it describes was fixed in the kernel. see #533811 for more info
This commit is contained in:
parent
1eca3cb073
commit
135d6da589
@ -1,64 +0,0 @@
|
|||||||
diff -up man-pages-3.22/man2/sched_setaffinity.2.orig man-pages-3.22/man2/sched_setaffinity.2
|
|
||||||
--- man-pages-3.22/man2/sched_setaffinity.2.orig 2009-07-25 08:53:26.000000000 +0200
|
|
||||||
+++ man-pages-3.22/man2/sched_setaffinity.2 2009-12-02 15:29:17.000000000 +0100
|
|
||||||
@@ -212,6 +212,60 @@ system call returns the size (in bytes)
|
|
||||||
.I cpumask_t
|
|
||||||
data type that is used internally by the kernel to
|
|
||||||
represent the CPU set bit mask.
|
|
||||||
+
|
|
||||||
+The \fBcpu_set_t\fR affinity mask size provided by glibc only allows for upto
|
|
||||||
+1024 CPUs. It is possible to build Linux kernels with greater than 1024
|
|
||||||
+CPUs. Any application using the statically sized \fBcpu_set_t\fR will fail
|
|
||||||
+with \fBEINVAL\fR on such kernels. It is thus recommended that applications
|
|
||||||
+avoid using the statically sized \fBcpu_set_t\fR type, and instead dynamically
|
|
||||||
+allocate a mask using the CPU_*_S macros described in the \fBCPU_SET(3)\fR man
|
|
||||||
+page. Since it is not possible to determine ahead of time what \fBNR_CPUS\fR
|
|
||||||
+value the kernel was built with, applications must be prepared to catch
|
|
||||||
+\fBEINVAL\fR, and retry the command with a larger dynamically allocated mask.
|
|
||||||
+The example that follows illustrates portable usage.
|
|
||||||
+
|
|
||||||
+.SH EXAMPLE
|
|
||||||
+.nf
|
|
||||||
+ #define _GNU_SOURCE
|
|
||||||
+
|
|
||||||
+ #include <sched.h>
|
|
||||||
+ #include <stdio.h>
|
|
||||||
+ #include <errno.h>
|
|
||||||
+
|
|
||||||
+ int main(void)
|
|
||||||
+ {
|
|
||||||
+ cpu_set_t *mask;
|
|
||||||
+ size_t size;
|
|
||||||
+ int i;
|
|
||||||
+ int nrcpus = 1024;
|
|
||||||
+
|
|
||||||
+realloc:
|
|
||||||
+ mask = CPU_ALLOC(nrcpus);
|
|
||||||
+ size = CPU_ALLOC_SIZE(nrcpus);
|
|
||||||
+ CPU_ZERO_S(size, mask);
|
|
||||||
+ if ( sched_getaffinity(0, size, mask) == -1 ) {
|
|
||||||
+ CPU_FREE(mask);
|
|
||||||
+ if (errno == EINVAL &&
|
|
||||||
+ nrcpus < (1024 << 8)) {
|
|
||||||
+ nrcpus = nrcpus << 2;
|
|
||||||
+ goto realloc;
|
|
||||||
+ }
|
|
||||||
+ perror("sched_getaffinity");
|
|
||||||
+ return -1;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ for ( i = 0; i < nrcpus; i++ ) {
|
|
||||||
+ if ( CPU_ISSET_S(i, size, mask) ) {
|
|
||||||
+ printf("CPU %d is set\\n", (i+1));
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ CPU_FREE(mask);
|
|
||||||
+
|
|
||||||
+ return 0;
|
|
||||||
+ }
|
|
||||||
+.fi
|
|
||||||
+
|
|
||||||
.SH "SEE ALSO"
|
|
||||||
.BR clone (2),
|
|
||||||
.BR getcpu (2),
|
|
@ -33,7 +33,6 @@ Patch20: man-pages-3.42-unimplemented.patch
|
|||||||
Patch40: man-pages-2.46-nscd.patch
|
Patch40: man-pages-2.46-nscd.patch
|
||||||
# resolves: #522761
|
# resolves: #522761
|
||||||
Patch41: man-pages-3.22-nsswitch.conf.patch
|
Patch41: man-pages-3.22-nsswitch.conf.patch
|
||||||
Patch42: man-pages-3.22-sched_setaffinity.patch
|
|
||||||
# resolves: #532629
|
# resolves: #532629
|
||||||
Patch43: man-pages-3.23-ld.so.patch
|
Patch43: man-pages-3.23-ld.so.patch
|
||||||
# resolves: #698149
|
# resolves: #698149
|
||||||
@ -83,7 +82,6 @@ Documentation Project (LDP).
|
|||||||
|
|
||||||
%patch40 -p1
|
%patch40 -p1
|
||||||
%patch41 -p1
|
%patch41 -p1
|
||||||
%patch42 -p1
|
|
||||||
%patch43 -p1
|
%patch43 -p1
|
||||||
%patch44 -p1
|
%patch44 -p1
|
||||||
%patch45 -p1
|
%patch45 -p1
|
||||||
@ -175,6 +173,7 @@ cd ..
|
|||||||
- improved explanation about calling listen or connect on the ip(7) man page (#787567)
|
- improved explanation about calling listen or connect on the ip(7) man page (#787567)
|
||||||
- mention sssd in the nsswitch.conf(5) man page (#694860)
|
- mention sssd in the nsswitch.conf(5) man page (#694860)
|
||||||
- added information about incorrect use of getdents(2) call to the man page (#809490)
|
- added information about incorrect use of getdents(2) call to the man page (#809490)
|
||||||
|
- removed man-pages-3.22-sched_setaffinity.patch because the problem it describes was fixed in the kernel. see #533811 for more info
|
||||||
|
|
||||||
* Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.41-2
|
* Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.41-2
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
|
||||||
|
Loading…
Reference in New Issue
Block a user