All of lore.kernel.org
 help / color / mirror / Atom feed
From: Minchan Kim <minchan@kernel.org>
To: Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>
Cc: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Joonsoo Kim <js1304@gmail.com>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [RFC][PATCH v2 3/3] mm/zsmalloc: increase ZS_MAX_PAGES_PER_ZSPAGE
Date: Mon, 22 Feb 2016 11:34:32 +0900	[thread overview]
Message-ID: <20160222023432.GC27829@bbox> (raw)
In-Reply-To: <20160222020113.GB488@swordfish>

On Mon, Feb 22, 2016 at 11:01:13AM +0900, Sergey Senozhatsky wrote:
> On (02/22/16 10:34), Minchan Kim wrote:
> [..]
> > > > I tempted it several times with same reason you pointed out.
> > > > But my worry was that if we increase ZS_MAX_ZSPAGE_ORDER, zram can
> > > > consume more memory because we need several pages chain to populate
> > > > just a object. Even, at that time, we didn't have compaction scheme
> > > > so fragmentation of object in zspage is huge pain to waste memory.
> > > 
> > > well, the thing is -- we end up requesting less pages after all, so
> > > zsmalloc has better chances to survive. for example, gcc5 compilation test
> > 
> > Indeed. I saw your test result.
> 
> 
> [..]
> > >  Total               129          489       1627756    1618193     850147
> > > 
> > > 
> > > that's  891703 - 850147 = 41556 less pages. or 162MB less memory used.
> > > 41556 less pages means that zsmalloc had 41556 less chances to fail.
> > 
> > 
> > Let's think swap-case which is more important for zram now. As you know,
> > most of usecase are swap in embedded world.
> > Do we really need 16 pages allocator for just less PAGE_SIZE objet
> > at the moment which is really heavy memory pressure?
> 
> I'll take a look at dynamic class page addition.

Thanks, Sergey.

Just a note:

I am preparing zsmalloc migration now and almost done so I hope
I can send it within two weeks. In there, I changed a lot of
things in zsmalloc, page chaining, struct page fields usecases
and locking scheme and so on. The zsmalloc fragment/migration
is really painful now so we should solve it first so I hope
you help to review that and let's go further dynamic chaining
after that, please. :)

--
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.work@gmail.com>
Cc: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Joonsoo Kim <js1304@gmail.com>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [RFC][PATCH v2 3/3] mm/zsmalloc: increase ZS_MAX_PAGES_PER_ZSPAGE
Date: Mon, 22 Feb 2016 11:34:32 +0900	[thread overview]
Message-ID: <20160222023432.GC27829@bbox> (raw)
In-Reply-To: <20160222020113.GB488@swordfish>

On Mon, Feb 22, 2016 at 11:01:13AM +0900, Sergey Senozhatsky wrote:
> On (02/22/16 10:34), Minchan Kim wrote:
> [..]
> > > > I tempted it several times with same reason you pointed out.
> > > > But my worry was that if we increase ZS_MAX_ZSPAGE_ORDER, zram can
> > > > consume more memory because we need several pages chain to populate
> > > > just a object. Even, at that time, we didn't have compaction scheme
> > > > so fragmentation of object in zspage is huge pain to waste memory.
> > > 
> > > well, the thing is -- we end up requesting less pages after all, so
> > > zsmalloc has better chances to survive. for example, gcc5 compilation test
> > 
> > Indeed. I saw your test result.
> 
> 
> [..]
> > >  Total               129          489       1627756    1618193     850147
> > > 
> > > 
> > > that's  891703 - 850147 = 41556 less pages. or 162MB less memory used.
> > > 41556 less pages means that zsmalloc had 41556 less chances to fail.
> > 
> > 
> > Let's think swap-case which is more important for zram now. As you know,
> > most of usecase are swap in embedded world.
> > Do we really need 16 pages allocator for just less PAGE_SIZE objet
> > at the moment which is really heavy memory pressure?
> 
> I'll take a look at dynamic class page addition.

Thanks, Sergey.

Just a note:

I am preparing zsmalloc migration now and almost done so I hope
I can send it within two weeks. In there, I changed a lot of
things in zsmalloc, page chaining, struct page fields usecases
and locking scheme and so on. The zsmalloc fragment/migration
is really painful now so we should solve it first so I hope
you help to review that and let's go further dynamic chaining
after that, please. :)

  reply	other threads:[~2016-02-22  2:34 UTC|newest]

Thread overview: 52+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-21 13:27 [RFC][PATCH v2 0/3] mm/zsmalloc: increase objects density and reduce memory wastage Sergey Senozhatsky
2016-02-21 13:27 ` Sergey Senozhatsky
2016-02-21 13:27 ` [RFC][PATCH v2 1/3] mm/zsmalloc: introduce zs_get_huge_class_size_watermark() Sergey Senozhatsky
2016-02-21 13:27   ` Sergey Senozhatsky
2016-02-21 13:27 ` [RFC][PATCH v2 2/3] zram: use zs_get_huge_class_size_watermark() Sergey Senozhatsky
2016-02-21 13:27   ` Sergey Senozhatsky
2016-02-22  0:04   ` Minchan Kim
2016-02-22  0:04     ` Minchan Kim
2016-02-22  0:40     ` Sergey Senozhatsky
2016-02-22  0:40       ` Sergey Senozhatsky
2016-02-22  1:27       ` Minchan Kim
2016-02-22  1:27         ` Minchan Kim
2016-02-22  1:59         ` Sergey Senozhatsky
2016-02-22  1:59           ` Sergey Senozhatsky
2016-02-22  2:05           ` Sergey Senozhatsky
2016-02-22  2:05             ` Sergey Senozhatsky
2016-02-22  2:57           ` Minchan Kim
2016-02-22  2:57             ` Minchan Kim
2016-02-22  3:54             ` Sergey Senozhatsky
2016-02-22  3:54               ` Sergey Senozhatsky
2016-02-22  4:54               ` Minchan Kim
2016-02-22  4:54                 ` Minchan Kim
2016-02-22  5:05                 ` Sergey Senozhatsky
2016-02-22  5:05                   ` Sergey Senozhatsky
2016-02-21 13:27 ` [RFC][PATCH v2 3/3] mm/zsmalloc: increase ZS_MAX_PAGES_PER_ZSPAGE Sergey Senozhatsky
2016-02-21 13:27   ` Sergey Senozhatsky
2016-02-22  0:25   ` Minchan Kim
2016-02-22  0:25     ` Minchan Kim
2016-02-22  0:47     ` Sergey Senozhatsky
2016-02-22  0:47       ` Sergey Senozhatsky
2016-02-22  1:34       ` Minchan Kim
2016-02-22  1:34         ` Minchan Kim
2016-02-22  2:01         ` Sergey Senozhatsky
2016-02-22  2:01           ` Sergey Senozhatsky
2016-02-22  2:34           ` Minchan Kim [this message]
2016-02-22  2:34             ` Minchan Kim
2016-02-22  3:59             ` Sergey Senozhatsky
2016-02-22  3:59               ` Sergey Senozhatsky
2016-02-22  4:41               ` Minchan Kim
2016-02-22  4:41                 ` Minchan Kim
2016-02-22 10:43                 ` Sergey Senozhatsky
2016-02-22 10:43                   ` Sergey Senozhatsky
2016-02-23  8:25                   ` Minchan Kim
2016-02-23  8:25                     ` Minchan Kim
2016-02-23 10:35                     ` Sergey Senozhatsky
2016-02-23 10:35                       ` Sergey Senozhatsky
2016-02-23 16:05                       ` Minchan Kim
2016-02-23 16:05                         ` Minchan Kim
2016-02-27  6:31                         ` Sergey Senozhatsky
2016-02-27  6:31                           ` Sergey Senozhatsky
2016-02-22  2:24         ` Sergey Senozhatsky
2016-02-22  2:24           ` 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=20160222023432.GC27829@bbox \
    --to=minchan@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=js1304@gmail.com \
    --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.