"Bug: Scheduling while atomic" and "Bad: scheduling from the idle thread" Error Analysis

Source: Internet
Author: User

When the Linux kernel prints "bug: Scheduling while atomic" and "Bad: scheduling from the idle thread" errors, it usually calls sleep functions in the interrupt processing function, such as semaphore, mutex, sleep, and other sleep functions, while the Linux kernel requires that the system height and preemption are not allowed during Interrupt Processing, and other tasks can be performed only after the interrupt processing is completed. Therefore, it must not be too long to fully consider the interrupt processing time.

Another problem that can be solved is that something should not be done in the idle process. Now Linux is used for many handheld devices. To reduce power consumption, the general practice is to reduce the frequency of CPU or RAM in the idle process, disable some devices, and so on. To ensure the atomicity of these actions, ensure that "bad: scheduling from the idle thread "errors!

Keywords:

Synchronization Methods in Linux kernel interrupt handler Functions

"Bug: Scheduling while atomic" Error Analysis

"Bad: scheduling from the idle thread" Error Analysis

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.