All of lore.kernel.org
 help / color / mirror / Atom feed
From: Puyu Wang <realpuyuwang@gmail.com>
To: Yanteng Si <siyanteng@loongson.cn>
Cc: Jonathan Corbet <corbet@lwn.net>, Alex Shi <alexs@kernel.org>,
	"Wu X.C." <bobwxc@email.cn>, Alex Shi <seakeel@gmail.com>,
	Huacai Chen <chenhuacai@kernel.org>,
	Jiaxun Yang <jiaxun.yang@flygoat.com>,
	linux-doc@vger.kernel.org, chenweiguang82@126.com,
	Yanteng Si <siyanteng01@gmail.com>
Subject: Re: [PATCH v2 8/8] docs/zh_CN: add infiniband user_verbs translation
Date: Fri, 6 Aug 2021 02:29:00 +0000	[thread overview]
Message-ID: <CADQR0QgROPTwPMsGcYv9S3hCPD5V7Ym-jZE_SW7gcVSn8bbNjg@mail.gmail.com> (raw)
In-Reply-To: <b25147d5c53daf4d4faaa0a33c068dbd6013459a.1627820210.git.siyanteng@loongson.cn>

On Sun, Aug 1, 2021 at 12:25 PM Yanteng Si <siyanteng@loongson.cn> wrote:
>
> Translate Documentation/infiniband/user_verbs.rst into Chinese.
>
> Signed-off-by: Yanteng Si <siyanteng@loongson.cn>
Reviewed-by: Puyu Wang <realpuyuwang@gmail.com>
> ---
>  .../translations/zh_CN/infiniband/index.rst   |  3 +-
>  .../zh_CN/infiniband/user_verbs.rst           | 72 +++++++++++++++++++
>  2 files changed, 73 insertions(+), 2 deletions(-)
>  create mode 100644 Documentation/translations/zh_CN/infiniband/user_verbs.rst
>
> diff --git a/Documentation/translations/zh_CN/infiniband/index.rst b/Documentation/translations/zh_CN/infiniband/index.rst
> index 55645171a675..5634cc48379f 100644
> --- a/Documentation/translations/zh_CN/infiniband/index.rst
> +++ b/Documentation/translations/zh_CN/infiniband/index.rst
> @@ -28,10 +28,9 @@ infiniband
>     sysfs
>     tag_matching
>     user_mad
> +   user_verbs
>
> -TODOLIST:
>
> -   user_verbs
>
>  .. only::  subproject and html
>
> diff --git a/Documentation/translations/zh_CN/infiniband/user_verbs.rst b/Documentation/translations/zh_CN/infiniband/user_verbs.rst
> new file mode 100644
> index 000000000000..ba5db85ae722
> --- /dev/null
> +++ b/Documentation/translations/zh_CN/infiniband/user_verbs.rst
> @@ -0,0 +1,72 @@
> +.. include:: ../disclaimer-zh_CN.rst
> +
> +:Original: Documentation/infiniband/user_verbs.rst
> +
> +:翻译:
> +
> + 司延腾 Yanteng Si <siyanteng@loongson.cn>
> +
> +:校译:
> +
> + 王普宇 Puyu Wang <realpuyuwang@gmail.com>
> + 时奎亮 Alex Shi <alexs@kernel.org>
> +
> +.. _cn_infiniband_user_verbs:
> +
> +=================
> +用户空间verbs访问
> +=================
> +
> +  ib_uverbs模块,通过启用CONFIG_INFINIBAND_USER_VERBS构建,使用户空间
> +  通过“verbs”直接访问IB硬件,如InfiniBand架构规范第11章所述。
> +
> +  要使用verbs,需要libibverbs库,可从https://github.com/linux-rdma/rdma-core。
> +  libibverbs包含一个独立于设备的API,用于使用ib_uverbs接口。libibverbs
> +  还需要为你的InfiniBand硬件提供适当的独立于设备的内核和用户空间驱动。例如,
> +  要使用Mellanox HCA,你需要安装ib_mthca内核模块和libmthca用户空间驱动。
> +
> +用户-内核通信
> +=============
> +
> +  用户空间通过/dev/infiniband/uverbsN字符设备与内核进行慢速路径、资源管理
> +  操作的通信。快速路径操作通常是通过直接写入硬件寄存器mmap()到用户空间来完成
> +  的,没有系统调用或上下文切换到内核。
> +
> +  命令是通过在这些设备文件上的write()s发送给内核的。ABI在
> +  drivers/infiniband/include/ib_user_verbs.h中定义。需要内核响应的命令的结
> +  构包含一个64位字段,用来传递一个指向输出缓冲区的指针。状态作为write()系统调
> +  用的返回值被返回到用户空间。
> +
> +资源管理
> +========
> +
> +  由于所有IB资源的创建和销毁都是通过文件描述符传递的命令完成的,所以内核可以跟
> +  踪哪些资源被附加到一个给定的用户空间上下文。ib_uverbs模块维护着idr表,用来在
I think it should be '跟踪那些被附加到给定用户空间上下文的资源', instead of
‘跟踪哪些资源被附加到一个给定的用户空间上下文’.
> +  内核指针和不透明的用户空间句柄之间进行转换,这样内核指针就不会暴露给用户空间,
> +  而用户空间也无法欺骗内核去跟踪一个假的指针。
> +
> +  这也允许内核在一个进程退出时进行清理,并防止一个进程触及另一个进程的资源。
> +
> +内存引脚
> +========
> +
> +  直接的用户空间I/O要求与作为潜在I/O目标的内存区域保持在同一物理地址上。ib_uverbs
> +  模块通过get_user_pages()和put_page()调用来管理内存区域的固定和解除固定。它还核
> +  算进程的pinned_vm中被固定的内存量,并检查非特权进程是否超过其RLIMIT_MEMLOCK限制。
> +
> +  被多次固定的页面在每次被固定时都会被计数,所以pinned_vm的值可能会高估一个进程所
> +  固定的页面数量。
> +
> +/dev文件
> +========
> +
> +  要想用udev自动创建适当的字符设备文件,可以采用如下规则::
> +
> +    KERNEL=="uverbs*", NAME="infiniband/%k"
> +
> +  可以使用。 这将创建设备节点,名为::
> +
> +    /dev/infiniband/uverbs0
> +
> +  等等。由于InfiniBand的用户空间verbs对于非特权进程来说应该是安全的,因此在udev规
> +  则中加入适当的MODE或GROUP可能是有用的。
> --
> 2.27.0
>

  parent reply	other threads:[~2021-08-06  2:29 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-01 12:25 [PATCH v2 0/8] docs/zh_CN: add infiniband translation Yanteng Si
2021-08-01 12:25 ` [PATCH v2 1/8] docs/zh_CN: add infiniband index translation Yanteng Si
2021-08-04  2:26   ` Alex Shi
2021-08-06  2:06     ` Puyu Wang
2021-08-01 12:25 ` [PATCH v2 2/8] docs/zh_CN: add infiniband core_locking translation Yanteng Si
2021-08-04  2:27   ` Alex Shi
2021-08-06  2:12   ` Puyu Wang
2021-08-01 12:25 ` [PATCH v2 3/8] docs/zh_CN: add infiniband ipoib translation Yanteng Si
2021-08-04  2:27   ` Alex Shi
2021-08-06  2:14   ` Puyu Wang
2021-08-01 12:25 ` [PATCH v2 4/8] docs/zh_CN: add infiniband opa_vnic translation Yanteng Si
2021-08-04  2:28   ` Alex Shi
2021-08-06  2:14   ` Puyu Wang
2021-08-01 12:25 ` [PATCH v2 5/8] docs/zh_CN: add infiniband sysfs translation Yanteng Si
2021-08-04  2:29   ` Alex Shi
2021-08-06  2:15   ` Puyu Wang
2021-08-01 12:25 ` [PATCH v2 6/8] docs/zh_CN: add infiniband tag_matching translation Yanteng Si
2021-08-04  2:30   ` Alex Shi
2021-08-06  2:17   ` Puyu Wang
2021-08-01 12:25 ` [PATCH v2 7/8] docs/zh_CN: add infiniband user_mad translation Yanteng Si
2021-08-04  2:30   ` Alex Shi
2021-08-06  2:18   ` Puyu Wang
2021-08-01 12:25 ` [PATCH v2 8/8] docs/zh_CN: add infiniband user_verbs translation Yanteng Si
2021-08-04  2:35   ` Alex Shi
2021-08-04  6:38     ` yanteng si
2021-08-06  2:29   ` Puyu Wang [this message]
2021-08-06  2:45     ` yanteng si

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CADQR0QgROPTwPMsGcYv9S3hCPD5V7Ym-jZE_SW7gcVSn8bbNjg@mail.gmail.com \
    --to=realpuyuwang@gmail.com \
    --cc=alexs@kernel.org \
    --cc=bobwxc@email.cn \
    --cc=chenhuacai@kernel.org \
    --cc=chenweiguang82@126.com \
    --cc=corbet@lwn.net \
    --cc=jiaxun.yang@flygoat.com \
    --cc=linux-doc@vger.kernel.org \
    --cc=seakeel@gmail.com \
    --cc=siyanteng01@gmail.com \
    --cc=siyanteng@loongson.cn \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.