Linux kernel print "bug:scheduling while atomic

Source: Internet
Author: User

When the Linux kernel prints "bug:scheduling while Atomic" and "bad:scheduling from the Idle thread" error,

It is usually called in the interrupt handler function that can sleep, such as semaphore,mutex,sleep, such as a dormant function,

While the Linux kernel requires interrupt processing, the system is not allowed to dispatch, not allow preemption, wait until the completion of the interrupt processing to do other things.

Therefore, to fully consider the interruption of processing time, must not be too long.

Another thing that can create this problem is that in the idle process, you do what you shouldn't. Linux is now used in many handheld devices, in order to reduce power consumption,

The usual practice is to reduce the CPU or RAM frequency, turn off some devices, and so on in the idle process. To ensure that the atomic nature of these actions

The "bad:scheduling from the idle thread" error does not occur!

Banning kernel preemption means that the kernel does not proactively preempt your process, but now you are actively call schedule () in your own program,

Kernel can't stop you from doing this.

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.