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


Groups > linux.kernel > #1421644

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

From Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>
Newsgroups linux.kernel
Subject Re: [PATCH] mm/zsmalloc: add trace events for zs_compact
Date 2016-06-14 10:10 +0200
Message-ID <rJRA5-28Y-3@gated-at.bofh.it> (permalink)
References (3 earlier) <rHE4h-4dP-3@gated-at.bofh.it> <rHFjI-4Tu-29@gated-at.bofh.it> <rJrYZ-1nA-1@gated-at.bofh.it> <rJss1-1NY-3@gated-at.bofh.it> <rJuNc-3cZ-39@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On (06/13/16 15:49), Ganesh Mahendran wrote:
[..]
> > 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

I'm not against the patch in general, just curious, do you have any
specific optimization in mind? if so, can we start with that optimization
then, otherwise, can we define what type of optimizations this tracing
will boost?

what I'm thinking of, we have a zsmalloc debugfs file, which provides
per-device->per-pool->per-class stats:

cat /sys/kernel/debug/zsmalloc/zram0/classes
 class  size almost_full almost_empty obj_allocated   obj_used pages_used pages_per_zspage freeable

so the 'missing' thing is just one column, right? the total freed
pages number is already accounted.

thoughts?

	-ss

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


Thread

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

csiph-web