mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Tao Zou <wodemia@linux.alibaba.com>
To: Dongliang Mu <mudongliangabcd@gmail.com>
Cc: Alex Shi <alexs@kernel.org>, Yanteng Si <siyanteng@loongson.cn>,
	Jonathan Corbet <corbet@lwn.net>,
	linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v4 RESEND] zh_CN/admin-guide: Add zh_CN/admin-guide/numastat.rst translation document
Date: Fri, 28 Jun 2024 10:44:26 +0800	[thread overview]
Message-ID: <E11ABAEC-42CF-4190-824D-C2143F8C7C7F@linux.alibaba.com> (raw)
In-Reply-To: <CAD-N9QWO2Km2mV0LJntF+RLQYXVfu3mQZ-zcywqhdtYH70yV7g@mail.gmail.com>

2024年6月28日 10:29,Dongliang Mu <mudongliangabcd@gmail.com> 写道:
> 
> On Fri, Jun 28, 2024 at 9:36 AM Tao Zou <wodemia@linux.alibaba.com> wrote:
>> 
>> Add translation zh_CN/admin-guide/numastat.rst and link it to
>> zh_CN/admin-guide/index.rst while clean its todo entry.
>> 
>> commit 77691ee92d4a ("Documentation: update numastat explanation")
>> 
>> Signed-off-by: Tao Zou <wodemia@linux.alibaba.com>
>> Reviewed-by: Yanteng Si <siyanteng@loongson.cn>
>> Reviewed-by: Alex Shi <alexs@kernel.org>
>> ---
>> .../translations/zh_CN/admin-guide/index.rst  |  2 +-
>> .../zh_CN/admin-guide/numastat.rst            | 48 +++++++++++++++++++
>> 2 files changed, 49 insertions(+), 1 deletion(-)
>> create mode 100644 Documentation/translations/zh_CN/admin-guide/numastat.rst
>> 
>> diff --git a/Documentation/translations/zh_CN/admin-guide/index.rst b/Documentation/translations/zh_CN/admin-guide/index.rst
>> index ac2960da33e6..0db80ab830a0 100644
>> --- a/Documentation/translations/zh_CN/admin-guide/index.rst
>> +++ b/Documentation/translations/zh_CN/admin-guide/index.rst
>> @@ -68,6 +68,7 @@ Todolist:
>>    cpu-load
>>    cputopology
>>    lockup-watchdogs
>> +   numastat
>>    unicode
>>    sysrq
>>    mm/index
>> @@ -109,7 +110,6 @@ Todolist:
>> *   module-signing
>> *   mono
>> *   namespaces/index
>> -*   numastat
>> *   parport
>> *   perf-security
>> *   pm/index
>> diff --git a/Documentation/translations/zh_CN/admin-guide/numastat.rst b/Documentation/translations/zh_CN/admin-guide/numastat.rst
>> new file mode 100644
>> index 000000000000..c0f54d9a6b05
>> --- /dev/null
>> +++ b/Documentation/translations/zh_CN/admin-guide/numastat.rst
>> @@ -0,0 +1,48 @@
>> +.. SPDX-License-Identifier: GPL-2.0
>> +.. include:: ../disclaimer-zh_CN.rst
>> +
>> +:Original: Documentation/admin-guide/numastat.rst
>> +:Translator: Tao Zou <wodemia@linux.alibaba.com>
>> +
>> +
>> +=======================
>> +Numa策略命中/未命中统计
>> +=======================
>> +
>> +/sys/devices/system/node/node*/numastat
>> +
>> +所有数据的单位都是页面。巨页有独立的计数器。
>> +
>> +numa_hit、numa_miss和numa_foreign计数器反应了进程是否能够在他们偏好的节点上分配内存。
>> +如果进程成功在偏好的节点上分配内存则在偏好的节点上增加numa_hit计数,否则在偏好的节点上增
>> +加numa_foreign计数同时在实际内存分配的节点上增加numa_miss计数。
> 
> 反应 -> 反映
> 
> This should be a typo.
Thanks for your suggestion,it will be fixed.
> 
>> +
>> +通常,偏好的节点是进程运行所在的CPU的本地节点,但是一些限制可以改变这一行为,比如内存策略,
>> +因此同样有两个基于CPU本地节点的计数器。local_node和numa_hit类似,当在CPU所在的节点上分
>> +配内存时增加local_node计数,other_node和numa_miss类似,当在CPU所在节点之外的其他节点
>> +上成功分配内存时增加other_node计数。需要注意,没有和numa_foreign对应的计数器。
>> +
>> +更多细节内容:
>> +
>> +=============== ============================================================
>> +numa_hit        一个进程想要从本节点分配内存并且成功。
>> +
>> +numa_miss       一个进程想要从其他节点分配内存但是最终在本节点完成内存分配。
>> +
>> +numa_foreign    一个进程想要在本节点分配内存但是最终在其他节点完成内存分配。
>> +
>> +local_node      一个进程运行在本节点的CPU上并且从本节点上获得了内存。
>> +
>> +other_node      一个进程运行在其他节点的CPU上但是在本节点上获得了内存。
>> +
>> +interleave_hit  内存交叉分配策略下想要从本节点分配内存并且成功。
>> +=============== ============================================================
>> +
>> +你可以使用numactl软件包(http://oss.sgi.com/projects/libnuma/)中的numastat工具
>> +来辅助阅读。需要注意,numastat工具目前只在有少量CPU的机器上运行良好。
>> +
>> +需要注意,在包含无内存节点(一个节点有CPUs但是没有内存)的系统中numa_hit、numa_miss和
>> +numa_foreign统计数据会被严重曲解。在当前的内核实现中,如果一个进程偏好一个无内存节点(即
>> +进程正在该节点的一个本地CPU上运行),实际上会从距离最近的有内存节点中挑选一个作为偏好节点。
>> +结果会导致相应的内存分配不会增加无内存节点上的numa_foreign计数器,并且会扭曲最近节点上的
>> +numa_hit、numa_miss和numa_foreign统计数据。
>> --
>> 2.39.3 (Apple Git-146)
>> 
>> 


      reply	other threads:[~2024-06-28  2:44 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-28  1:36 Tao Zou
2024-06-28  2:29 ` Dongliang Mu
2024-06-28  2:44   ` Tao Zou [this message]

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=E11ABAEC-42CF-4190-824D-C2143F8C7C7F@linux.alibaba.com \
    --to=wodemia@linux.alibaba.com \
    --cc=alexs@kernel.org \
    --cc=corbet@lwn.net \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mudongliangabcd@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®