0

I am looking into cat /proc/interrupts and I am looking for the name of the interrupt I should look for whenever context switching happens? Where can I see the counts of interrupts when the context switch happens in the linux kernel.

tannoy connect
  • 185
  • 4
  • 14
  • What sort of context switch? – Ian Abbott Jul 01 '20 at 12:12
  • If by "context switching" you mean the scheduler kicking in and rescheduling other processes (which is just one of the various possible ways a context switch can happen), then those interrupts are labelled `Rescheduling interrupts` in `/proc/interrupts`. – Marco Bonelli Jul 02 '20 at 14:40
  • Yes, I mean scheduling the process. But now I am confused more - you said, just one of the various way a context switch can happen. What are the other ways? Please put your answer in the answer block. – tannoy connect Jul 02 '20 at 21:23
  • @tannoyconnect I am not sure what kind of answer you are looking for. *All* interrupts will generate a (forced) context switch, in order to be serviced by kernel code interrupt handlers. If you only mean context switches that are done by the scheduler, then the answer is right there in `/proc/interrupts`. If you mean *any* context switch, then just sum up all the values. Also, please @ me if you answer otherwise I don't get a notification and may forget about this. – Marco Bonelli Jul 12 '20 at 13:27

0 Answers0