locked
activity on other cores during an SMP ISR RRS feed

  • Question

  • I recently inherited development of a PCIE driver on an i7-4650U (SMP I believe, not NUMA) windows 7 platform.

    While writing the ISR I thought of an interesting question but I am having trouble finding anything anywhere that gives a clear answer.

    If anyone can provide a link to suitable info that would be very appreciated.

    The question :

    When handling an interrupt on a multi processor system, I understand that the execution is allocated to a single core.

    The ISR executes at IRQL where the interrupt is acknowledged in kernel mode.

    What I don't really understand is what is going on with the other 7 cores in the system at this time.

    Is Windows 7 just supporting kernel mode for this core or has the entire operating system gone into kernel mode ?

    Do the other processes continue to run until they hit an OS call or do they continue to run in whatever mode is correct for them at the time ?

    Where can I look to find a good description of how Windows 7 supports SMP and swapping from kernel to user mode etc ?

    I don't have a problem with the driver, I would just like a better understanding of whats happening.

    Many thanks,

    Barry.

    Friday, November 3, 2017 9:17 PM

Answers

  • The question :

    When handling an interrupt on a multi processor system, I understand that the execution is allocated to a single core.

    Kind of. The ISR is protected by a spinlock in the "interrupt object", so it is guaranteed to run exclusively by one CPU.

    The ISR executes at IRQL where the interrupt is acknowledged in kernel mode.

    What I don't really understand is what is going on with the other 7 cores in the system at this time.

    In the worst case, one or more other CPUs may respond to the same interrupt, they may be busy-waiting on this spinlock, until the CPU that executes the ISR exits. On sane platforms this should not occur though.

    All other CPUs just keep running in whatever mode they are.


    Where can I look to find a good description of how Windows 7 supports SMP and swapping from kernel to user mode etc ?


    In the Windows Internals book, maybe. Or mine for that old notepad from the CS Operating systems course :)

    Good luck,

    -- pa

    Friday, November 3, 2017 10:27 PM

All replies

  • The question :

    When handling an interrupt on a multi processor system, I understand that the execution is allocated to a single core.

    Kind of. The ISR is protected by a spinlock in the "interrupt object", so it is guaranteed to run exclusively by one CPU.

    The ISR executes at IRQL where the interrupt is acknowledged in kernel mode.

    What I don't really understand is what is going on with the other 7 cores in the system at this time.

    In the worst case, one or more other CPUs may respond to the same interrupt, they may be busy-waiting on this spinlock, until the CPU that executes the ISR exits. On sane platforms this should not occur though.

    All other CPUs just keep running in whatever mode they are.


    Where can I look to find a good description of how Windows 7 supports SMP and swapping from kernel to user mode etc ?


    In the Windows Internals book, maybe. Or mine for that old notepad from the CS Operating systems course :)

    Good luck,

    -- pa

    Friday, November 3, 2017 10:27 PM
  • Thank you.

    I will take a look for both. It sounds like the Windows Internals book will make an interesting read.

    Barry

    Saturday, November 4, 2017 9:35 PM