Re: [PATCH] i386-pda UP optimization

From: Jeremy Fitzhardinge
Date: Wed Nov 15 2006 - 13:28:57 EST


Eric Dumazet wrote:
> I have the feeling (most probably wrong, but I prefer to speak than keeping
> this for myself) that the cost of segment load is delayed up to the first use
> of a segment selector. Sort of a lazy reload...
>

Probably not too much, since the load itself has to raise a fault if
there's any problem with the segment itself, and once it is loaded you
can change the underlying descriptor without affecting the segment
register. Even if it were lazy, that would only make the first %gs use a
bit slow, and shouldn't affect the subsequent ones. However, when I
measured segment register use timings, I didn't see any dramatic costs
associated with segment register use which would account for a 5% hit in
your benchmark.

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