Documentation/translations/zh_CN/infiniband/core_locking.rst
Source file repositories/reference/linux-study-clean/Documentation/translations/zh_CN/infiniband/core_locking.rst
File Facts
- System
- Linux kernel
- Corpus path
Documentation/translations/zh_CN/infiniband/core_locking.rst- Extension
.rst- Size
- 4005 bytes
- Lines
- 116
- Domain
- Support Tooling And Documentation
- Bucket
- Documentation
- Inferred role
- Support Tooling And Documentation: documentation
- Status
- atlas-only
Why This File Exists
Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.
- Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.
Dependency Surface
- No C-style include directives detected by the generator.
Detected Declarations
- No top-level syscall, struct, function, initcall, or export declaration detected by the generator.
Annotated Snippet
.. include:: ../disclaimer-zh_CN.rst
:Original: Documentation/infiniband/core_locking.rst
:翻译:
司延腾 Yanteng Si <siyanteng@loongson.cn>
:校译:
王普宇 Puyu Wang <realpuyuwang@gmail.com>
时奎亮 Alex Shi <alexs@kernel.org>
.. _cn_infiniband_core_locking:
==================
infiniband中间层锁
==================
本指南试图明确infiniband中间层的锁假设。它描述了对位于中间层以下的低
级驱动程序和使用中间层的上层协议的要求。
睡眠和中断环境
==============
除了以下异常情况,ib_device结构体中所有方法的低级驱动实现都可以睡眠。
这些异常情况是列表中的任意的方法:
- create_ah
- modify_ah
- query_ah
- destroy_ah
- post_send
- post_recv
- poll_cq
- req_notify_cq
他们可能不可以睡眠,而且必须可以从任何上下文中调用。
向上层协议使用者输出的相应函数:
- rdma_create_ah
- rdma_modify_ah
- rdma_query_ah
- rdma_destroy_ah
- ib_post_send
- ib_post_recv
- ib_req_notify_cq
因此,在任何情况下都可以安全调用(它们)。
此外,该函数
- ib_dispatch_event
被底层驱动用来通过中间层调度异步事件的“A”,也可以从任何上下文中安全调
用。
可重入性
--------
由低级驱动程序导出的ib_device结构体中的所有方法必须是完全可重入的。
即使使用同一对象的多个函数调用被同时运行,低级驱动程序也需要执行所有
必要的同步以保持一致性。
IB中间层不执行任何函数调用的序列化。
因为低级驱动程序是可重入的,所以不要求上层协议使用者任何顺序执行。然
而,为了得到合理的结果,可能需要一些顺序。例如,一个使用者可以在多个
CPU上同时安全地调用ib_poll_cq()。然而,不同的ib_poll_cq()调用之间
Annotation
- Atlas domain: Support Tooling And Documentation / Documentation.
- Implementation status: atlas-only.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.