From: Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>
To: Minchan Kim <minchan@kernel.org>
Cc: Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>,
akpm@linux-foundation.org, ddstreet@ieee.org, gunho.lee@lge.com,
iamjoonsoo.kim@lge.com, jmarchan@redhat.com, juno.choi@lge.com,
mel@csn.ul.ie, ngupta@vflare.org, semenzato@google.com,
sergey.senozhatsky@gmail.com, sjennings@variantweb.net,
mm-commits@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: + zram-support-compaction.patch added to -mm tree
Date: Mon, 9 Mar 2015 10:27:28 +0900 [thread overview]
Message-ID: <20150309012728.GB794@swordfish> (raw)
In-Reply-To: <20150309010522.GD15184@blaptop>
On (03/09/15 10:05), Minchan Kim wrote:
> > well, to be fair, compaction is a zsmalloc internal. zram has nothing to do with
> > it.
> >
> > but do we we even need this stat? it seems that
> >
> > mem_total_used (before compaction) - mem_total_user (after comapction)
> >
> > will give user an idea on how much memory was compacted.
>
> It's not enough. What I want to know is compaction efficiency per client of
> zsmalloc(ie, zram).
>
so what a typical user can do with this information? isn't it an entirely
debug info that makes some hidden sense only to developers?
if you insist on exporting this as a zram stat for everyone how obout
starting to move away from per-stat RO sysfs attrs. it seems that we have
uncomfortably a lot of sysfs attrs, and that doesn't make life easier in
user space. for example, block devices have /sys/block/.../stat file:
/sys/block/sda$ cat stat
45931 59 2075686 289906 55768 9229 1967800 318033 0 193583 607806
and there are no num_reads, num_writes, num_failed_reads, num_failed_writes,
etc., etc. per-stat sysfs attrs force user-space to do lots of syscalls:
open(), read(), close() with error control on every step; for every stat.
so how about introducing zram<id>/malloc_stats (or any similar name) and
provide compaction and all future allocator related stats there
(via s*printf("%d %d %d", ....)) ?
-ss
> IOW, (how many of freed pages / how many of objects) per
> zs_compact.
>
> >
> > -ss
> >
> > > That's why it is on debugfs. If we add the stat into zsmalloc, we should turn on debugfs
> > > and CONFIG_ZSMALLOC_STAT to see *a* stat. Even, CONFIG_ZSMALLOC_STAT will add
> > > unncessary overheads to account another stats fo zsmalloc internals.
> > >
> > > As well, if we add auto-compacion like stuff in zsmalloc(ie, it will trigger
> > > by itself if fragmention is over to predefined theshold), the stat will
> > > accumulate stat while someone want to see snapshot compaction effiecieny
> > > of the moment.
> > >
> > > So, I want to keep it in zram now.
> > >
> > > --
> > > Kind regards,
> > > Minchan Kim
> > >
>
> --
> Kind regards,
> Minchan Kim
>
next prev parent reply other threads:[~2015-03-09 1:27 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-04 22:02 + zram-support-compaction.patch added to -mm tree akpm
2015-03-05 0:18 ` Sergey Senozhatsky
2015-03-05 0:30 ` Minchan Kim
2015-03-05 5:29 ` Sergey Senozhatsky
2015-03-05 11:43 ` Sergey Senozhatsky
2015-03-09 0:49 ` Minchan Kim
2015-03-09 0:57 ` Sergey Senozhatsky
2015-03-09 1:05 ` Minchan Kim
2015-03-09 1:27 ` Sergey Senozhatsky [this message]
2015-03-09 1:47 ` Minchan Kim
2015-03-09 2:07 ` Sergey Senozhatsky
2015-03-09 2:21 ` Minchan Kim
2015-03-09 6:48 ` Sergey Senozhatsky
2015-03-09 14:56 ` Minchan Kim
2015-03-10 5:37 ` Sergey Senozhatsky
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150309012728.GB794@swordfish \
--to=sergey.senozhatsky.work@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=ddstreet@ieee.org \
--cc=gunho.lee@lge.com \
--cc=iamjoonsoo.kim@lge.com \
--cc=jmarchan@redhat.com \
--cc=juno.choi@lge.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mel@csn.ul.ie \
--cc=minchan@kernel.org \
--cc=mm-commits@vger.kernel.org \
--cc=ngupta@vflare.org \
--cc=semenzato@google.com \
--cc=sergey.senozhatsky@gmail.com \
--cc=sjennings@variantweb.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.