about summary refs log tree commit diff
path: root/sysdeps/unix/sysv
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2019-11-11 10:49:16 +0100
committerFlorian Weimer <fweimer@redhat.com>2019-11-15 13:05:09 +0100
commit9e3e27c4e32c02e93d9779e41356adfb357957e3 (patch)
tree588bf4d0732f26f5fc0f2cb5c937dcf94135f177 /sysdeps/unix/sysv
parente21a7867713c87d0b0698254685d414d811d72b2 (diff)
downloadglibc-9e3e27c4e32c02e93d9779e41356adfb357957e3.tar.gz
glibc-9e3e27c4e32c02e93d9779e41356adfb357957e3.tar.xz
glibc-9e3e27c4e32c02e93d9779e41356adfb357957e3.zip
linux: Add comment on affinity set sizes to tst-skeleton-affinity.c
Change-Id: Ic6ec48f75f3a0576d3121befd04531382c92afb4
Diffstat (limited to 'sysdeps/unix/sysv')
-rw-r--r--sysdeps/unix/sysv/linux/tst-skeleton-affinity.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/sysdeps/unix/sysv/linux/tst-skeleton-affinity.c b/sysdeps/unix/sysv/linux/tst-skeleton-affinity.c
index 32fb94cdde..9d1f27fea9 100644
--- a/sysdeps/unix/sysv/linux/tst-skeleton-affinity.c
+++ b/sysdeps/unix/sysv/linux/tst-skeleton-affinity.c
@@ -264,6 +264,11 @@ do_test (void)
 
   struct conf conf;
   setup_conf (&conf);
+  /* Note: The CPU set size in bits can be less than the CPU count
+     (and the maximum test CPU) because the userspace interface rounds
+     up the bit count, and the rounded-up buffer size is passed into
+     the kernel.  The kernel does not know that some of the buffer are
+     actually padding, and writes data there.  */
   printf ("info: Detected CPU set size (in bits): %d\n", conf.set_size);
   printf ("info: Maximum test CPU: %d\n", conf.last_cpu);
   if (conf.set_size < 0 || conf.last_cpu < 0)