Re: [PATCH 0/8] x86: Disentangle the vdso and clean it up

From: Andy Lutomirski
Date: Mon Oct 20 2014 - 17:57:54 EST


On Mon, Oct 20, 2014 at 2:41 PM, H. Peter Anvin <hpa@xxxxxxxxx> wrote:
> On 09/23/2014 10:50 AM, Andy Lutomirski wrote:
>>
>> Patch 8 removes the vvar that selects the getcpu mode. That vvar
>> has been unnecessary for a couple of years, ever since alternative
>> patching has worked in the vdso.
>>
>
> Is there any fundamental reason to not always use LSL at this point?

No, other than aesthetics.

Crappy timings on my dev box:

rdtscp: 18ns (and slowdown of nearly insns because it's like lfence or
mfence IIRC)

lsl: 15ns

just for fun, lsl of an out of bounds descriptor: 46ns

lsl is also nice because it works even if CR4.TSD is set.

I know I probably shouldn't say this, but sgdt is even faster (<8ns)

Should I send a replacement for patch 8 or should I let you merge 1-7
and fold this into the followup series?

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