ktime: Get rid of the union
Quoted 9 lines · tip-bot for Thomas Gleixner
Commit-ID: 64dac5c9e0f5a933e4520f0cb689b7b143925207 Gitweb: http://git.kernel.org/tip/64dac5c9e0f5a933e4520f0cb689b7b143925207 Author: Thomas Gleixner <[email protected]> AuthorDate: Sun, 25 Dec 2016 11:38:40 +0100 Committer: Thomas Gleixner <[email protected]> CommitDate: Sun, 25 Dec 2016 13:11:50 +0100ktime: Get rid of the union
Quoted 7 lines
ktime is a union because the initial implementation stored the time in scalar nanoseconds on 64 bit machine and in a endianess optimized timespec variant for 32bit machines. The Y2038 cleanup removed the timespec variant and switched everything to scalar nanoseconds. The union remained, but become completely pointless.
Get rid of the union and just keep
ktime_tas simple typedef of type s64.
All good stuff. One question that remains is why keep the type while removing the cycles_t type?
Quoted 16 lines · Peter Zijlstra
Quoted 15 lines · tip-bot for Thomas Gleixner
Commit-ID: 64dac5c9e0f5a933e4520f0cb689b7b143925207 Gitweb: http://git.kernel.org/tip/64dac5c9e0f5a933e4520f0cb689b7b143925207 Author: Thomas Gleixner <[email protected]> AuthorDate: Sun, 25 Dec 2016 11:38:40 +0100 Committer: Thomas Gleixner <[email protected]> CommitDate: Sun, 25 Dec 2016 13:11:50 +0100ktime: Get rid of the union
ktime is a union because the initial implementation stored the time in scalar nanoseconds on 64 bit machine and in a endianess optimized timespec variant for 32bit machines. The Y2038 cleanup removed the timespec variant and switched everything to scalar nanoseconds. The union remained, but become completely pointless.
Quoted 4 lines
Quoted 1 line
Get rid of the union and just keep
ktime_tas simple typedef of type s64.All good stuff. One question that remains is why keep the type while removing the
cycles_ttype?
That would have been a massive surgery which I was not able to pull off on top of the other changes.
Thanks,
tglx
Quoted 9 lines · Thomas Gleixner
Quoted 4 lines · Peter Zijlstra
Quoted 1 line
Get rid of the union and just keep
ktime_tas simple typedef of type s64.All good stuff. One question that remains is why keep the type while removing the
cycles_ttype?That would have been a massive surgery which I was not able to pull off on top of the other changes.
And the reason ktime needs be s64 is because 0 is at boot, and we need to represent time before boot, right? Might want to stick that in a comment somewhere near that typedef, so I don't keep asking this ;-)
2017-01-04 10:39 GMT+01:00 Peter Zijlstra <[email protected]>:
Quoted 8 lines · Thomas Gleixner
Quoted 7 lines · Peter Zijlstra
Quoted 5 lines
Quoted 2 lines
Get rid of the union and just keep
ktime_tas simple typedef of type s64.All good stuff. One question that remains is why keep the type while removing the
cycles_ttype?
Quoted 6 lines
Quoted 2 lines
That would have been a massive surgery which I was not able to pull off on top of the other changes.
And the reason ktime needs be s64 is because 0 is at boot, and we need to represent time before boot, right? Might want to stick that in a comment somewhere near that typedef, so I don't keep asking this ;-)
Aaah, that confused me as well :-)