免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
12下一页
最近访问板块 发新帖
查看: 3440 | 回复: 10

machine check [复制链接]

论坛徽章:
0
发表于 2010-06-14 11:49 |显示全部楼层
两个不同的外部设备同一时间对同一片内存进入DMA操作会不会导致kernel machine check.

论坛徽章:
0
发表于 2010-06-14 23:20 |显示全部楼层
Sorry. I cannot type Chinese on this machine.

In theory, that situation (two devices write to the same memory at the same time) will never happen. For example, PCI bus supports bus mater mode, which is capable to DMA. In that mode, the bus is locked for that device only. So other device cannot do DMA at the same time.

PCI express is a little bit different. But I think the PCIE standard or the MCH (NORTH BRIDGE) will take care of it.

论坛徽章:
0
发表于 2010-06-15 10:50 |显示全部楼层
谢谢你的回复。
我们用的是PCIE bus.
我们经过测试发现,两个设备同一时间DMA读同一片内存时发生machine check.
难道不允许这样?

论坛徽章:
0
发表于 2010-06-15 11:04 |显示全部楼层
谢谢你的回复。
我们用的是PCIE bus.
我们经过测试发现,两个设备同一时间DMA读同一片内存时发生machine  ...
hb12112 发表于 2010-06-15 10:50



    应该是有限制吧.

论坛徽章:
0
发表于 2010-06-15 14:06 |显示全部楼层
写是为了保证数据一致性的话,读为什么要限制呢?是内核里限制还是由硬件保证?

论坛徽章:
0
发表于 2010-06-15 23:24 |显示全部楼层
It looks like a hardware mechanism. See following links:

http://en.wikipedia.org/wiki/Machine_Check_Exception
http://en.wikipedia.org/wiki/Machine_check_architecture

You can also try some tools to get the details about the machine check.

论坛徽章:
0
发表于 2010-06-16 09:00 |显示全部楼层
谢谢你的回复。
我们用的是PCIE bus.
我们经过测试发现,两个设备同一时间DMA读同一片内存时发生machine  ...
hb12112 发表于 2010-06-15 10:50



    两个设备同时DMA同一片内存当然是bug.

    有点好奇,你的两个设备是在不同的root complex下吗?

    另外你的机器enable IOMMU了吗?

论坛徽章:
0
发表于 2010-06-17 13:59 |显示全部楼层
由什么来保证两个设备不在同一时间DMA?
两个设备同时DMA读同一片内存有什么问题?
iommu是关闭的.

论坛徽章:
0
发表于 2010-06-17 23:36 |显示全部楼层
Good question.

I guess the PCIE bridge or NB (MCH) is in charge of controlling DMA. But I don't know why two DMA reads from two device cannot happen at the same time.

For PCI bus, it seems reasonable, because it is parallel bus and when one device control the bus, other device cannot have the same degree of control.
But PCI Express is serial bus so it may allow two device to do DMA read at the same time in theory?

论坛徽章:
2
2015年辞旧岁徽章
日期:2015-03-03 16:54:152015年迎新春徽章
日期:2015-03-04 09:53:17
发表于 2010-06-18 17:35 |显示全部楼层
>I guess the PCIE bridge or NB (

bridge 应该是root complex
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP