On Sep 2, 2005, at 19:24:22, H. Peter Anvin wrote:
Kyle Moffett wrote:
My far-into-the-future ideal for this is to have a generic vDSO-type
library that is compiled into the kernel that provides a
collection of
architecture-optimized routines available in both kernelspace and
userspace by mapping it into each process' address space. Such a
library could effectively automatically provide correct and optimized
assembly routines for the currently booted CPU/arch/subarch/etc, so
that userspace tools could be compiled once and run on an entire
family of CPUs without modification. On the other hand, for those
applications that need every last ounce of speed (Including parts of
the kernel), you could pass appropriate options to the compiler to
tell it to inline the assembly routines (alternative) for a single
CPU make/model.
I don't see why this should be compiled into the kernel.
The kernel already needs those same optimized routines for its own
operation (EX: all the ASM alternative() statements). Since userspace
wants some of those as well, it would make sense to share them between
kernel and userspace and reduce the number of libraries you would need
to optimize when adding a new arch. I don't think that we should add
optimized assembly for things that _aren't_ needed in the kernel, but
it should share what code it does have.
A side benefit of the vDSO method is that you would be able to take a
standard distro install and have the kernel automatically select the
correct vDSO image at runtime, simultaneously optimizing itself and
chunks of userspace.
Cheers,
Kyle Moffett
--
Unix was not designed to stop people from doing stupid things,
because that
would also stop them from doing clever things.
-- Doug Gwyn
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/