From: john s. <joh...@us...> - 2003-01-23 04:08:33
|
All, Attached is my re-sync'ed vsyscall gettimeofday code w/ 2.5.59. This allows calls to gettimeofday to fully execute in user-space, saving the cost of switching into kernel mode. Also attached is a toy benchmark as an example of how to call the vsyscall gettimeofday using LD_PRELOAD. Example benchmark output, showing performance benefits: Normal gettimeofday gettimeofday ( 1459524us / 1000000runs ) = 1.459522us vsyscall LD_PRELOAD gettimeofday gettimeofday ( 165892us / 1000000runs ) = 0.165892us I've reworked the patch a bit to co-exist w/ the new sysenter bits, dropping my vsyscall page down from 0xffffe000 to 0xffffd000 as not to collide. Also I fixed a compile problem when CONFIG_VSYSCALL was not defined. While this is not being submitted for acceptance, I do plan to keep maintaining this in my spare time. However its not likely I'll do it for every point release, so if you don't see a release, or the IBM CPR entry is getting stale, ping me and I'll bring it up to date. You should be able to find these files (and future releases) on IBM's Central Patch Repository at: http://www-124.ibm.com/developer/opensource/linux/patches/?patch_id=597&show=all Let me know if you have any comments or suggestions. thanks -john |