Re: [RFC, patch] i386: vgetcpu()

From: Andi Kleen
Date: Tue Jun 20 2006 - 16:56:22 EST


On Tuesday 20 June 2006 22:25, Chuck Ebbert wrote:
> Use the limit field of a GDT entry to store the current CPU
> number for fast userspace access. This still leaves 12 bits
> free for other information.

Nice trick. Maybe I'll even add that to the x86-64 implementation
if it's fast enough. Do you have numbers?

But it needs to be encapsulated in a wrapper I think. Just exposing
it to user space is the wrong way to do this.

-Andi
-
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/