转自:http://blog.csdn.net/tommy_wxie/article/details/7425692

版权声明:本文为博主原创文章,未经博主允许不得转载。
3、内核的中断处理
3.1、中断处理入口
由上节可知,中断向量的对应的处理程序位于interrupt数组中,下面来看看interrupt:
[html] view plain copy print?
341 .data #数据段
342 ENTRY(interrupt)
343 .text
344
345 vector=0
346 ENTRY(irq_entries_start)
347 .rept NR_IRQS #348-354行重复NR_IRQS次
348 ALIGN
349 1: pushl $vector-256 #vector在354行递增
350 jmp common_interrupt #所有的外部中断处理函数的统一部分,以后再讲述
351 .data
352 .long 1b #存储着指向349行的地址,但是随着348行-354被gcc展开,每次的值都不同
353 .text
354 vector=vector+1
355 .endr #与347行呼应
356
357 ALIGN  #公共处理函数
common_interrupt:  SAVE_ALL            /*寄存器值入栈*/  movl %esp,%eax /*栈顶指针保存到eax*/  call do_IRQ   /*处理中断*/  jmp ret_from_intr /*从中断返回*/
分析如下:
首先342行和352行都处于.data段,虽然看起来它们是隔开的,但实际上被gcc安排在了连续的数据段内存 中,同理在代码段内存中,354行与350行的指令序列也是连续存储的。另外,348-354行会被gcc展开NR_IRQS次,因此每次352行都会存 储一个新的指针,该指针指向每个349行展开的新对象。最后在代码段内存中连续存储了NR_IRQS个代码片断,首地址由 irq_entries_start指向。而在数据段内存中连续存储了NR_IRQS个指针,首址存储在interrupt这个全局变量中。这样,例如 IRQ号是0 (从init_IRQ()调用,它对应的中断向量是FIRST_EXTERNAL_VECTOR)的中断通过中断门后会触发 interrput[0],从而执行:
pushl 0-256
jmp common_interrupt
的代码片断,进入到Linux内核安排好的中断入口路径。3.2、数据结构
3.2.1、IRQ描述符
Linux支持多个外设共享一个IRQ,同时,为了维护中断向量和中断服务例程(ISR)之间的映射关系,Linux用一个irq_desc_t数据结构来描述,叫做IRQ描述符。除了分配给异常的
32个向量外,其余224(NR_IRQS)个中断向量对应的IRQ构成一个数组irq_desc[],定义如下:
[html] view plain copy print?
<pre name="code" class="html">//位于linux/irq.h
typedef struct irq_desc {  unsigned int status;        /* IRQ status */  hw_irq_controller *handler;  struct irqaction *action;    /* IRQ action list */  unsigned int depth;        /* nested irq disables */  unsigned int irq_count;        /* For detecting broken interrupts */  unsigned int irqs_unhandled;  spinlock_t lock;
} ____cacheline_aligned irq_desc_t;  //IRQ描述符表
extern irq_desc_t irq_desc [NR_IRQS];</pre>
<pre></pre>
<p></p>
<pre></pre>
“____cacheline_aligned”表示这个数据结构的存放按32字节(高速缓存行的大小)进行对齐,以便于将来存放在高速缓存并容易存取。status:描述IRQ中断线状态,在irq.h中定义。如下:
<p></p>
<p><span style="color:#008000"></span></p>
<pre name="code" class="html">#define IRQ_INPROGRESS  1   /* 正在执行这个IRQ的一个处理程序*/
#define IRQ_DISABLED    2    /* 由设备驱动程序已经禁用了这条IRQ中断线 */
#define IRQ_PENDING     4    /* 一个IRQ已经出现在中断线上,且被应答,但还没有为它提供服务 */
#define IRQ_REPLAY      8    /* 当Linux重新发送一个已被删除的IRQ时 */
#define IRQ_AUTODETECT  16  /* 当进行硬件设备探测时,内核使用这条IRQ中断线 */
#define IRQ_WAITING     32   /*当对硬件设备进行探测时,设置这个状态以标记正在被测试的irq */
#define IRQ_LEVEL       64    /* IRQ level triggered */
#define IRQ_MASKED      128    /* IRQ masked - shouldn't be seen again */
#define IRQ_PER_CPU     256     /* IRQ is per CPU */
</pre><br>
<br>
<p></p>
<p><span style="color:#008000"><br>
</span></p>
<p>handler:指向hw_interrupt_type描述符,这个描述符是对中断控制器的描述。下面有描述。<br>
action:指向一个单向链表的指针,这个链表就是对中断服务例程进行描述的irqaction结构。下面有描述。<br>  <br>
depth:如果启用这条IRQ中断线,depth则为0,如果禁用这条IRQ中断线不止一次,则为一个正数。每当调用一次disable_irq(),该函数就对这个域的值加1;如果depth等于0,该函数就禁用这条IRQ中断线。相反,每当调用enable_irq()函数时,该函数就对这个域的值减1;如果depth变为0,该函数就启用这条IRQ中断线。<br>
lock:保护该数据结构的自旋锁。<span style="color:#008000"><br>
<img alt="" src="http://images.cnblogs.com/cnblogs_com/hustcat/Kernel/kernel_1_4.JPG" height="312" width="701"><br>
IRQ描述符的初始化:<br>
<span style="color:#008000">//</span><span style="color:#008000">位于arch/i386/kernel/i8259.c</span><span style="color:#008000"><br>
</span><span style="color:#0000ff">void</span><span style="color:#000000"> __init init_ISA_irqs (</span><span style="color:#0000ff">void</span><span style="color:#000000">)<br>
{<br>  </span><span style="color:#0000ff">int</span><span style="color:#000000"> i;<br>
<br>
#ifdef CONFIG_X86_LOCAL_APIC<br>  init_bsp_APIC();<br>
</span><span style="color:#0000ff">#endif</span><span style="color:#000000"><br>  </span><span style="color:#008000">//</span><span style="color:#008000">初始化8259A</span><span style="color:#008000"><br>
</span><span style="color:#000000">    init_8259A(</span><span style="color:#800080">0</span><span style="color:#000000">);<br>  </span><span style="color:#008000">//</span><span style="color:#008000">IRQ描述符的初始化</span><span style="color:#008000"><br>
</span><span style="color:#000000">    </span><span style="color:#0000ff">for</span><span style="color:#000000"> (i </span><span style="color:#000000">=</span><span style="color:#000000"> </span><span style="color:#800080">0</span><span style="color:#000000">; i </span><span style="color:#000000"><</span><span style="color:#000000"> NR_IRQS; i</span><span style="color:#000000">++</span><span style="color:#000000">) {<br>  irq_desc[i].status </span><span style="color:#000000">=</span><span style="color:#000000"> IRQ_DISABLED;<br>  irq_desc[i].action </span><span style="color:#000000">=</span><span style="color:#000000"> NULL;<br>  irq_desc[i].depth </span><span style="color:#000000">=</span><span style="color:#000000"> </span><span style="color:#800080">1</span><span style="color:#000000">;<br>
<br>  </span><span style="color:#0000ff">if</span><span style="color:#000000"> (i </span><span style="color:#000000"><</span><span style="color:#000000"> </span><span style="color:#800080">16</span><span style="color:#000000">) {<br>  </span><span style="color:#008000">/*</span><span style="color:#008000"><br>  * 16 old-style INTA-cycle interrupts:<br>  </span><span style="color:#008000">*/</span><span style="color:#000000"><br>  irq_desc[i].handler </span><span style="color:#000000">=</span><span style="color:#000000"> </span><span style="color:#000000">&</span><span style="color:#000000">i8259A_irq_type;<br>  } </span><span style="color:#0000ff">else</span><span style="color:#000000"> {<br>  </span><span style="color:#008000">/*</span><span style="color:#008000"><br>  * 'high' PCI IRQs filled in on demand<br>  </span><span style="color:#008000">*/</span><span style="color:#000000"><br>  irq_desc[i].handler </span><span style="color:#000000">=</span><span style="color:#000000"> </span><span style="color:#000000">&</span><span style="color:#000000">no_irq_type;</span><br>
<span style="color:#000000">        }</span><br>
<span style="color:#000000">    }</span><br>
<span style="color:#000000">}</span><br>
</span>从这段程序可以看出,初始化时,让所有的中断线都处于禁用状态;每条中断线上还没有任何中断服务例程(action为0);因为中断线被禁用,因此depth为1;对中断控制器的描述分为两种情况,一种就是通常所说的8259A,另一种是其它控制器。<br>
3.2.2、中断控制器描述符hw_interrupt_type<br>
这个描述符包含一组指针,指向与特定的可编程中断控制器电路(PIC)打交道的低级I/O例程,定义如下:<span style="color:#008000"><br>
</span></p>
<pre name="code" class="html">//位于linux/irq.h
struct hw_interrupt_type {  const char * typename;  unsigned int (*startup)(unsigned int irq);  void (*shutdown)(unsigned int irq);  void (*enable)(unsigned int irq);  void (*disable)(unsigned int irq);  void (*ack)(unsigned int irq);  void (*end)(unsigned int irq);  void (*set_affinity)(unsigned int irq, cpumask_t dest);
};  typedef struct hw_interrupt_type  hw_irq_controller;
</pre><br>
Linux除了支持常见的8259A芯片外,也支持其他的PIC电路,如SMP IO-APIC、PIIX4的内部 8259 PIC及 SGI的Visual Workstation Cobalt (IO-)APIC。8259A的描述符如下:<span style="color:#008000"><br>
</span>
<p></p>
<p></p>
<pre name="code" class="html"><span style="color:#008000;">//位于arch/i386/kernel/i8259.c
static struct hw_interrupt_type i8259A_irq_type = {  "XT-PIC",  startup_8259A_irq,  shutdown_8259A_irq,  enable_8259A_irq,  disable_8259A_irq,  mask_and_ack_8259A,  end_8259A_irq,  NULL
};</span>
</pre>在这个结构中的第一个域“XT-PIC”是一个名字。接下来,8259A_irq_type包含的指针指向五个不同的函数,这些函数就是对PIC编程的函数。前两个函数分别启动和关闭这个芯片的中断线。但是,在使用8259A芯片的情况下,这两个函数的作用与后两个函数是一样的,后两个函数是启用和禁用中断线。mask_and_ack_8259A函数通过把适当的字节发往8259A I/O端口来应答所接收的IRQ。end_8259A_irq在IRQ的中断处理程序结束时被调用。<br>
<br>
3.2.3、中断服务例程描述符irqaction<br>
为了处理多个设备共享一个IRQ,Linux中引入了irqaction数据结构。定义如下:<span style="color:#008000"><br>
</span><pre name="code" class="html"><span style="color:#008000;">//位于linux/interrupt.h
struct irqaction {  irqreturn_t (*handler)(int, void *, struct pt_regs *);  unsigned long flags;  cpumask_t mask;  const char *name;  void *dev_id;  struct irqaction *next;  int irq;  struct proc_dir_entry *dir;
};</span>
</pre>handler:指向一个具体I/O设备的中断服务例程。这是允许多个设备共享同一中断线的关键域。<br>
flags:用一组标志描述中断线与I/O设备之间的关系。<br>
SA_INTERRUPT<br>
中断处理程序必须以禁用中断来执行<br>
SA_SHIRQ<br>
该设备允许其中断线与其他设备共享。<br>
SA_SAMPLE_RANDOM<br>
可以把这个设备看作是随机事件发生源;因此,内核可以用它做随机数产生器。(用户可以从/dev/random 和/dev/urandom设备文件中取得随机数而访问这种特征)<br>
SA_PROBE<br>
内核在执行硬件设备探测时正在使用这条中断线。<br>
name:I/O设备名(通过读取/proc/interrupts文件,可以看到,在列出中断号时也显示设备名。)<br>
dev_id:指定I/O设备的主设备号和次设备号。<br>
next:指向irqaction描述符链表的下一个元素。共享同一中断线的每个硬件设备都有其对应的中断服务例程,链表中的每个元素就是对相应设备及中断服务例程的描述。<br>
irq:IRQ线。<br>
<br>
3.2.4、中断服务例程(Interrupt Service Routine)<br>
在Linux中,中断服务例程和中断处理程序(Interrupt Handler)是两个不同的概念。可以这样认为,中断处理程序相当于某个中断向量的总处理程序,它与中断描述表(IDT)相关;中断服务例程(ISR)在中断处理过程被调用,它与IRQ描述符相关,一般来说,它是设备驱动的一部分。<br>
(1)    注册中断服务例程<br>
中断服务例程是硬件驱动的组成部分,如果设备要使用中断,相应的驱动程序在初始化的过程中可以通过调用request_irq函数注册中断服务例程。<br>
<pre name="code" class="html"><span style="color:#008000;">//位于kernel/irq/manage.c
/*irq:IRQ号
**handler:中断服务例程
**irqflags:SA_SHIRQ,SA_INTERRUPT或SA_SAMPLE_RANDOM
**devname:设备名称,这些名称会被/proc/irq和/proc/interrupt使用
**dev_id:主要用于设备共享  */
int request_irq(unsigned int irq,  irqreturn_t (*handler)(int, void *, struct pt_regs *),  unsigned long irqflags, const char * devname, void *dev_id)
{  struct irqaction * action;  int retval;  /*  * Sanity-check: shared interrupts must pass in a real dev-ID,  * otherwise we'll have trouble later trying to figure out  * which interrupt is which (messes up the interrupt freeing  * logic etc).  */  if ((irqflags & SA_SHIRQ) && !dev_id)  return -EINVAL;  if (irq >= NR_IRQS)  return -EINVAL;  if (!handler)  return -EINVAL;  //分配数据结构空间  action = kmalloc(sizeof(struct irqaction), GFP_ATOMIC);  if (!action)  return -ENOMEM;  action->handler = handler;  action->flags = irqflags;  cpus_clear(action->mask);  action->name = devname;  action->next = NULL;  action->dev_id = dev_id;  //调用setup_irq完成真正的注册,驱动程序也可以调用它来完成注册  retval = setup_irq(irq, action);  if (retval)  kfree(action);  return retval;
}</span>
</pre>来看实时时钟初始化函数如何使用request_irq():<span style="color:#008000"><br>
</span><pre name="code" class="html"><span style="color:#008000;">//位于driver/char/rtc.c
static int __init rtc_init(void)
{
request_irq(RTC_IRQ, rtc_int_handler_ptr, SA_INTERRUPT, "rtc", NULL);
}</span>
</pre>再看看时钟中断初始化函数:<span style="color:#008000"><br>
</span><pre name="code" class="html"><span style="color:#008000;">//位于arch/i386/mach_default/setup.c
static struct irqaction irq0  = { timer_interrupt, SA_INTERRUPT, CPU_MASK_NONE, "timer", NULL, NULL};
//由time_init()调用
void __init time_init_hook(void)
{  setup_irq(0, &irq0);
}</span>
</pre>3.3、中断处理流程<br>
整个流程如下:<span style="color:#008000"><br>
<img alt="" src="http://images.cnblogs.com/cnblogs_com/hustcat/Kernel/kernel_1_5.JPG" height="471" width="692"><br>
</span>所有I/O中断处理函数的过程如下:<br>
(1)把IRQ值和所有寄存器值压入内核栈;<br>
(2) 给与IRQ中断线相连的中断控制器发送一个应答,这将允许在这条中断线上进一步发出中断请求;<br>
(3)执行共享这个IRQ的所有设备的中断服务例程(ISR);<br>
(4)跳到ret_from_intr()处结束。<br>
<br>
3.3.1、保存现场与恢复现场<br>
中断处理程序做的第一件事就是保存现场,由宏SAVE_ALL(位于entry.S中)完成:<span style="color:#008000"><br>
</span><pre name="code" class="html"><span style="color:#008000;">#define SAVE_ALL \  cld; \  pushl %es; \  pushl %ds; \  pushl %eax; \  pushl %ebp; \  pushl %edi; \  pushl %esi; \  pushl %edx; \  pushl %ecx; \  pushl %ebx; \  movl $(__USER_DS), %edx; \  movl %edx, %ds; \  movl %edx, %es;</span>
</pre>当内核执行SAVE_ALL后,内核栈中的内容如下:<span style="color:#008000"><br>
<img alt="" src="http://images.cnblogs.com/cnblogs_com/hustcat/Kernel/kernel_1_6.JPG" height="326" width="444"><br>
</span>恢复现场由宏RESTORE_ALL完成<br>
<span style="color:#008000"></span><pre name="code" class="html">#define RESTORE_ALL    \  RESTORE_REGS    \  addl $4, %esp;    \
1:    iret;        \
.section .fixup,"ax";   \
2:    sti;        \  movl $(__USER_DS), %edx; \  movl %edx, %ds; \  movl %edx, %es; \  movl $11,%eax;    \  call do_exit;    \
.previous;        \
.section __ex_table,"a";\  .align 4;    \  .long 1b,2b;    \
.previous  复制代码
</pre><br>
3.3.2、do_IRQ()函数<br>
该函数的大致内容如下:<span style="color:#008000"><br>
</span><pre name="code" class="html"><span style="color:#008000;">//arch/i386/kernel/irq.c
fastcall unsigned int do_IRQ(struct pt_regs *regs)
{      /* high bits used in ret_from_ code */  //取得中断号  int irq = regs->orig_eax & 0xff;  //增加代表嵌套中断数量的计数器的值,该值保存在current->thread_info->preempt_count
    irq_enter();  __do_IRQ(irq, regs);  //减中断计数器preempt_count的值,检查是否有软中断要处理
    irq_exit();
}</span>
</pre>结构体pt_regs如下,位于inclue/asm-i386/ptrace.h:<span style="color:#008000"><br>
</span><pre name="code" class="html">struct pt_regs {  long ebx;  long ecx;  long edx;  long esi;  long edi;  long ebp;  long eax;  int  xds;  int  xes;  long orig_eax;  long eip;  int  xcs;  long eflags;  long esp;  int  xss;
};
</pre><br>
与内核栈相比,是内核栈中内容的一致。<br>
3.3.3、__do_IRQ()函数<br>
该函数的内容如下:<span style="color:#008000"><br>
</span><pre name="code" class="html"><span style="color:#008000;">//位于kernel/irq/handle.c
fastcall unsigned int __do_IRQ(unsigned int irq, struct pt_regs *regs)
{  irq_desc_t *desc = irq_desc + irq;  struct irqaction * action;  unsigned int status;  kstat_this_cpu.irqs[irq]++;  if (desc->status & IRQ_PER_CPU) {  irqreturn_t action_ret;  /*  * No locking required for CPU-local interrupts:  */  //确认中断  desc->handler->ack(irq);  action_ret = handle_IRQ_event(irq, regs, desc->action);  if (!noirqdebug)  note_interrupt(irq, desc, action_ret);  desc->handler->end(irq);  return 1;  }  /*加自旋锁.对于多CPU系统,这是必须的,因为同类型的其它中断可能产生,并被其它的CPU处理,  **没有自旋锁,IRQ描述符将被多个CPU同时访问.  */  spin_lock(&desc->lock);  /*确认中断.对于8259A PIC,由mask_and_ack_8259A()完成确认,并禁用当前IRQ线.  **屏蔽中断是为了确保该中断处理程序结束前,CPU不会又接受这种中断.虽然,CPU在处理中断会自动  **清除eflags中的IF标志,但是在执行中断服务例程前,可能重新激活本地中断.见handle_IRQ_event.  */  /*在多处理器上,应答中断依赖于具体的中断类型.可能由ack方法做,也可能由end方法做.不管怎样,在中断处理结束  *前,本地APIC不再接收同样的中断,尽管这种中断可以被其它CPU接收.  */  desc->handler->ack(irq);  /*  * REPLAY is when Linux resends an IRQ that was dropped earlier  * WAITING is used by probe to mark irqs that are being tested  */  //清除IRQ_REPLAY和IRQ_WAITING标志  status = desc->status & ~(IRQ_REPLAY | IRQ_WAITING);  /* IRQ_PENDING表示一个IRQ已经出现在中断线上,且被应答,但还没有为它提供服务 */  status |= IRQ_PENDING; /* we _want_ to handle it */  /*  * If the IRQ is disabled for whatever reason, we cannot  * use the action we have.  */  action = NULL;  /*现在开始检查是否真的需要处理中断.在三种情况下什么也不做.  *(1)IRQ_DISABLED被设置.即使在相应的IRQ线被禁止的情况下,do_IRQ()也可能执行.  *(2)IRQ_INPROGRESS被设置时,在多CPU系统中,表示其它CPU正在处理同样中断的前一次发生.Linux中,同类型  *中断的中断服务例程由同一个CPU处理.这样使得中断服务例程不必是可重入的(在同一CPU上串行执行).  *  *(3)action==NULL.此时,直接跳到out处执行.  */  if (likely(!(status & (IRQ_DISABLED | IRQ_INPROGRESS)))) {  action = desc->action;  //清除IRQ_PENDING标志  status &= ~IRQ_PENDING; /* we commit to handling */  /*表示当前CPU正在处理该中断,其它CPU不应该处理同样的中断,而应该让给本CPU处理.一旦设置  *IRQ_INPROGRESS,其它CPU即使进行do_IRQ,也不会执行该程序段,则action==NULL,则其它CPU什么也不做.  *当调用handle_IRQ_event执行中断服务例程时,由于释放了自旋锁,其它CPU可能接受到同类型的中断(本CPU  *不会接受同类型中断),而进入do_IRQ(),并设置IRQ_PENDING.  */  status |= IRQ_INPROGRESS; /* we are handling it */  }  desc->status = status;  /*  * If there is no IRQ handler or it was disabled, exit early.  * Since we set PENDING, if another processor is handling  * a different instance of this same irq, the other processor  * will take care of it.  */  if (unlikely(!action))  goto out;  /*  * Edge triggered interrupts need to remember  * pending events.  * This applies to any hw interrupts that allow a second  * instance of the same irq to arrive while we are in do_IRQ  * or in the handler. But the code here only handles the _second_  * instance of the irq, not the third or fourth. So it is mostly  * useful for irq hardware that does not mask cleanly in an  * SMP environment.  */  for (;;) {  irqreturn_t action_ret;  //释放自旋锁  spin_unlock(&desc->lock);  action_ret = handle_IRQ_event(irq, regs, action);  //加自旋锁  spin_lock(&desc->lock);  if (!noirqdebug)  note_interrupt(irq, desc, action_ret);  /*如果此时IRQ_PENDING处于清除状态,说明中断服务例程已经执行完毕,退出循环.反之,说明在执行中断服务例程时,  *其它CPU进入过do_IRQ,并设置了IRQ_PENDING.也就是说其它CPU收到了同类型的中断.此时,应该清除  *IRQ_INPROGRESS,并重新循环,执行中断服务例程,处理其它CPU收到的中断.  */  if (likely(!(desc->status & IRQ_PENDING)))  break;  desc->status &= ~IRQ_PENDING;  }  /*所有中断处理完毕,则清除IRQ_INPROGRESS*/  desc->status &= ~IRQ_INPROGRESS;  out:  /*  * The ->end() handler has to deal with interrupts which got  * disabled while the handler was running.  */  //结束中断处理.对end_8259A_irq()仅仅是重新激活中断线.  /*对于多处器,end应答中断(如果ack方法还没有做的话)  */  desc->handler->end(irq);  //最后,释放自旋锁,  spin_unlock(&desc->lock);  return 1;
}</span>
</pre>
<p></p>
<div id="cnblogs_post_body">3.3.4、handle_IRQ_event<span style="color:#008000"><br>
//kernel/irq/handle.c<br>
fastcall int handle_IRQ_event(unsigned int irq, struct pt_regs *regs,<br>  struct irqaction *action)<br>
{<br>  int ret, retval = 0, status = 0;<br>  //开启本地中断,对于单CPU,仅仅是sti指令<br>  if (!(action->flags & SA_INTERRUPT))<br>  local_irq_enable();<br>  //依次调用共享该中断向量的服务例程<br>  do {<br>  //调用中断服务例程<br>  ret = action->handler(irq, action->dev_id, regs);<br>  if (ret == IRQ_HANDLED)<br>  status |= action->flags;<br>  retval |= ret;<br>  action = action->next;<br>  } while (action);<br>
<br>  if (status & SA_SAMPLE_RANDOM)<br>  add_interrupt_randomness(irq);<br>  //关本地中断,对于单CPU,为cli指令<br>  local_irq_disable();<br>
<br>  return retval;<br>
}<br>
<br>
</span></div>
<span style="color:#008000"><br>
</span>
<p></p>  

理解Linux中断 (2)【转】相关推荐

  1. 理解Linux中断 (3)【转】

    转自:http://blog.csdn.net/tommy_wxie/article/details/7425712 版权声明:本文为博主原创文章,未经博主允许不得转载. 4.下半部 在中断处理过程中 ...

  2. LINUX中断学习笔记【转】

    转自:http://blog.chinaunix.net/uid-14825809-id-2381330.html 1.中断的注册与释放: 在 , 实现中断注册接口: int request_irq( ...

  3. 从需求的角度去理解Linux系列:总线、设备和驱动

    <从需求的角度去理解Linux系列:总线.设备和驱动>是一篇有关如何学习嵌入式Linux系统的方法论文章,也是从需求的角度去理解Linux系统软件的开篇.这是作者精心撰写的经验总结,希望嵌 ...

  4. 理解Linux的性能

    项目中常遇到需要对目前运行的系统进行效率分析,或碰到客户咨询如何优化系统的效率问题.更多的情况是,在系统出现问题的时候,需要分析原因,定位系统故障或瓶颈,当然,最好是可以一并解决故障.但实际上,操作系 ...

  5. arm Linux 中断管理机制

    关键词:GIC.IAR.EOI.SGI/PPI/SPI.中断映射.中断异常向量.中断上下文.内核中断线程.中断注册. 1.1 ARM支持中断类型 ARM GIC-v2支持三种类型的中断: SGI:软件 ...

  6. Linux中断与进程切换,结合中断上下文切换和进程上下文切换分析Linux内核的一般执行过程...

    @ 实验环境 OS Linux cj-virtual-machine 5.3.0-51-generic 虚拟机 QEMU 内核版本 5.3.4 调式方法 GDB PS:调试环境安装请看上一篇博客汇编级 ...

  7. linux 虚拟机大量udp请求失败_理解 Linux 网络栈:Linux 网络协议栈简单总结分析...

    1. Linux 网络路径 1.1 发送端 1.1.1 应用层 (1) Socket 应用层的各种网络应用程序基本上都是通过 Linux Socket 编程接口来和内核空间的网络协议栈通信的.Linu ...

  8. linux中断的上半部和下半部

    原文地址:linux中断的上半部和下半部 作者:td1442911376 http://blog.chinaunix.net/xmlrpc.php?r=blog/article&uid=246 ...

  9. 深入理解Linux异步I/O框架 io_uring

    . 来源:云原生实验室 hi,大家好,今天分享一篇Linux异步IO编程框架文章,对比IO复用的epoll框架,到底性能提高多少?让我们看一看. 译者序 本文组合翻译了以下两篇文章的干货部分,作为 i ...

最新文章

  1. TensorRT 3:更快的TensorFlow推理和Volta支持
  2. golang中的fallthrough
  3. 不是你无法入门自然语言处理(NLP),而是你没找到正确的打开
  4. 台式计算机m9870t,JBT9870_水力测功器最新标准规范(14页)-原创力文档
  5. 不用SE11建Structure传Internal Table到Smartforms的方法
  6. Rearrange an array of positive and negative integers
  7. python subprocess communicate_Python中的Subprocess模块
  8. 数字在排序数组中的出现次数
  9. 个人微信api接口调用,微信加好友、新增好友通知
  10. .net微信开发吐血总结
  11. 香帅的北大金融学课笔记18 -- 监管、创新、危机
  12. golang图片处理库image简介
  13. Android 8.0中各种通知写法汇总
  14. 有哪些大型网站是用 Python 开发的
  15. linux下文件的total是啥,linux中,ls -l命令显示的total的含义。
  16. mt4的服务器在哪个文件,MT4服务器地址在哪个文件
  17. 2天3夜开发了一个微信小程序,用它挣了10.7万
  18. 吹爆这个Java 结构化数据处理开源库 SPL
  19. 阿里云服务器安装tomcat
  20. 红海厮杀的超融合 泽塔云竟用GPU云开辟一片蓝海

热门文章

  1. 2010年5月八达岭野生公园 51CTO老虎围观团强力插入
  2. Appium移动自动化框架原理
  3. python怎么读xlsx_用python读取xlsx文件
  4. python实现词语填空_python简单实现新词发现
  5. java tcp client断开重连_ESP8266_12 ESP8266客户端模式下的TCP通信
  6. android连接usb外设通讯_iOS App连接外设的几种方式
  7. efcore调用函数_EFCore执行Sql语句的方法:FromSql与ExecuteSqlCommand
  8. 交换机和路由器的区别_路由器与交换机的区别?
  9. C# json解析字符串总是多出双引号_在JavaScript应用中将CSV转换为JSON
  10. python之np.var()函数解析