Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 24 Mar 2011 21:34:35 +0800
From:      Jing Huang <jing.huang.pku@gmail.com>
To:        ivoras@freebsd.org
Cc:        freebsd-hackers@freebsd.org
Subject:   [GSoc] Timeconter Performance Improvements
Message-ID:  <AANLkTimbBohQmoPv19Qq2U6M70OBx%2BFBMiUAzQmqrTLK@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
Hi,

   Thanks for your replay. That is just my self-introduction:) I want
to borrow the shared memory idea from KVM, I am not want to port a
whole KVM:)  But for this project, there are some basic problems.

    As I know, tsc counter is CPU specific. If the process running on
a multi-core platform, we must consider switching problem. The one
way, we can let the kernel to take of this. When switching to another
CPU, the kernel will reset the shared memory according to the new CPU.
The second way, we can use CPUID instruction to get the info of
current CPU, which can be executed in user mode ether. At the same
time, the kernel maintains shared memory for each CPU. When invoke
gettimeofday, the function will calculate precise time with current
CPU's shared memory.

   I don't know which is better? Could I need to deal other problems?


Jing.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AANLkTimbBohQmoPv19Qq2U6M70OBx%2BFBMiUAzQmqrTLK>