Re: [PATCH 15/22] arch: vdso: consolidate gettime prototypes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


Christophe Leroy <christophe.leroy@xxxxxxxxxx> writes:
> Le 09/11/2023 à 11:18, Michael Ellerman a écrit :
>> "Arnd Bergmann" <arnd@xxxxxxxx> writes:
>>> On Wed, Nov 8, 2023, at 19:31, Christophe Leroy wrote:
>>>> Le 08/11/2023 à 13:58, Arnd Bergmann a écrit :
>>>> powerpc has functions doing more or less the same, they are called
>>>> __c_kernel_clock_gettime() and alike with their prototypes siting in
>>>> arch/powerpc/include/asm/vdso/gettimeofday.h
>>>> Should those prototypes be moved to include/vdso/gettime.h too and
>>>> eventually renamed, or are they considered too powerpc specific ?
>>> I don't actually know, my initial interpretation was that
>>> these function names are part of the user ABI for the vdso,
>>> but I never looked closely enough at how vdso works to
>>> be sure what the actual ABI is.
>> AFAIK the ABI is just the symbols we export, as defined in the linker
>> script:
>> /*
>>   * This controls what symbols we export from the DSO.
>>   */
>> {
>> 	global:
>> 		__kernel_get_syscall_map;
>> 		__kernel_gettimeofday;
>> 		__kernel_clock_gettime;
>> 		__kernel_clock_getres;
>> 		__kernel_get_tbfreq;
>> 		__kernel_sync_dicache;
>> 		__kernel_sigtramp_rt64;
>> 		__kernel_getcpu;
>> 		__kernel_time;
>>> If __c_kernel_clock_gettime() etc are not part of the user-facing
>>> ABI, I think renaming them for consistency with the other
>>> architectures would be best.
>> The __c symbols are not part of the ABI, so we could rename them.
>> At the moment though they don't have the same prototype as the generic
>> versions, because we find the VDSO data in asm and pass it to the C
>> functions, eg:
>> int __c_kernel_gettimeofday(struct __kernel_old_timeval *tv, struct timezone *tz,
>> 			    const struct vdso_data *vd);
>> I think we can rework that though, by implementing
>> __arch_get_vdso_data() and getting the vdso_data in C. Then we'd be able
>> to share the prototypes.
> I think it would not a been good idea, it would be less performant, for 
> explanation see commit 

Ah thanks. I was wondering why you had done it in asm.

It's a pity but you're right that's probably a measurable performance
hit for some of those calls.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Kernel Development]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Info]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Linux Media]     [Device Mapper]

  Powered by Linux