All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Wu X.C." <bobwxc@email.cn>
To: Yanteng Si <siyanteng@loongson.cn>
Cc: Jonathan Corbet <corbet@lwn.net>, Alex Shi <alexs@kernel.org>,
	Alex Shi <alex.shi@linux.alibaba.com>,
	Huacai Chen <chenhuacai@kernel.org>,
	Jiaxun Yang <jiaxun.yang@flygoat.com>,
	Harry Wei <harryxiyou@gmail.com>,
	linux-doc@vger.kernel.org, realpuyuwang@gmail.com,
	siyanteng01@gmail.com
Subject: Re: [PATCH 02/11] docs/zh_CN: add core-api irq irq-affinity.rst translation
Date: Tue, 6 Apr 2021 23:35:05 +0800	[thread overview]
Message-ID: <20210406153505.GC15259@bobwxc.top> (raw)
In-Reply-To: <20210406130210.2725075-3-siyanteng@loongson.cn>

On Tue, Apr 06, 2021 at 09:02:01PM +0800, Yanteng Si wrote:
> This patch translates Documentation/core-api/irq/irq-affinity.rst into Chinese.
> 
> Signed-off-by: Yanteng Si <siyanteng@loongson.cn>
> ---
>  .../zh_CN/core-api/irq/irq-affinity.rst       | 73 +++++++++++++++++++
>  1 file changed, 73 insertions(+)
>  create mode 100644 Documentation/translations/zh_CN/core-api/irq/irq-affinity.rst
> 
> diff --git a/Documentation/translations/zh_CN/core-api/irq/irq-affinity.rst b/Documentation/translations/zh_CN/core-api/irq/irq-affinity.rst
> new file mode 100644
> index 000000000000..34aaf0d1ddc2
> --- /dev/null
> +++ b/Documentation/translations/zh_CN/core-api/irq/irq-affinity.rst
> @@ -0,0 +1,73 @@
> +.. include:: ../../disclaimer-zh_CN.rst
> +
> +:Original: :doc:`../../../../core-api/irq/irq-affinity`
> +:Translator: Yanteng Si <siyanteng@loongson.cn>
> +
> +.. _cn_irq-affinity.rst:
> +
> +
> +================
> +SMP IRQ 亲和性
> +================
> +
> +变更记录:
> +	- 作者:最初由Ingo Molnar <mingo@redhat.com>开始撰写
> +	- 后期更新维护: Max Krasnyansky <maxk@qualcomm.com>
> +
> +
> +/proc/irq/IRQ#/smp_affinity和/proc/irq/IRQ#/smp_affinity_list指明了给定IRQ源
> +允许哪些目标CPU使用。它是被允许的CPU的位掩码(smp_affinity)或cpu列表(smp_affinity_list)。
> +它不允许关闭所有的CPU,如果一个IRQ控制器不支持IRQ亲和性,那么所有cpu的默认值将不会发生

关闭 -> 禁止?

> +变化。
> +
> +/proc/irq/default_smp_affinity指明了适用于所有非激活IRQ的默认亲和性掩码。一旦IRQ被
> +分配/激活,它的亲和位掩码将被设置为默认掩码。然后可以如上所述改变它。默认掩码是0xffffffffff。

0xffffffff
eight f

> +
> +下面是一个先将IRQ44(eth1)限制在CPU0-3上,然后限制在CPU4-7上的例子(这是一个8CPU的SMP box)
a empty line
> +::
> +
> +	[root@moon 44]# cd /proc/irq/44
> +	[root@moon 44]# cat smp_affinity
> +	ffffffff
> +
> +	[root@moon 44]# echo 0f > smp_affinity
> +	[root@moon 44]# cat smp_affinity
> +	0000000f
> +	[root@moon 44]# ping -f h
> +	PING hell (195.4.7.3): 56 data bytes
> +	...
> +	--- hell ping statistics ---
> +	6029 packets transmitted, 6027 packets received, 0% packet loss
> +	round-trip min/avg/max = 0.1/0.1/0.4 ms
> +	[root@moon 44]# cat /proc/interrupts | grep 'CPU\|44:'
> +		CPU0       CPU1       CPU2       CPU3      CPU4       CPU5        CPU6       CPU7
> +	44:       1068       1785       1785       1783         0          0           0         0    IO-APIC-level  eth1
> +
> +从上面一行可以看出,IRQ44只传递给前四个处理器(0-3)。
> +现在让我们把这个IRQ限制在CPU(4-7)。
> +
> +::
> +
> +	[root@moon 44]# echo f0 > smp_affinity
> +	[root@moon 44]# cat smp_affinity
> +	000000f0
> +	[root@moon 44]# ping -f h
> +	PING hell (195.4.7.3): 56 data bytes
> +	..
> +	--- hell ping statistics ---
> +	2779 packets transmitted, 2777 packets received, 0% packet loss
> +	round-trip min/avg/max = 0.1/0.5/585.4 ms
> +	[root@moon 44]# cat /proc/interrupts |  'CPU\|44:'
> +		CPU0       CPU1       CPU2       CPU3      CPU4       CPU5        CPU6       CPU7
> +	44:       1068       1785       1785       1783      1784       1069        1070       1069   IO-APIC-level  eth1
> +
> +这次IRQ44只传递给最后四个处理器。
> +即CPU0-3的计数器没有变化。
> +
> +下面是一个将相同的irq(44)限制在cpus 1024到1031的例子:。
                                                       ^^^
                                             : ->     ::

> +
> +	[root@moon 44]# echo 1024-1031 > smp_affinity_list
> +	[root@moon 44]# cat smp_affinity_list
> +	1024-1031
> +
> +需要注意的是,如果要用位掩码来做这件事,就需要32个为0的位掩码来追踪其相关的一个。
> -- 
> 2.27.0


  reply	other threads:[~2021-04-06 15:36 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-06 13:01 [PATCH 00/11] docs/zh_CN: add core api and openrisc translation Yanteng Si
2021-04-06 13:02 ` [PATCH 01/11] docs/zh_CN: add core-api irq concepts.rst translation Yanteng Si
2021-04-06 15:12   ` Wu X.C.
2021-04-07  1:20     ` yanteng si
2021-04-06 13:02 ` [PATCH 02/11] docs/zh_CN: add core-api irq irq-affinity.rst translation Yanteng Si
2021-04-06 15:35   ` Wu X.C. [this message]
2021-04-07  2:08     ` yanteng si
2021-04-07  4:59       ` Wu X.C.
2021-04-07  6:59         ` yanteng si
2021-04-07  7:04           ` Wu X.C.
2021-04-06 13:02 ` [PATCH 03/11] docs/zh_CN: add core-api/irq/irq-domain.rst translation Yanteng Si
2021-04-07  7:01   ` Wu X.C.
2021-04-07  7:36     ` yanteng si
2021-04-06 13:02 ` [PATCH 04/11] docs/zh_CN: add core-api irq irqflags-tracing.rst translation Yanteng Si
2021-04-06 16:13   ` Wu X.C.
2021-04-07  3:03     ` yanteng si
2021-04-07  5:08       ` Wu X.C.
2021-04-07  7:13         ` yanteng si
2021-04-06 13:02 ` [PATCH 05/11] docs/zh_CN: add core-api irq index.rst translation Yanteng Si
2021-04-06 15:21   ` Wu X.C.
2021-04-06 13:02 ` [PATCH 06/11] docs/zh_CN: add core-api/index.rst translation Yanteng Si
2021-04-06 16:39   ` Wu X.C.
2021-04-07  3:30     ` yanteng si
2021-04-07  5:13       ` Wu X.C.
2021-04-06 13:02 ` [PATCH 07/11] docs/zh_CN: add translation to zh_CN index Yanteng Si
2021-04-06 16:40   ` Wu X.C.
2021-04-06 13:02 ` [PATCH 08/11] docs/zh_CN: add openrisc openrisc_port.rst translation Yanteng Si
2021-04-07  7:01   ` Wu X.C.
2021-04-07  7:45     ` yanteng si
2021-04-06 13:02 ` [PATCH 09/11] docs/zh_CN: add openrisc/todo.rst translation Yanteng Si
2021-04-06 16:50   ` Wu X.C.
2021-04-07  6:30     ` yanteng si
2021-04-06 13:02 ` [PATCH 10/11] docs/zh_CN: add openrisc/index.rst translation Yanteng Si
2021-04-06 16:56   ` Wu X.C.

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=20210406153505.GC15259@bobwxc.top \
    --to=bobwxc@email.cn \
    --cc=alex.shi@linux.alibaba.com \
    --cc=alexs@kernel.org \
    --cc=chenhuacai@kernel.org \
    --cc=corbet@lwn.net \
    --cc=harryxiyou@gmail.com \
    --cc=jiaxun.yang@flygoat.com \
    --cc=linux-doc@vger.kernel.org \
    --cc=realpuyuwang@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.