Native Linux MCE Fundamentals and processing function portals (based on kernel 4.2.0+) __oracle

Source: Internet
Author: User

On the old Intel processor, when the hardware detects an error, it broadcasts a MCE to each logical CPU of the system. This design is because of hardware flaws, because the original processor found an error (such as a memory error), it will flow with pipeline to any unpredictable CPU, resulting in system problems. Based on this hardware design problem, the strategy of broadcasting MCE to all CPUs of the whole system is generated. To ensure that all CPUs in the event of errors, at the same time into the exception handling process to guide the completion of the exception processing. This consumption in fact is very large in the case of multiple sockets. This is a triumph over the late Intel processor, and I'll introduce it in the back of my blog.
For MCE please refer to my blog << Intel processor interrupt 18-machine-check Exception (#MC) Introduction >>

CPU received MCE, if it is the CPU generated by the exception, then enter the process of int 18; If it is not the exception generated by this CPU, then the CPU into busy and other processes to guide this exception processing. Note that this exception is synchronized, that is, when an exception is generated, All CPUs will immediately enter exception handling, without any delay and wait. This CPU is busy waiting until the process of exception processing is called the CPU collection

On native Linux, MCE's file is arch/x86/kernel/cpu/mcheck/mce.c.
The core processing function is: Do_machine_check, this is the handler function for int 18
Mce_start is invoked in Do_machine_check to perform a collection of CPUs
In Mce_start, if not the CPU, call Ndelay (spinunit), enter busy, etc. if this CPU is returned from Mce_start for processing
At the end of the Do_machine_check, the error severity level is graded, and if it is urgent, the memory_failure is invoked directly in the kernel, and if it is not urgent, it can be delay, and then a bit Then pass the notify notice. For delay, after switching to the process context, the table position is found, through notfiy, the handler function is Srao_decode_notifier, and then the memory_failure is processed.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.