Original website: http://www.ibm.com/developerworks/cn/linux/l-cn-linuxkernelint/index.html
Brief Introduction: This article has carried on the thorough analysis and the discussion to the interrupt system, mainly includes the interruption controller, the interruption classification, the interruption affinity, the interrupt migration and so on in the disconnection process and SMP. Firstly, the principle of interruption is briefly analyzed, then the r
Spin Lock thinking: http://bbs.chinaunix.net/thread-2333160-1-1.htmlrecently in See Song Baohua "device driver development Specific explanation" second edition. See the spin lock part, some doubts. So come and ask the people. Here are some of the ideas I've got from some of the online information that I've come up with, and I don't know right or wrong. Let's write it down and discuss it:(1) There are three implementations of spin locks on Linux:1. On a single CPU. Cannot
Spin Lock thinking: http://bbs.chinaunix.net/thread-2333160-1-1.htmlrecently in See Song Baohua "device driver Development detailed" Second edition, see the Spin lock part, some doubts, so come to ask everyone. Here are some of the ideas I've drawn from some of the web's information, whether it's right or not, and what we're talking about:(1) There are three implementations of spin locks on Linux:1. In a single CPU, cannot preempt the kernel, the spin
simulation interrupt, so called soft interrupt.A soft interrupt does not preempt another soft interrupt, only a hardware interrupt can preempt the soft interrupt, so a hard interrupt can guarantee a strict time requirement. The origin of soft interrupts http://blog.chinaunix.net/uid-27717694-id-3807979.html
The Linux bottom half (hereinafter referred to as BH) mechanism has two drawbacks, namely:
that acquires the lock and interrupts form a race condition) analogy: The current thread acquires a spin lock. Interrupt handlers interrupt the interrupt handler in the critical section to get the lock, and the interrupt handler waits for the current thread to release the lock, while the current thread waits for the break to run before the critical section and the code to release the lock.The use of a spin lock in the operation of the lower half of the interrupt handling is especially necessary
a race condition) For example: After the current thread acquires a spin lock, the interrupt handler is interrupted in the critical section, and then the interrupt handler waits for the lock to be released. The current thread is also waiting for the code to execute the critical section and release the lock after the interrupt has been executed.The use of a spin lock in the operation of the lower half of the interrupt handling is especially necessary for caution:1. When the lower half of processi
Transferred from: http://www.ibm.com/developerworks/cn/linux/l-cn-linuxkernelint/In this paper, the interrupt system is analyzed and discussed, including interrupt controller, interrupt classification, interrupt affinity, interrupt transfer and interruption migration in SMP. Firstly, the principle of interrupt operation is briefly analyzed, and then the realization principle of interrupt affinity is discussed in detail, and the mechanism of the proces
Http://www.ibm.com/developerworks/cn/linux/l-cn-linuxkernelint/index.htmlIn this paper, the interrupt system is analyzed and discussed, including interrupt controller, interrupt classification, interrupt affinity, interrupt transfer and interruption migration in SMP. Firstly, the principle of interrupt operation is briefly analyzed, and then the realization principle of interrupt affinity is discussed in detail, and the mechanism of the process of dis
Of the current version 2.6 kernel, there are three possible options: Softirq, Tasklet, and Work queue. Tasklet is based on SOFTIRQ implementations, so the two are very similar. The work queue is completely different from them, and it is implemented by kernel threading.
1, SOFTIRQ
Soft interrupts support SMP, and the same SOFTIRQ can be run concurrently on different CPUs, SOFTIRQ must be reentrant. Soft interrupts are statically allocated during compil
symbol used in the module is inconsistent with the verification string of the corresponding kernel symbol exported by the current running kernel, that is, the current kernel space does not have the kernel symbol used by the module, and the "Invalid module format" error will occur.Adding a verification string to the kernel symbol to verify whether the module version matches the kernel version is complicated and wastes kernel space. In addition, with SMP
current running kernel, that is, the current kernel space does not have the kernel symbol used by the module, and the "invalid module format" error will occur.
Adding a verification string to the kernel symbol to verify whether the module version matches the kernel version is complicated and wastes kernel space. In addition, with SMP (symmetric multi-processor), preempt (can seize the kernel) and other mec
current running kernel, that is, the kernel symbol used by the module does not exist in the current kernel space.Adding a check string to the kernel symbol to verify that the version of the module matches the kernel version is cumbersome and wasteful of kernel space, and with SMP (symmetric multiprocessor), PREEMPT (preemptive Kernel), such as the introduction and refinement of the 2.6 kernel, the module r
PREEMPT_SCHEDULE_IRQ//can preempt kernel jmp exit_intr//re-check#endifCfi_endprocend (Common_interrupt)4. preemption and SMP concurrency security
Interrupt nesting can lead to deadlocks and race, and general interrupt context shuts down local interrupts
Soft interrupt
A kernel task accessing the PERCPU variable may cause deadlock and race when accessing percpu or shared variables, possibly
"
And then by the macro in include/linux/vermagic.h.To assemble the vermagic_string, which is the vermagic of kernel.
#include#include
#ifdef CONFIG_SMP#define MODULE_VERMAGIC_SMP "SMP"#else#define MODULE_VERMAGIC_SMP ""#endif#ifdef CONFIG_PREEMPT#define MODULE_VERMAGIC_PREEMPT "Preempt"#else#define MODULE_VERMAGIC_PREEMPT ""#endif完成编译后, you can have#ifdef Config_module_unload#define MODULE_VERMAGIC_MODULE_
lock and interrupts form a race condition)For example: After the current thread acquires a spin lock, the interrupt handler is interrupted in the critical section, and the interrupt handler acquires the lock exactly as well.The interrupt handler waits for the current thread to release the lock, and the current thread waits for the code to execute the critical section and release the lock after the interrupt has finished executing.
The use of a spin lock in the operation of the lower half o
There are two RCU implementations in kernel, one is tiny RCU and the other is tree RCU. Both of these RCU were formerly classic RCU.If you want to read the classic RCU implementation code, you must find kernel 2.6.26, because in kernel 2.6.27,classic RCU began to transform to use the tree node Scalable classic RCU, is now the tree RCU the shape of the skin.So what is the relationship between tiny Rcu and classic RCU, tiny, as its name, is the compact classic RCU, specifically designed for single
.
Alias:tiwlan_sdio
License:gpl
Description:ti WLAN SDIO Driver
Depends:
VERMAGIC:2.6.28-271-GEC75A15 preempt Mod_unload ARMv7
Parm:g_sdio_debug_level:debug level (int)
Third, modify the kernel vermagic, and then re-translated driver
The first value of Vermagic is 2.6.28-noneed by this include/linux/utsrelease.hThe definition of uts_release.
#define Uts_release "2.6.28-271-GEC75A15"
And then by the macro in include/linux/vermagic.h to assemble the ver
so on.When an application executes a system call, we say that the kernel is executing on its behalf. If further explained, in this case, the application is called to run through the system call in kernel space, while the kernel is called running in the process context. This interaction one by one-the application through the system call interface into the kernel is one of the basic behavior of the application to complete its work.Comparison between the 1.4Linux kernel and the traditional UNIX ke
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.