Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1420443

Re: [PATCH] mm/zsmalloc: add trace events for zs_compact

From Minchan Kim <minchan@kernel.org>
Newsgroups linux.kernel
Subject Re: [PATCH] mm/zsmalloc: add trace events for zs_compact
Date 2016-06-13 06:50 +0200
Message-ID <rJrYZ-1nA-1@gated-at.bofh.it> (permalink)
References <rHl1D-tV-7@gated-at.bofh.it> <rHznX-1aY-21@gated-at.bofh.it> <rHAN4-1YC-19@gated-at.bofh.it> <rHE4h-4dP-3@gated-at.bofh.it> <rHFjI-4Tu-29@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Wed, Jun 08, 2016 at 02:39:19PM +0800, Ganesh Mahendran wrote:

<snip>

> zsmalloc is not only used by zram, but also zswap. Maybe
> others in the future.
> 
> I tried to use function_graph. It seems there are too much log
> printed:
> ------
> root@leo-test:/sys/kernel/debug/tracing# cat trace
> # tracer: function_graph
> #
> # CPU  DURATION                  FUNCTION CALLS
> # |     |   |                     |   |   |   |
>  2)               |  zs_compact [zsmalloc]() {
>  2)               |  /* zsmalloc_compact_start: pool zram0 */
>  2)   0.889 us    |    _raw_spin_lock();
>  2)   0.896 us    |    isolate_zspage [zsmalloc]();
>  2)   0.938 us    |    _raw_spin_lock();
>  2)   0.875 us    |    isolate_zspage [zsmalloc]();
>  2)   0.942 us    |    _raw_spin_lock();
>  2)   0.962 us    |    isolate_zspage [zsmalloc]();
> ...
>  2)   0.879 us    |      insert_zspage [zsmalloc]();
>  2)   4.520 us    |    }
>  2)   0.975 us    |    _raw_spin_lock();
>  2)   0.890 us    |    isolate_zspage [zsmalloc]();
>  2)   0.882 us    |    _raw_spin_lock();
>  2)   0.894 us    |    isolate_zspage [zsmalloc]();
>  2)               |  /* zsmalloc_compact_end: pool zram0: 0 pages
> compacted(total 0) */
>  2) # 1351.241 us |  }
> ------
> => 1351.241 us used
> 
> And it seems the overhead of function_graph is bigger than trace event.
> 
> bash-3682  [002] ....  1439.180646: zsmalloc_compact_start: pool zram0
> bash-3682  [002] ....  1439.180659: zsmalloc_compact_end: pool zram0:
> 0 pages compacted(total 0)
> => 13 us > 1351.241 us

You could use set_ftrace_filter to cut out.

To introduce new event trace to get a elasped time, it's pointless,
I think.

It should have more like pool name you mentioned.
Like saying other thread, It would be better to show
[pool name, compact size_class,
the number of object moved, the number of freed page], IMO.

Thanks.

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH] mm/zsmalloc: add trace events for zs_compact Ganesh Mahendran <opensource.ganesh@gmail.com> - 2016-06-07 11:00 +0200
  Re: [PATCH] mm/zsmalloc: add trace events for zs_compact Minchan Kim <minchan@kernel.org> - 2016-06-08 02:20 +0200
    Re: [PATCH] mm/zsmalloc: add trace events for zs_compact Ganesh Mahendran <opensource.ganesh@gmail.com> - 2016-06-08 03:50 +0200
      Re: [PATCH] mm/zsmalloc: add trace events for zs_compact Minchan Kim <minchan@kernel.org> - 2016-06-08 07:20 +0200
        Re: [PATCH] mm/zsmalloc: add trace events for zs_compact Ganesh Mahendran <opensource.ganesh@gmail.com> - 2016-06-08 08:40 +0200
          Re: [PATCH] mm/zsmalloc: add trace events for zs_compact Sergey Senozhatsky <sergey.senozhatsky@gmail.com> - 2016-06-08 16:20 +0200
            Re: [PATCH] mm/zsmalloc: add trace events for zs_compact Ganesh Mahendran <opensource.ganesh@gmail.com> - 2016-06-13 04:00 +0200
          Re: [PATCH] mm/zsmalloc: add trace events for zs_compact Minchan Kim <minchan@kernel.org> - 2016-06-13 06:50 +0200
            Re: [PATCH] mm/zsmalloc: add trace events for zs_compact Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2016-06-13 07:20 +0200
              Re: [PATCH] mm/zsmalloc: add trace events for zs_compact Ganesh Mahendran <opensource.ganesh@gmail.com> - 2016-06-13 09:50 +0200
                Re: [PATCH] mm/zsmalloc: add trace events for zs_compact Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2016-06-14 10:10 +0200
            Re: [PATCH] mm/zsmalloc: add trace events for zs_compact Ganesh Mahendran <opensource.ganesh@gmail.com> - 2016-06-13 07:20 +0200
  Re: [PATCH] mm/zsmalloc: add trace events for zs_compact Minchan Kim <minchan@kernel.org> - 2016-06-13 05:50 +0200

csiph-web