Re: Intel P6 vs P7 system call performance

H. Peter Anvin
2002-12-17T20:02:57Z

Matti Aarnio wrote:
> (cutting down To:/Cc:)
>
> On Tue, Dec 17, 2002 at 11:43:57AM -0800, H. Peter Anvin wrote:
>
>>Linus Torvalds wrote:
>>
>>>The thing is, gettimeofday() isn't _that_ special. It's just not worth a
>>>vsyscall of it's own, I feel. Where do you stop? Do we do getpid() too?
>>>Just because we can?
>>
>>getpid() could be implemented in userspace, but not via vsyscalls
>>(instead it could be passed in the ELF data area at process start.)
>
>
> After fork() or clone() ?
> If we had only spawn(), and some separate way to start threads...
>

fork() and clone() would have to return the self-pid as an auxilliary
return value. This, of course, is getting rather fuggly.

Anything that cares caches getpid() anyway.

-hpa