2022-01-12 16:05:04

by Yong Wang

[permalink] [raw]
Subject: [PATCH] docs/zh_CN: Update zh_CN/accounting/delay-accounting.rst

From: wangyong <[email protected]>

Update zh_CN/accounting/delay-accounting.rst.
The document modification has been merged which refers to the following link:
https://lore.kernel.org/all/[email protected]/

Signed-off-by: wangyong <[email protected]>
Reviewed-by: Yang Yang <[email protected]>
---
.../zh_CN/accounting/delay-accounting.rst | 62 +++++++++++-----------
1 file changed, 30 insertions(+), 32 deletions(-)

diff --git a/Documentation/translations/zh_CN/accounting/delay-accounting.rst b/Documentation/translations/zh_CN/accounting/delay-accounting.rst
index 67d5606..f184941 100644
--- a/Documentation/translations/zh_CN/accounting/delay-accounting.rst
+++ b/Documentation/translations/zh_CN/accounting/delay-accounting.rst
@@ -17,6 +17,8 @@ a) 等待一个CPU(任务为可运行)
b) 完成由该任务发起的块I/O同步请求
c) 页面交换
d) 内存回收
+e) 页缓存抖动
+f) 直接规整

并将这些统计信息通过taskstats接口提供给用户空间。

@@ -37,10 +39,10 @@ d) 内存回收
向用户态返回一个通用数据结构,对应每pid或每tgid的统计信息。延时计数功能填写
该数据结构的特定字段。见

- include/linux/taskstats.h
+ include/uapi/linux/taskstats.h

其描述了延时计数相关字段。系统通常以计数器形式返回 CPU、同步块 I/O、交换、内存
-回收等的累积延时。
+回收、页缓存抖动、直接规整等的累积延时。

取任务某计数器两个连续读数的差值,将得到任务在该时间间隔内等待对应资源的总延时。

@@ -72,40 +74,36 @@ kernel.task_delayacct进行开关。注意,只有在启用延时计数后启

getdelays命令的一般格式::

- getdelays [-t tgid] [-p pid] [-c cmd...]
+ getdelays [-dilv] [-t tgid] [-p pid]

获取pid为10的任务从系统启动后的延时信息::

- # ./getdelays -p 10
+ # ./getdelays -d -p 10
(输出信息和下例相似)

获取所有tgid为5的任务从系统启动后的总延时信息::

- # ./getdelays -t 5
-
-
- CPU count real total virtual total delay total
- 7876 92005750 100000000 24001500
- IO count delay total
- 0 0
- SWAP count delay total
- 0 0
- RECLAIM count delay total
- 0 0
-
-获取指定简单命令运行时的延时信息::
-
- # ./getdelays -c ls /
-
- bin data1 data3 data5 dev home media opt root srv sys usr
- boot data2 data4 data6 etc lib mnt proc sbin subdomain tmp var
-
-
- CPU count real total virtual total delay total
- 6 4000250 4000000 0
- IO count delay total
- 0 0
- SWAP count delay total
- 0 0
- RECLAIM count delay total
- 0 0
+ # ./getdelays -d -t 5
+ print delayacct stats ON
+ TGID 5
+
+
+ CPU count real total virtual total delay total delay average
+ 8 7000000 6872122 3382277 0.423ms
+ IO count delay total delay average
+ 0 0 0ms
+ SWAP count delay total delay average
+ 0 0 0ms
+ RECLAIM count delay total delay average
+ 0 0 0ms
+ THRASHING count delay total delay average
+ 0 0 0ms
+ COMPACT count delay total delay average
+ 0 0 0ms
+
+获取pid为1的IO计数,它只和-p一起使用::
+ # ./getdelays -i -p 1
+ printing IO accounting
+ linuxrc: read=65536, write=0, cancelled_write=0
+
+上面的命令与-v一起使用,可以获取更多调试信息。
--
2.7.4



2022-01-13 02:11:26

by teng sterling

[permalink] [raw]
Subject: Re: [PATCH] docs/zh_CN: Update zh_CN/accounting/delay-accounting.rst

Hi Yong,
<[email protected]> 于2022年1月13日周四 07:27写道:
>
> From: wangyong <[email protected]>
>
> Update zh_CN/accounting/delay-accounting.rst.
> The document modification has been merged which refers to the following link:
> https://lore.kernel.org/all/[email protected]/
The normal way to handle this is to add an appropriate Fixes tag.

By the way, this patch should be submitted together as part of that
patch series where you modified the original documentation. Also check
out the documentation for other languages and send it in the same way.
If you get stuck, simply --CC the maintainer is an elegant way to
handle it. >_<


>
> Signed-off-by: wangyong <[email protected]>
> Reviewed-by: Yang Yang <[email protected]>
This looks like the first version of the patch and doesn't seem to
have been reviewed by anyone yet, so you can't sign it instead of
someone else.

Thanks,
Yanteng
> ---
> .../zh_CN/accounting/delay-accounting.rst | 62 +++++++++++-----------
> 1 file changed, 30 insertions(+), 32 deletions(-)
>
> diff --git a/Documentation/translations/zh_CN/accounting/delay-accounting.rst b/Documentation/translations/zh_CN/accounting/delay-accounting.rst
> index 67d5606..f184941 100644
> --- a/Documentation/translations/zh_CN/accounting/delay-accounting.rst
> +++ b/Documentation/translations/zh_CN/accounting/delay-accounting.rst
> @@ -17,6 +17,8 @@ a) 等待一个CPU(任务为可运行)
> b) 完成由该任务发起的块I/O同步请求
> c) 页面交换
> d) 内存回收
> +e) 页缓存抖动
> +f) 直接规整
>
> 并将这些统计信息通过taskstats接口提供给用户空间。
>
> @@ -37,10 +39,10 @@ d) 内存回收
> 向用户态返回一个通用数据结构,对应每pid或每tgid的统计信息。延时计数功能填写
> 该数据结构的特定字段。见
>
> - include/linux/taskstats.h
> + include/uapi/linux/taskstats.h
>
> 其描述了延时计数相关字段。系统通常以计数器形式返回 CPU、同步块 I/O、交换、内存
> -回收等的累积延时。
> +回收、页缓存抖动、直接规整等的累积延时。
>
> 取任务某计数器两个连续读数的差值,将得到任务在该时间间隔内等待对应资源的总延时。
>
> @@ -72,40 +74,36 @@ kernel.task_delayacct进行开关。注意,只有在启用延时计数后启
>
> getdelays命令的一般格式::
>
> - getdelays [-t tgid] [-p pid] [-c cmd...]
> + getdelays [-dilv] [-t tgid] [-p pid]
>
> 获取pid为10的任务从系统启动后的延时信息::
>
> - # ./getdelays -p 10
> + # ./getdelays -d -p 10
> (输出信息和下例相似)
>
> 获取所有tgid为5的任务从系统启动后的总延时信息::
>
> - # ./getdelays -t 5
> -
> -
> - CPU count real total virtual total delay total
> - 7876 92005750 100000000 24001500
> - IO count delay total
> - 0 0
> - SWAP count delay total
> - 0 0
> - RECLAIM count delay total
> - 0 0
> -
> -获取指定简单命令运行时的延时信息::
> -
> - # ./getdelays -c ls /
> -
> - bin data1 data3 data5 dev home media opt root srv sys usr
> - boot data2 data4 data6 etc lib mnt proc sbin subdomain tmp var
> -
> -
> - CPU count real total virtual total delay total
> - 6 4000250 4000000 0
> - IO count delay total
> - 0 0
> - SWAP count delay total
> - 0 0
> - RECLAIM count delay total
> - 0 0
> + # ./getdelays -d -t 5
> + print delayacct stats ON
> + TGID 5
> +
> +
> + CPU count real total virtual total delay total delay average
> + 8 7000000 6872122 3382277 0.423ms
> + IO count delay total delay average
> + 0 0 0ms
> + SWAP count delay total delay average
> + 0 0 0ms
> + RECLAIM count delay total delay average
> + 0 0 0ms
> + THRASHING count delay total delay average
> + 0 0 0ms
> + COMPACT count delay total delay average
> + 0 0 0ms
> +
> +获取pid为1的IO计数,它只和-p一起使用::
> + # ./getdelays -i -p 1
> + printing IO accounting
> + linuxrc: read=65536, write=0, cancelled_write=0
> +
> +上面的命令与-v一起使用,可以获取更多调试信息。
> --
> 2.7.4
>

2022-01-13 14:56:24

by Yong Wang

[permalink] [raw]
Subject: Re: [PATCH] docs/zh_CN: Update zh_CN/accounting/delay-accounting.rst

Hello,
teng sterling <[email protected]> 于2022年1月13日周四 10:11写道:
>
> Hi Yong,
> <[email protected]> 于2022年1月13日周四 07:27写道:
> >
> > From: wangyong <[email protected]>
> >
> > Update zh_CN/accounting/delay-accounting.rst.
> > The document modification has been merged which refers to the following link:
> > https://lore.kernel.org/all/[email protected]/
> The normal way to handle this is to add an appropriate Fixes tag.
>
> By the way, this patch should be submitted together as part of that
> patch series where you modified the original documentation. Also check
> out the documentation for other languages and send it in the same way.
> If you get stuck, simply --CC the maintainer is an elegant way to
> handle it. >_<
The previous patch has been merged into linux-next. There was no
Chinese translation when I submitted it.
At present, this document is only translated into Chinese, which was
translated not long ago.
So I update it in this patch.
>
> >
> > Signed-off-by: wangyong <[email protected]>
> > Reviewed-by: Yang Yang <[email protected]>
> This looks like the first version of the patch and doesn't seem to
> have been reviewed by anyone yet, so you can't sign it instead of
> someone else.
Yang Yang reviewed it offline.
>
> Thanks,
> Yanteng
Thanks for your reply.

2022-01-20 09:10:40

by Yong Wang

[permalink] [raw]
Subject: Re: [PATCH] docs/zh_CN: Update zh_CN/accounting/delay-accounting.rst

Hello,
Is this patch OK?

yong w <[email protected]> 于2022年1月13日周四 22:56写道:
>
> Hello,
> teng sterling <[email protected]> 于2022年1月13日周四 10:11写道:
> >
> > Hi Yong,
> > <[email protected]> 于2022年1月13日周四 07:27写道:
> > >
> > > From: wangyong <[email protected]>
> > >
> > > Update zh_CN/accounting/delay-accounting.rst.
> > > The document modification has been merged which refers to the following link:
> > > https://lore.kernel.org/all/[email protected]/
> > The normal way to handle this is to add an appropriate Fixes tag.
> >
> > By the way, this patch should be submitted together as part of that
> > patch series where you modified the original documentation. Also check
> > out the documentation for other languages and send it in the same way.
> > If you get stuck, simply --CC the maintainer is an elegant way to
> > handle it. >_<
> The previous patch has been merged into linux-next. There was no
> Chinese translation when I submitted it.
> At present, this document is only translated into Chinese, which was
> translated not long ago.
> So I update it in this patch.
> >
> > >
> > > Signed-off-by: wangyong <[email protected]>
> > > Reviewed-by: Yang Yang <[email protected]>
> > This looks like the first version of the patch and doesn't seem to
> > have been reviewed by anyone yet, so you can't sign it instead of
> > someone else.
> Yang Yang reviewed it offline.
> >
> > Thanks,
> > Yanteng
> Thanks for your reply.

2022-01-21 14:50:12

by teng sterling

[permalink] [raw]
Subject: Re: [PATCH] docs/zh_CN: Update zh_CN/accounting/delay-accounting.rst

yong w <[email protected]> 于2022年1月18日周二 20:38写道:
>
> Hello,
> Is this patch OK?
>
> yong w <[email protected]> 于2022年1月13日周四 22:56写道:
> >
> > Hello,
> > teng sterling <[email protected]> 于2022年1月13日周四 10:11写道:
> > >
> > > Hi Yong,
> > > <[email protected]> 于2022年1月13日周四 07:27写道:
> > > >
> > > > From: wangyong <[email protected]>
> > > >
> > > > Update zh_CN/accounting/delay-accounting.rst.
> > > > The document modification has been merged which refers to the following link:
> > > > https://lore.kernel.org/all/[email protected]/
> > > The normal way to handle this is to add an appropriate Fixes tag.
Since 4d3959d65968(Documentation/accounting/delay-accounting.rst: add
thrashing page cache and direct compact) Modified the original
document,
It seems we forgot to update the Chinese documentation, let's update it now.
> > >
> > > By the way, this patch should be submitted together as part of that
> > > patch series where you modified the original documentation. Also check
> > > out the documentation for other languages and send it in the same way.
> > > If you get stuck, simply --CC the maintainer is an elegant way to
> > > handle it. >_<
> > The previous patch has been merged into linux-next. There was no
> > Chinese translation when I submitted it.
> > At present, this document is only translated into Chinese, which was
> > translated not long ago.
> > So I update it in this patch.
> > >
> > > >
> > > > Signed-off-by: wangyong <[email protected]>
> > > > Reviewed-by: Yang Yang <[email protected]>
> > > This looks like the first version of the patch and doesn't seem to
> > > have been reviewed by anyone yet, so you can't sign it instead of
> > > someone else.
> > Yang Yang reviewed it offline.
I'm not sure if this is appropriate, but lore is missing the review
process and the mailing list developers don't know what's going on,
which in a way makes it more difficult for future developers to learn.

Apart from the above,LGTM.

Thanks,
Yanteng
> > >
> > > Thanks,
> > > Yanteng
> > Thanks for your reply.

2022-01-21 15:14:07

by Alex Shi

[permalink] [raw]
Subject: Re: [PATCH] docs/zh_CN: Update zh_CN/accounting/delay-accounting.rst

On Wed, Jan 19, 2022 at 11:28 AM teng sterling <[email protected]> wrote:
>
> yong w <[email protected]> 于2022年1月18日周二 20:38写道:
> >
> > Hello,
> > Is this patch OK?
> >
> > yong w <[email protected]> 于2022年1月13日周四 22:56写道:
> > >
> > > Hello,
> > > teng sterling <[email protected]> 于2022年1月13日周四 10:11写道:
> > > >
> > > > Hi Yong,
> > > > <[email protected]> 于2022年1月13日周四 07:27写道:
> > > > >
> > > > > From: wangyong <[email protected]>
> > > > >
> > > > > Update zh_CN/accounting/delay-accounting.rst.
> > > > > The document modification has been merged which refers to the following link:
> > > > > https://lore.kernel.org/all/[email protected]/
> > > > The normal way to handle this is to add an appropriate Fixes tag.
> Since 4d3959d65968(Documentation/accounting/delay-accounting.rst: add
> thrashing page cache and direct compact) Modified the original
> document,
> It seems we forgot to update the Chinese documentation, let's update it now.
> > > >
> > > > By the way, this patch should be submitted together as part of that
> > > > patch series where you modified the original documentation. Also check
> > > > out the documentation for other languages and send it in the same way.
> > > > If you get stuck, simply --CC the maintainer is an elegant way to
> > > > handle it. >_<
> > > The previous patch has been merged into linux-next. There was no
> > > Chinese translation when I submitted it.
> > > At present, this document is only translated into Chinese, which was
> > > translated not long ago.
> > > So I update it in this patch.
> > > >
> > > > >
> > > > > Signed-off-by: wangyong <[email protected]>
> > > > > Reviewed-by: Yang Yang <[email protected]>
> > > > This looks like the first version of the patch and doesn't seem to
> > > > have been reviewed by anyone yet, so you can't sign it instead of
> > > > someone else.
> > > Yang Yang reviewed it offline.
> I'm not sure if this is appropriate, but lore is missing the review
> process and the mailing list developers don't know what's going on,
> which in a way makes it more difficult for future developers to learn.

Right. The better way is asking Yang Yang to give a reviewed-by in
mailing list next time. Otherwise, the private tag can't give a good
support.


for this patch. Reviewed-by: Alex Shi <[email protected]>

>
> Apart from the above,LGTM.
>
> Thanks,
> Yanteng
> > > >
> > > > Thanks,
> > > > Yanteng
> > > Thanks for your reply.

2022-01-28 15:36:41

by Jonathan Corbet

[permalink] [raw]
Subject: Re: [PATCH] docs/zh_CN: Update zh_CN/accounting/delay-accounting.rst

Alex Shi <[email protected]> writes:

> Right. The better way is asking Yang Yang to give a reviewed-by in
> mailing list next time. Otherwise, the private tag can't give a good
> support.

Agreed with that.

> for this patch. Reviewed-by: Alex Shi <[email protected]>

Another nice rule of thumb: put Reviewed-by on its own line so that b4
picks it up :)

Patch applied, thanks.

jon

2022-02-08 06:22:39

by Alex Shi

[permalink] [raw]
Subject: Re: [PATCH] docs/zh_CN: Update zh_CN/accounting/delay-accounting.rst

On Fri, Jan 28, 2022 at 2:38 AM Jonathan Corbet <[email protected]> wrote:
>
> Alex Shi <[email protected]> writes:
>
> > Right. The better way is asking Yang Yang to give a reviewed-by in
> > mailing list next time. Otherwise, the private tag can't give a good
> > support.
>
> Agreed with that.
>
> > for this patch. Reviewed-by: Alex Shi <[email protected]>
>
> Another nice rule of thumb: put Reviewed-by on its own line so that b4
> picks it up :)

Right!
Thanks for reminding me!

>
> Patch applied, thanks.
>
> jon