This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFC/PATCH] ARM: VDSO support



On 07-04-2015 14:20, Joseph Myers wrote:
> On Tue, 7 Apr 2015, Joseph Myers wrote:
>
>> On Tue, 7 Apr 2015, Adhemerval Zanella wrote:
>>
>>> On 07-04-2015 13:46, Joseph Myers wrote:
>>>> On Fri, 3 Apr 2015, Nathan Lynch wrote:
>>>>
>>>>> This patch adds support for the ARM VDSO to glibc.  I have run make
>>>>> check on OMAP5 using kernels with and without the VDSO, with no new
>>>>> failures.
>>>> How does this compare to the implementations for other architectures?  
>>>> What are the points on which the VDSO interfaces vary between 
>>>> architectures?  It would seem desirable for the code to be factored so 
>>>> that the ARM code only contains the minimal set of things that are 
>>>> necessarily ARM-specific (for example, just declaring the ARM-specific 
>>>> choices before including architecture-independent files shared by all 
>>>> architectures that can get these functions from a VDSO).
>>>>
>>> I see the factoring work being another subsequent patch that should not
>>> impede the inclusion of proposed modification. 
>> I see it as a preparatory cleanup that is (unlike the main change) not 
>> blocked on the kernel changes getting into kernel.org sources.
> And, in any case, if a non-refactored patch is to go in, the analysis of 
> how the implementations and interfaces for different architectures relate 
> should be part of the justification for the implementation approach 
> chosen.  That is, the questions I posed should be answered as questions, 
> regardless of what patch the answers end up supporting.
>
My only point is the cleanup should not be a block issue for patch inclusion.
Anyway, about your questioning:

* aarch64/tile/s390 uses INLINE_VSYSCALL 

* powerpc32/powerpc64/i386/x86_64 uses a iFUNC mechanism to call the vDSO 
  symbol directly and falling and avoid glibc symbol wrapper

* powerpc32 and i386 internal gettimeofday are done by the glibc system wrapper

So I think a possible cleanup can start as:

1. Add INLINE_VSYSCALL for arch that does not define it

2. Add a sysdeps/unix/sysv/linux/gettimeofday.c that uses the INLINE_VSYSCALL

3. aarch64/tile/s390 can be removed by 2.

4. The IFUNC cleanup will require some work.  It can be use
   ./sysdeps/unix/sysv/linux/x86/gettimeofday.c as base and if a arch want to
   use it my define USE_IFUNC (or something else) and define the FALLBACK
   mechanism for case where vDSO is not available.

What do you think?


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]