Experts,
Sometimes CPU usage of my application( uses opengl and CG shader for display) is very high( 50%).
This issue appears in rare scenarios, when starting my application.
I cant say any scenario which will cause the issue.
Once the issue appeared at startup, the cpu usage remainsas high.
When I checked cpu usage of individual threads, I found the thread responsible for
opengl display cause high cpu usage. all other threads working with normal cpu usage.
After anlaysing cpu usage, I found kernel mode cpu time higher than user mode cpu time.
In normal case( when cpu is below 10%) the kernel mode is less than user mode.
There is no never ending loop, or dead locks.
Normal call sequence but the Kernel mode cpu usage is very high.
In normal case cpu usage of application is below 10%.
kernel time: 0:00:16:640
User time: 0:02:33:421
In Error case, cpu usage is 50%.
kernel time: 0:11:56:437
User time: 0:04:26:359
Any possibility for high Kernel mode cpu usage ?
or what may the possible reason ?
I suspect the data transfer between gpu and cpu is high.
But the following calls also take CPU.
In my understanding, all below functions changes opengl state,
glMatrixMode();
glLoadIdentity();
gluPerspective( );
gluLookAt( );
glViewport( );
What are the possible reasons for high cpu time in kernel mode ?
How can find which call is blocking in Kernel mode ?