views:

248

answers:

2

Hi

I have done some simple changes to the scheduler in the Linux Kernel. Now, I would like to see how those changes affect the response time of the system; in other words, I would like to know how long a context switch takes with my modifications compared to the original scheduler. A straightforward approach would be to use the time stamp counter, and use then the printk to output the time it took for the context switch; obviously, in this case a lot of information is printed out. So I wonder if there is any other, better approach to measure the Linux scheduler response time?

Thanks

A: 

Does this scheduler benchmark help perhaps? It's from 1998, but perhaps the C source code can be used as a base.

schnaader
a bit obsolete in the meantime but thanks anyway. however, I guess measuring the context switches directly in the kernel might be more accurate, wouldn't it?
+1  A: 

There are several kernel-level trace frameworks, which might help you. See the Kernel Trace Systems page on eLinux.org for a nice overview of the available options.

David Schmitt
Thanks, I will have a look into this!