This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[pushed] linux: Add comment on affinity set sizes to tst-skeleton-affinity.c
- From: "Sourceware to Gerrit sync (Code Review)" <gerrit at gnutoolchain-gerrit dot osci dot io>
- To: Florian Weimer <fweimer at redhat dot com>, libc-alpha at sourceware dot org
- Cc: Szabolcs Nagy <szabolcs dot nagy at arm dot com>
- Date: Fri, 15 Nov 2019 07:30:20 -0500
- Subject: [pushed] linux: Add comment on affinity set sizes to tst-skeleton-affinity.c
- Auto-submitted: auto-generated
- References: <gerrit.1573465782000.Ic6ec48f75f3a0576d3121befd04531382c92afb4@gnutoolchain-gerrit.osci.io>
- Reply-to: noreply at gnutoolchain-gerrit dot osci dot io, fweimer at redhat dot com, szabolcs dot nagy at arm dot com, libc-alpha at sourceware dot org
Sourceware to Gerrit sync has submitted this change.
Change URL: https://gnutoolchain-gerrit.osci.io/r/c/glibc/+/610
......................................................................
linux: Add comment on affinity set sizes to tst-skeleton-affinity.c
Change-Id: Ic6ec48f75f3a0576d3121befd04531382c92afb4
---
M sysdeps/unix/sysv/linux/tst-skeleton-affinity.c
1 file changed, 5 insertions(+), 0 deletions(-)
Approvals:
Szabolcs Nagy: Looks good to me, approved
diff --git a/sysdeps/unix/sysv/linux/tst-skeleton-affinity.c b/sysdeps/unix/sysv/linux/tst-skeleton-affinity.c
index 32fb94c..9d1f27f 100644
--- a/sysdeps/unix/sysv/linux/tst-skeleton-affinity.c
+++ b/sysdeps/unix/sysv/linux/tst-skeleton-affinity.c
@@ -264,6 +264,11 @@
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)
--
Gerrit-Project: glibc
Gerrit-Branch: master
Gerrit-Change-Id: Ic6ec48f75f3a0576d3121befd04531382c92afb4
Gerrit-Change-Number: 610
Gerrit-PatchSet: 3
Gerrit-Owner: Florian Weimer <fweimer@redhat.com>
Gerrit-Reviewer: Szabolcs Nagy <szabolcs.nagy@arm.com>
Gerrit-MessageType: merged