Re: getting processor numbers

Eric Dumazet
2007-04-04T05:29:23Z

H. Peter Anvin a écrit :
> Eric Dumazet wrote:
>>
>> There is one thing that always worried me.
>>
>> Intel & AMD manuals make clear that mixing data and program in the
>> same page is bad for performance.
>>
>> In particular, x86_64 vsyscall put jiffies and other
>> vsyscall_gtod_data_t right in the midle of code. That is certainly not
>> wise.
>>
>> A probably sane implementation should use two pages, one for code, one
>> for data.
>>
>
> Mutable data should be separated from code. I think any current CPU
> will do fine as long as they are in separate 128-byte chunks, but they
> need at least that much separation.
>
> Readonly data does not need to be separated from code.
>

Yes... jiffies & vsyscall_gtod_data_t is writen HZ times per second.

Not really readonly I'm afraid.