All of lore.kernel.org
 help / color / mirror / Atom feed
From: Minchan Kim <minchan@kernel.org>
To: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	sergey.senozhatsky.work@gmail.com
Subject: Re: [PATCH v5 5/7] zsmalloc/zram: store compaction stats in zspool
Date: Mon, 6 Jul 2015 23:01:52 +0900	[thread overview]
Message-ID: <20150706140152.GD16529@blaptop> (raw)
In-Reply-To: <20150706135646.GD663@swordfish>

On Mon, Jul 06, 2015 at 10:56:46PM +0900, Sergey Senozhatsky wrote:
> On (07/06/15 22:27), Minchan Kim wrote:
> > > `zs_compact_control' accounts the number of migrated objects but
> > > it has a limited lifespan -- we lose it as soon as zs_compaction()
> > > returns back to zram. It was fine, because (a) zram had it's own
> > > counter of migrated objects and (b) only zram could trigger
> > > compaction. However, this does not work for automatic pool
> > > compaction (not issued by zram). To account objects migrated
> > > during auto-compaction (issued by the shrinker) we need to store
> > > this number in zs_pool.
> > > 
> > > A new zsmalloc zs_get_num_migrated() symbol exports zs_pool's
> > > ->num_migrated counter, so we better start using it, rather than
> > > continue keeping zram's own `num_migrated' copy in zram_stats.
> > 
> > If we introduce like this API we should make new another API when
> > we want to introduce new stats. So I don't think it's a good idea.
> > How about this?
> > 
> >         void zsmalloc_stats(struct zsmalloc_stats *stats);
> > 
> > So, we could return any upcoming stats without new API introduce.
> > 
> 
> Hm, agree. Do you prefer me to fold this into this patch set or to do as
> a separate work later?

Let's fold it so your next patch can use it for getting num_compacted.

> 
> 
> P.S.
> 
> Sorry. Seems that my git send-email has some problems, so group-reply
> in mutt does not work as expected.
> 
> 
> 	-ss

-- 
Kind regards,
Minchan Kim

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

WARNING: multiple messages have this Message-ID (diff)
From: Minchan Kim <minchan@kernel.org>
To: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	sergey.senozhatsky.work@gmail.com
Subject: Re: [PATCH v5 5/7] zsmalloc/zram: store compaction stats in zspool
Date: Mon, 6 Jul 2015 23:01:52 +0900	[thread overview]
Message-ID: <20150706140152.GD16529@blaptop> (raw)
In-Reply-To: <20150706135646.GD663@swordfish>

On Mon, Jul 06, 2015 at 10:56:46PM +0900, Sergey Senozhatsky wrote:
> On (07/06/15 22:27), Minchan Kim wrote:
> > > `zs_compact_control' accounts the number of migrated objects but
> > > it has a limited lifespan -- we lose it as soon as zs_compaction()
> > > returns back to zram. It was fine, because (a) zram had it's own
> > > counter of migrated objects and (b) only zram could trigger
> > > compaction. However, this does not work for automatic pool
> > > compaction (not issued by zram). To account objects migrated
> > > during auto-compaction (issued by the shrinker) we need to store
> > > this number in zs_pool.
> > > 
> > > A new zsmalloc zs_get_num_migrated() symbol exports zs_pool's
> > > ->num_migrated counter, so we better start using it, rather than
> > > continue keeping zram's own `num_migrated' copy in zram_stats.
> > 
> > If we introduce like this API we should make new another API when
> > we want to introduce new stats. So I don't think it's a good idea.
> > How about this?
> > 
> >         void zsmalloc_stats(struct zsmalloc_stats *stats);
> > 
> > So, we could return any upcoming stats without new API introduce.
> > 
> 
> Hm, agree. Do you prefer me to fold this into this patch set or to do as
> a separate work later?

Let's fold it so your next patch can use it for getting num_compacted.

> 
> 
> P.S.
> 
> Sorry. Seems that my git send-email has some problems, so group-reply
> in mutt does not work as expected.
> 
> 
> 	-ss

-- 
Kind regards,
Minchan Kim

  reply	other threads:[~2015-07-06 14:01 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-06 12:17 [PATCH v5 0/7] mm/zsmalloc: introduce automatic pool compaction Sergey Senozhatsky
2015-07-06 12:17 ` [PATCH v5 1/7] zsmalloc: drop unused variable `nr_to_migrate' Sergey Senozhatsky
2015-07-06 12:17 ` [PATCH v5 2/7] zsmalloc: always keep per-class stats Sergey Senozhatsky
2015-07-06 12:17 ` [PATCH v5 3/7] zsmalloc: introduce zs_can_compact() function Sergey Senozhatsky
2015-07-06 12:17 ` [PATCH v5 4/7] zsmalloc: cosmetic compaction code adjustments Sergey Senozhatsky
2015-07-06 12:17 ` [PATCH v5 5/7] zsmalloc/zram: store compaction stats in zspool Sergey Senozhatsky
     [not found]   ` <20150706132728.GB16529@blaptop>
2015-07-06 13:56     ` Sergey Senozhatsky
2015-07-06 13:56       ` Sergey Senozhatsky
2015-07-06 14:01       ` Minchan Kim [this message]
2015-07-06 14:01         ` Minchan Kim
2015-07-06 12:17 ` [PATCH v5 6/7] zsmalloc: account the number of compacted pages Sergey Senozhatsky
2015-07-06 13:22   ` Minchan Kim
2015-07-06 13:22     ` Minchan Kim
2015-07-06 13:48     ` Sergey Senozhatsky
2015-07-06 13:48       ` Sergey Senozhatsky
2015-07-06 14:00       ` Minchan Kim
2015-07-06 14:00         ` Minchan Kim
2015-07-06 12:17 ` [PATCH v5 7/7] zsmalloc: register a shrinker to trigger auto-compaction 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=20150706140152.GD16529@blaptop \
    --to=minchan@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=sergey.senozhatsky.work@gmail.com \
    --cc=sergey.senozhatsky@gmail.com \
    /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.