From mboxrd@z Thu Jan 1 00:00:00 1970 From: vm.rod25@gmail.com (Victor Rodriguez) Date: Mon, 16 Jul 2012 14:50:34 -0500 Subject: How to measure time spent in context switch In-Reply-To: References: Message-ID: To: kernelnewbies@lists.kernelnewbies.org List-Id: kernelnewbies.lists.kernelnewbies.org Hi Manavendra Have you think in a driver that you can call when the context switch happen? If this can be detected (more investigation on this area is required). If that is possible we can create the driver to measure the time according to the interruption. Thanks a lot and regards Victor Rodriguez On Mon, Jul 16, 2012 at 2:28 PM, Manavendra Nath Manav wrote: > How to measure time spent in context switch in Linux i.e. the time the > application stays suspended while the kernel is doing something else. I > don't want to use any profiling tools. What approach should I take to write > my own C code, which can also run as kernel module if required, to measure > time spent accurately. Will it also require to modify the scheduler code? > Does /proc gives any statistics in this regard? > > Ref: > http://stackoverflow.com/questions/2368384/write-a-c-program-to-measure-time-spent-in-context-switch-in-linux-os > > -- > Manavendra Nath Manav > _______________________________________________ > Kernelnewbies mailing list > Kernelnewbies at kernelnewbies.org > http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies >