Find the answer to your Linux question:
Results 1 to 2 of 2
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    My program spends 50% of the time in kernal mode?

    Ok, I'm optimizing a very intesive inner-loop (with assembly code) and have gotten the user mode time down to about equal, in time, with the system mode. I'm using SSE3 extensions, prefetching, and all the fun-stuff for the lowest level, but I fear, now, it's time for me to turn my attention to the interactions with the Linux Memory Management to get any more improvement. At this level, I'm pretty much a Linux newbie. I understand fully the theory of memory management, but the implementation details I'm completely void of....

    Here's my problem.. I have no idea what it's doing for 50% of the time! Is there some easy way to tell what kernel services are being asked for by a given process?

    My application takes a huge array (15+mb) does some math, and stores that answer into another array. This is done entry by entry, with a -very- large spatial dependance (ie, each output is only dependant on the array elements near it.. so things fit in cache nicely).

    I do this almost exclusively in assembly code (from ada). The only possible kernel operation that makes sense is page faulting, but when I use the time command in cshell, the number of page faults doesn't change when I do a varying number of iterations, it stays constant (maybe I'm not using this command correctly).

    If it helps, my naive breakdown of the assembly seems to indicate that the culprit is a STORE instruction (specifically non-temporal WC store, "MOVNTPS"). I only guess this because i do some major comment-voodoo and isolate this instruction, and it appears to be the only one with a high% of system time.

    So, can anyone help?


  2. #2
    Linux Guru lakerdonald's Avatar
    Join Date
    Jun 2004
    St. Petersburg, FL
    You might want to try to use:
    , which traces, as the name implies, system calls.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts