Re: sched_setaffinity usability

From: Ingo Molnar
Date: Thu Mar 18 2004 - 13:56:14 EST



* Ingo Molnar <mingo@xxxxxxx> wrote:

> x86-64 has a VDSO page as well, [...]

hm, i'm not sure this is the case. It does have a vsyscall page but
doesnt fill out AT_SYSINFO. ia64 seems to have something like a vdso,
passed down via AT_SYSINFO.

We could introduce AT_VDSO to standardize this, and switch x86 from
AT_SYSINFO to AT_VDSO, and all architectures that implement the VDSO.
I.e. something like the draft patch below. (this would also decrease the
size of the auxiliary table - glibc doesnt need to know the exception
header address.).

(this could also put an end to the AT_ bloat - eg. we could even get rid
of some of the constant AT_ values in the future: AT_PAGESZ, AT_CLKTCK,
AT_HWCAP, AT_PHENT and AT_FLAGS, and move them into the VDSO?)

Ingo

--- linux/include/linux/elf.h.orig
+++ linux/include/linux/elf.h
@@ -162,6 +162,7 @@ typedef __s64 Elf64_Sxword;
#define AT_PLATFORM 15 /* string identifying CPU for optimizations */
#define AT_HWCAP 16 /* arch dependent hints at CPU capabilities */
#define AT_CLKTCK 17 /* frequency at which times() increments */
+#define AT_VDSO 18 /* VDSO address */

#define AT_SECURE 23 /* secure mode boolean */

--- linux/include/asm-i386/elf.h.orig
+++ linux/include/asm-i386/elf.h
@@ -132,10 +132,9 @@ extern int dump_task_extended_fpu (struc
#define VSYSCALL_ENTRY ((unsigned long) &__kernel_vsyscall)
extern void __kernel_vsyscall;

-#define ARCH_DLINFO \
-do { \
- NEW_AUX_ENT(AT_SYSINFO, VSYSCALL_ENTRY); \
- NEW_AUX_ENT(AT_SYSINFO_EHDR, VSYSCALL_BASE); \
+#define ARCH_DLINFO \
+do { \
+ NEW_AUX_ENT(AT_VDSO, VSYSCALL_BASE); \
} while (0)

/*
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/