[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CADAEsF8icKGBcCV83BxSc2-pmK46rsZc1wgB8=Y=3m5CnN6K3A@mail.gmail.com>
Date: Mon, 13 Jun 2016 15:49:36 +0800
From: Ganesh Mahendran <opensource.ganesh@...il.com>
To: Sergey Senozhatsky <sergey.senozhatsky.work@...il.com>
Cc: Minchan Kim <minchan@...nel.org>, Linux-MM <linux-mm@...ck.org>,
linux-kernel <linux-kernel@...r.kernel.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Nitin Gupta <ngupta@...are.org>, rostedt@...dmis.org,
mingo@...hat.com
Subject: Re: [PATCH] mm/zsmalloc: add trace events for zs_compact
2016-06-13 13:12 GMT+08:00 Sergey Senozhatsky
<sergey.senozhatsky.work@...il.com>:
> Hello,
>
> On (06/13/16 13:42), Minchan Kim wrote:
> [..]
>> > 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.
>
> just my 5 cents:
>
> some parts (of the info above) are already available: zram<ID> maps to
> pool<ID> name, which maps to a sysfs file name, that can contain the rest.
> I'm just trying to understand what kind of optimizations we are talking
> about here and how would timings help... compaction can spin on class
> lock, for example, if the device in question is busy, etc. etc. on the
> other hand we have a per-class info in zsmalloc pool stats output, so
> why not extend it instead of introducing a new debugging interface?
I've considered adding new interface in /sys/../zsmalloc/ or uasing
trace_mm_shrink_slab_[start/end] to get such information.
But none of them can cover all the cases:
1) distinguish which zs pool is compacted.
2) freed pages of zs_compact(), total freed pages of zs_compact()
3) realtime log printed
Actually, the trace event added in zs_compact not only just for
debugging/optimization inside zsmalloc, but also for system level.
We can do some analysis by combining data from zs_compac(), system
information(like free mem, swap info, LMK, etc)
Thanks.
>
> -ss
Powered by blists - more mailing lists