All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] blktrace: support saving and parsing cgroup info
@ 2018-01-09  6:56 Hou Tao
  2018-01-31  7:43 ` Hou Tao
  0 siblings, 1 reply; 2+ messages in thread
From: Hou Tao @ 2018-01-09  6:56 UTC (permalink / raw)
  To: linux-btrace

Hi Jens,

The patchset is a userspace counterpart of patchset [1] committed
recently by Shaohua Li. It adds support for saving and parsing io
cgroup info in blktrace and blkparse utilities, so the following
command can be used to output blk trace with cgroup info:

	# blktrace -g -d /dev/sda -o - | blkparse -g -i -

	253,0    6        1     0.000000000  1565  A   R 3353712 + 8 <- (253,1) 3351664
	253,0    5        1     0.000001944  1564  A   R 1585104 + 8 <- (253,1) 1583056
	253,0    3        1     0.000004072  1563  A   R 65448 + 8 <- (253,1) 63400
	253,0    6        2     0.000010653 / 1565  Q   R 3353712 + 8 [fio]
	253,0    5        2     0.000012018 /mk/t2 1564  Q   R 1585104 + 8 [fio]
	253,0    3        2     0.000013575 /t1 1563  Q   R 65448 + 8 [fio]
	253,0    6        3     0.000018975 / 1565  G   R 3353712 + 8 [fio]
	253,0    5        3     0.000019629 /mk/t2 1564  G   R 1585104 + 8 [fio]
	253,0    3        3     0.000020689 /t1 1563  G   R 65448 + 8 [fio]
	......

I have three concerns on the implementation. The first is about the
output format for the cgroup path. Now blkparse just outputs the
cgroup path before the pid, but i'm not sure whether or not it's proper.
The second one is about caching the translations from kernfs (inod, gen)
(namely cgroup info) to cgroup path. Now there is no such cache, and i
will add one if needed. The last one is about the enabling of blk_cgroup
option in blktrace. Now blktrace enables it by writing text directly into
trace files, maybe a per-device API will be better ?

Thoughts and reviews are welcome.

Regards,

Tao

[1]: https://www.spinics.net/lists/linux-block/msg15289.html
---

Hou Tao (3):
  blktrace: support trace with cgroup info
  blkparse: add option g/group to output cgroup info
  blktrace: add option g/group to save cgroup info

 blkparse.c     | 152 +++++++++++++++++++++++++++++++++++++++++++++++++--------
 blkparse_fmt.c |  32 ++++++++++--
 blktrace.c     | 144 +++++++++++++++++++++++++++++++++++++++++++++++++++++-
 blktrace.h     |   7 +++
 blktrace_api.h |  10 ++++
 doc/blkparse.1 |   9 +++-
 doc/blktrace.8 |   9 +++-
 7 files changed, 336 insertions(+), 27 deletions(-)

-- 
2.9.5


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH 0/3] blktrace: support saving and parsing cgroup info
  2018-01-09  6:56 [PATCH 0/3] blktrace: support saving and parsing cgroup info Hou Tao
@ 2018-01-31  7:43 ` Hou Tao
  0 siblings, 0 replies; 2+ messages in thread
From: Hou Tao @ 2018-01-31  7:43 UTC (permalink / raw)
  To: linux-btrace

Hi Jens,

Any comments on the patch set ?

Regards,
Tao

On 2018/1/9 14:56, Hou Tao wrote:
> Hi Jens,
> 
> The patchset is a userspace counterpart of patchset [1] committed
> recently by Shaohua Li. It adds support for saving and parsing io
> cgroup info in blktrace and blkparse utilities, so the following
> command can be used to output blk trace with cgroup info:
> 
> 	# blktrace -g -d /dev/sda -o - | blkparse -g -i -
> 
> 	253,0    6        1     0.000000000  1565  A   R 3353712 + 8 <- (253,1) 3351664
> 	253,0    5        1     0.000001944  1564  A   R 1585104 + 8 <- (253,1) 1583056
> 	253,0    3        1     0.000004072  1563  A   R 65448 + 8 <- (253,1) 63400
> 	253,0    6        2     0.000010653 / 1565  Q   R 3353712 + 8 [fio]
> 	253,0    5        2     0.000012018 /mk/t2 1564  Q   R 1585104 + 8 [fio]
> 	253,0    3        2     0.000013575 /t1 1563  Q   R 65448 + 8 [fio]
> 	253,0    6        3     0.000018975 / 1565  G   R 3353712 + 8 [fio]
> 	253,0    5        3     0.000019629 /mk/t2 1564  G   R 1585104 + 8 [fio]
> 	253,0    3        3     0.000020689 /t1 1563  G   R 65448 + 8 [fio]
> 	......
> 
> I have three concerns on the implementation. The first is about the
> output format for the cgroup path. Now blkparse just outputs the
> cgroup path before the pid, but i'm not sure whether or not it's proper.
> The second one is about caching the translations from kernfs (inod, gen)
> (namely cgroup info) to cgroup path. Now there is no such cache, and i
> will add one if needed. The last one is about the enabling of blk_cgroup
> option in blktrace. Now blktrace enables it by writing text directly into
> trace files, maybe a per-device API will be better ?
> 
> Thoughts and reviews are welcome.
> 
> Regards,
> 
> Tao
> 
> [1]: https://www.spinics.net/lists/linux-block/msg15289.html
> ---
> 
> Hou Tao (3):
>   blktrace: support trace with cgroup info
>   blkparse: add option g/group to output cgroup info
>   blktrace: add option g/group to save cgroup info
> 
>  blkparse.c     | 152 +++++++++++++++++++++++++++++++++++++++++++++++++--------
>  blkparse_fmt.c |  32 ++++++++++--
>  blktrace.c     | 144 +++++++++++++++++++++++++++++++++++++++++++++++++++++-
>  blktrace.h     |   7 +++
>  blktrace_api.h |  10 ++++
>  doc/blkparse.1 |   9 +++-
>  doc/blktrace.8 |   9 +++-
>  7 files changed, 336 insertions(+), 27 deletions(-)
> 


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-01-31  7:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-09  6:56 [PATCH 0/3] blktrace: support saving and parsing cgroup info Hou Tao
2018-01-31  7:43 ` Hou Tao

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.