linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Joonsoo Kim <js1304@gmail.com>
To: Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Minchan Kim <minchan@kernel.org>,
	Linux Memory Management List <linux-mm@kvack.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
Subject: Re: [RFC PATCH 3/3] mm/zsmalloc: change ZS_MAX_PAGES_PER_ZSPAGE
Date: Fri, 19 Feb 2016 10:19:57 +0900	[thread overview]
Message-ID: <CAAmzW4NQt4jD2q92Hh4XFzt5fV=-i3J9eoxS3now6Y4Xw7OqGg@mail.gmail.com> (raw)
In-Reply-To: <20160218101909.GB503@swordfish>

2016-02-18 19:19 GMT+09:00 Sergey Senozhatsky
<sergey.senozhatsky.work@gmail.com>:
> On (02/18/16 18:55), Sergey Senozhatsky wrote:
>> > There is a reason that it is order of 2. Increasing ZS_MAX_PAGES_PER_ZSPAGE
>> > is related to ZS_MIN_ALLOC_SIZE. If we don't have enough OBJ_INDEX_BITS,
>> > ZS_MIN_ALLOC_SIZE would be increase and it causes regression on some
>> > system.
>>
>> Thanks!
>>
>> do you mean PHYSMEM_BITS != BITS_PER_LONG systems? PAE/LPAE? isn't it
>> the case that on those systems ZS_MIN_ALLOC_SIZE already bigger than 32?

Indeed.

> I mean, yes, there are ZS_ALIGN requirements that I completely ignored,
> thanks for pointing that out.
>
> just saying, not insisting on anything, theoretically, trading 32 bit size
> objects in exchange of reducing a much bigger memory wastage is sort of
> interesting. zram stores objects bigger than 3072 as huge objects, leaving

I'm also just saying. :)
On the above example system which already uses 128 byte min class,
your change makes it to 160 or 192. It could make a more trouble than
you thought.

> 4096-3072 bytes unused, and it'll take 4096-3072/32 = 4000  32 bit objects
> to beat that single 'bad' compression object in storing inefficiency...

Where does 4096-3072/32 calculation comes from? I'm not familiar to recent
change on zsmalloc such as huge class so can't understand this calculation.

> well, patches 0001/0002 are trying to address this a bit, but the biggest
> problem is still there: we have too many ->huge classes and they are a bit
> far from good.

Agreed. And I agree your patchset, too.

Anyway, could you answer my other questions on original reply?

Thanks.

--
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>

  reply	other threads:[~2016-02-19  1:19 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-18  3:02 [RFC PATCH 0/3] mm/zsmalloc: increase density and reduce memory wastage Sergey Senozhatsky
2016-02-18  3:02 ` [RFC PATCH 1/3] mm/zsmalloc: introduce zs_get_huge_class_size_watermark() Sergey Senozhatsky
2016-02-18  3:02 ` [RFC PATCH 2/3] zram: use zs_get_huge_class_size_watermark() Sergey Senozhatsky
2016-02-18  3:02 ` [RFC PATCH 3/3] mm/zsmalloc: change ZS_MAX_PAGES_PER_ZSPAGE Sergey Senozhatsky
2016-02-18  4:41   ` Sergey Senozhatsky
2016-02-18  4:46     ` Sergey Senozhatsky
2016-02-18  5:03     ` Sergey Senozhatsky
2016-02-18  8:28   ` Joonsoo Kim
2016-02-18  9:55     ` Sergey Senozhatsky
2016-02-18 10:19       ` Sergey Senozhatsky
2016-02-19  1:19         ` Joonsoo Kim [this message]
2016-02-19  4:16           ` Sergey Senozhatsky
2016-02-19  4:19             ` Sergey Senozhatsky
2016-02-19  4:46             ` Sergey Senozhatsky
2016-02-19  5:38               ` Sergey Senozhatsky
2016-02-19  5:55                 ` 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='CAAmzW4NQt4jD2q92Hh4XFzt5fV=-i3J9eoxS3now6Y4Xw7OqGg@mail.gmail.com' \
    --to=js1304@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=minchan@kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox