处理一个低版本内核中断向量表不够问题:__assign_irq_vector 关联irq 和 vector失败问题; (bug还没解决先记录一下吧)

  同时先学习一下MSI-X:MSI, message signal interrupt, 是PCI设备通过写一个特定消息到特定地址,从而触发一个CPU中断。

什么是MSI-X中断?

MSI, message signal interrupt, 是PCI设备通过写一个特定消息到特定地址,从而触发一个CPU中断。特定消息指的是PCIe总线中的Memory Write TLP, 特定地址一般存放在MSI capability中。

MSI-x是MSI的扩展和增强。MSI有它自身的局限性,MSI最多支持32个中断,且要求中断向量连续, 而MSI-x没有这个限制,且支持的中断数量更多。此外,MSI-X的中断向量信息并不直接存储在capability中,而是在一块特殊Memory中.

 Pin-based PCI interrupts are often shared amongst several devices. To support this, the kernel must call each interrupt handler associated with an interrupt, which leads to reduced performance for the system as a whole. MSIs are never shared, so this problem cannot arise.

  When a device writes data to memory, then raises a pin-based interrupt, it is possible that the interrupt may arrive before all the data has arrived in memory (this becomes more likely with devices behind PCI-PCI bridges). In order to ensure that all the data has arrived in memory, the interrupt handler must read a register on the device which raised the interrupt. PCI transaction ordering rules require that all the data arrive in memory before the value may be returned from the register. Using MSIs avoids this problem as the interrupt-generating write cannot pass the data writes, so by the time the interrupt is raised, the driver knows that all the data has arrived in memory.

  PCI devices can only support a single pin-based interrupt per function. Often drivers have to query the device to find out what event has occurred, slowing down interrupt handling for the common case. With MSIs, a device can support more interrupts, allowing each interrupt to be specialised to a different purpose. One possible design gives infrequent conditions (such as errors) their own interrupt which allows the driver to handle the normal interrupt handling path more efficiently. Other possible designs include giving one interrupt to each packet queue in a network card or each port in a storage controller 

也就是说和传统的INTx中断相比,MSI中断有以下几个优点:
(1) 基于引脚的传统中断会被多个设备所共享,中断共享时,如果触发了中断,linux需要一一调用对应的中断处理函数,这样会有性能上的损失,而MSI不存在共享的问题。
(2) 设备向内存写入数据,然后发起引脚中断, 有可能会出现CPU收到中断时,数据还没有达到内存。 而使用MSI中断时,产生中断的写不能越过数据的写,驱动可以确信所有的数据已经达到内存。
(3) 多功能的PCI设备,每一个功能最多只有一个中断引脚,当具体的事件产生时,驱动需要查询设备才能知道是哪一个事件产生,这样会降低中断的处理速度。而一个设备可以支持32个MSI中断,每个中断可以对应特定的功能。

  • PCIe设备在提交MSI中断请求时,都是向MSI/MSI-X Capability结构中的Message Address的地址写Message Data数据,从而组成一个存储器写TLP,向处理器提交中断请求

参考:https://www.kernel.org/doc/html/latest/PCI/index.html

Why use MSIX message signal interrupt的更多相关文章

  1. 转载 大话pcie

    原文https://blog.csdn.net/abcamus/article/details/76167747 一.PCIe DMA机制 PCIe控制器也提供DMA(Direct Memory ac ...

  2. 第1章 PCI总线的基本知识

    PCI总线作为处理器系统的局部总线,主要目的是为了连接外部设备,而不是作为处理器的系统总线连接Cache和主存储器.但是PCI总线.系统总线和处理器体系结构之间依然存在着紧密的联系. PCI总线作为系 ...

  3. 001 PCI Express体系结构(一)

    一 .PCI总线的基本知识 PCI总线作为处理器系统的局部总线,主要目的是为了连接外部设备,而不是作为处理器的系统总线连接Cache和主存储器.但是PCI总线.系统总线和处理器体系结构之间依然存在着紧 ...

  4. Golang -- Signal处理

    我们在生产环境下运行的系统要求优雅退出,即程序接收退出通知后,会有机会先执行一段清理代码,将收尾工作做完后再真正退出.我们采用系统Signal来 通知系统退出,即kill pragram-pid.我们 ...

  5. PatentTips - Interrupt redirection for virtual partitioning

    BACKGROUND The present disclosure relates to the handling of interrupts in a environment that utiliz ...

  6. Ubuntu14.04+RabbitMQ3.6.3+Golang的最佳实践

    目录 [TOC] 1.RabbitMQ介绍 1.1.什么是RabbitMQ?   RabbitMQ 是由 LShift 提供的一个 Advanced Message Queuing Protocol ...

  7. linux 保留内核中sas驱动的加载导致crash问题

    [root@localhost ~]# uname -a Linux localhost.localdomain -.el7.x86_64 问题描述,在crash的时候,小内核因为分配中断号失败而触发 ...

  8. 6.2 PowerPC处理器如何处理MSI中断请求

    PowerPC处理器使用OpenPIC中断控制器或者MPIC中断控制器,处理外部中断请求.其中MPIC中断控制器基于OpenPIC中断控制器,但是作出了许多增强,目前Freescale新推出的Powe ...

  9. VNF网络性能提升解决方案及实践

    VNF网络性能提升解决方案及实践 2016年7月 作者:    王智民 贡献者:     创建时间:    2016-7-20 稳定程度:    初稿 修改历史 版本 日期 修订人 说明 1.0 20 ...

随机推荐

  1. X86保护机制

    目录 保护机制的开启与关闭 描述符表限长检查 段限长检查 段类型检查 类型信息的存储 类型检查 空选择子的检查 特权级检查 访问数据段时的特权级检查 访问代码段中的数据 堆栈寄存器SS的特权级检查 在 ...

  2. 多测师讲解接口测试_F12中network里headers各项属性的含义——高级讲师肖sir

    General部分: Request URL:资源的请求url # Request Method:HTTP方法  Status Code:响应状态码  200(状态码) OK 301 - 资源(网页等 ...

  3. K8S节点异常怎么办?TKE"节点健康检查和自愈"来帮忙

    节点健康检测 意义 在K8S集群运行的过程中,节点常常会因为运行时组件的问题.内核死锁.资源不足等各种各样的原因不可用.Kubelet默认对节点的PIDPressure.MemoryPressure. ...

  4. win10+ubuntu18.04lts双系统安装葵花宝典(解疑篇)

    本文将对win10+ubuntu18.04lts双系统安装过程中的一些操作的目的和可能遇到的问题进行解释. 文章目录 如何正确分区 创建双系统后直接进入了windows怎么办 修改ubuntu开机界面 ...

  5. Python入门基础教程-准备工作

    作为一名Python的忠实爱好者,在Python的学习过程中趟过了很多坑.不论是在基础语法.爬虫.可视化的学习,亦或是在数据挖掘的项目开展中,整个过程有痛苦也有收获,有捶胸顿足也有仰天长笑.所以在以后 ...

  6. maven 获取pom.xml的依赖---即仓库搜索服务

    常用仓库地址: http://repository.sonatype.org/    (https://repository.sonatype.org/)如下图: http://www.mvnrepo ...

  7. 使用AudioRecord录音

    虽然不知道头文件是咋回事,但是还是得到了一个MP3文件,音质也很清晰.AudioRecord是先把录制的声音保存为字节流文件,可以边保存边读取,头文件是把保存的字节流文件解析为音频格式. public ...

  8. java如何实现一个Future

    实现Futrue接口 public class MsgFuture<V> implements java.util.concurrent.Future<V> { ... ... ...

  9. 创建本地yum源

    1. 环境准备 在准备搭建yum源的服务器上安装createrepo,打开防火墙的80端口或者关闭防火墙. 注:createrepo命令只要不是最小化安装,都是支持的.如果是最小化安装,下载下图下载r ...

  10. Java基础循环结构

    int x=10; do { System.out.println("value of x:"+x); x++; } while(x<20); //do while循环 1 ...