2007-02-13 22:45:45

by Zachary Amsden

[permalink] [raw]
Subject: Re: [patch 13/21] Xen-paravirt: Add nosegneg capability to the vsyscall page notes

Jeremy Fitzhardinge wrote:
> Add the "nosegneg" fake capabilty to the vsyscall page notes. This is
> used by the runtime linker to select a glibc version which then
> disables negative-offset accesses to the thread-local segment via
> %gs. These accesses require emulation in Xen (because segments are
> truncated to protect the hypervisor address space) and avoiding them
> provides a measurable performance boost.
>

I don't like this because now a kernel compiled with both CONFIG_XEN and
CONFIG_VMI has "nosegneg" turned on. We don't actually require this for
performance or correctness, so it would be nice to be able to
dynamically turn it off instead of having it forced.

Zach


2007-02-13 22:49:14

by Jeremy Fitzhardinge

[permalink] [raw]
Subject: Re: [patch 13/21] Xen-paravirt: Add nosegneg capability to the vsyscall page notes

Zachary Amsden wrote:
> I don't like this because now a kernel compiled with both CONFIG_XEN
> and CONFIG_VMI has "nosegneg" turned on. We don't actually require
> this for performance or correctness, so it would be nice to be able to
> dynamically turn it off instead of having it forced.

Any suggestions about how to do this? It seems hard to have a note
dynamically appear and disappear in the vsyscall.so.

I wasn't terribly concerned about this, since there is effectively zero
performance difference between the two library implementations.

J

2007-02-13 22:54:29

by Zachary Amsden

[permalink] [raw]
Subject: Re: [patch 13/21] Xen-paravirt: Add nosegneg capability to the vsyscall page notes

Jeremy Fitzhardinge wrote:
> Zachary Amsden wrote:
>
>> I don't like this because now a kernel compiled with both CONFIG_XEN
>> and CONFIG_VMI has "nosegneg" turned on. We don't actually require
>> this for performance or correctness, so it would be nice to be able to
>> dynamically turn it off instead of having it forced.
>>
>
> Any suggestions about how to do this? It seems hard to have a note
> dynamically appear and disappear in the vsyscall.so.
>
> I wasn't terribly concerned about this, since there is effectively zero
> performance difference between the two library implementations.
>

I'm not super concerned either, but I still don't like it. There
already is dynamic replacement for vsyscall.so, so you could have just
dropped in an an-note-ated version.

Zach

2007-02-13 23:13:48

by Jeremy Fitzhardinge

[permalink] [raw]
Subject: Re: [patch 13/21] Xen-paravirt: Add nosegneg capability to the vsyscall page notes

Zachary Amsden wrote:
> I'm not super concerned either, but I still don't like it. There
> already is dynamic replacement for vsyscall.so, so you could have just
> dropped in an an-note-ated version.

Ah, OK. I'll have a look at that.

J

2007-02-14 05:39:44

by Rusty Russell

[permalink] [raw]
Subject: Re: [Xen-devel] Re: [patch 13/21] Xen-paravirt: Add nosegneg capability to the vsyscall page notes

On Tue, 2007-02-13 at 14:45 -0800, Zachary Amsden wrote:
> Jeremy Fitzhardinge wrote:
> > Add the "nosegneg" fake capabilty to the vsyscall page notes. This is
> > used by the runtime linker to select a glibc version which then
> > disables negative-offset accesses to the thread-local segment via
> > %gs. These accesses require emulation in Xen (because segments are
> > truncated to protect the hypervisor address space) and avoiding them
> > provides a measurable performance boost.
> >
>
> I don't like this because now a kernel compiled with both CONFIG_XEN and
> CONFIG_VMI has "nosegneg" turned on. We don't actually require this for
> performance or correctness, so it would be nice to be able to
> dynamically turn it off instead of having it forced.

Ditto for lguest.

Rusty.