From: Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>
To: Minchan Kim <minchan@kernel.org>
Cc: Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>,
Sergey Senozhatsky <sergey.senozhatsky@gmail.com>,
Andrew Morton <akpm@linux-foundation.org>,
linux-kernel@vger.kernel.org, linux-mm@kvack.org
Subject: Re: [PATCH] zram: introduce per-device debug_stat sysfs node
Date: Fri, 13 May 2016 16:41:05 +0900 [thread overview]
Message-ID: <20160513074105.GD615@swordfish> (raw)
In-Reply-To: <20160513072006.GA21484@bbox>
On (05/13/16 16:20), Minchan Kim wrote:
[..]
> > here I assume that the biggest contributor to re-compress latency is
> > enabled preemption after zcomp_strm_release() and this second zs_malloc().
> > the compression itself of a PAGE_SIZE buffer should be fast enough. so IOW
> > we would pass down the slow path, but would not account it.
>
> biggest contributors are 1. direct reclaim by second zsmalloc call +
> 2. recompression overhead.
3. enabled preemption after zcomp_strm_release()
we can be scheduled out for a long time.
> If zram start to support high comp ratio but slow speed algorithm like zlib
> 2 might be higher than 1 in the future so let's not ignore 2 overhead.
hm, yes, good point. not arguing, just for notice -- 2) has an upper limit
on its complexity, because we basically just do a number of arithmetical
operations on a buffer that has upper size limit -- PAGE_SIZE; while reclaim
in zsmalloc() can last an arbitrary amount of time. that's why I tend to
think of a PAGE_SIZE compression contribution as of constant, that can be
ignored.
> Although 2 is smaller, your patch just accounts only direct reclaim but my
> suggestion can count both 1 and 2 so isn't it better?
>
> I don't know why it's arguable here. :)
no objections to put it next to goto. just making sure that we have
considered all the possibilities and cases.
will resend shortly, thanks!
-ss
--
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: Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>
To: Minchan Kim <minchan@kernel.org>
Cc: Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>,
Sergey Senozhatsky <sergey.senozhatsky@gmail.com>,
Andrew Morton <akpm@linux-foundation.org>,
linux-kernel@vger.kernel.org, linux-mm@kvack.org
Subject: Re: [PATCH] zram: introduce per-device debug_stat sysfs node
Date: Fri, 13 May 2016 16:41:05 +0900 [thread overview]
Message-ID: <20160513074105.GD615@swordfish> (raw)
In-Reply-To: <20160513072006.GA21484@bbox>
On (05/13/16 16:20), Minchan Kim wrote:
[..]
> > here I assume that the biggest contributor to re-compress latency is
> > enabled preemption after zcomp_strm_release() and this second zs_malloc().
> > the compression itself of a PAGE_SIZE buffer should be fast enough. so IOW
> > we would pass down the slow path, but would not account it.
>
> biggest contributors are 1. direct reclaim by second zsmalloc call +
> 2. recompression overhead.
3. enabled preemption after zcomp_strm_release()
we can be scheduled out for a long time.
> If zram start to support high comp ratio but slow speed algorithm like zlib
> 2 might be higher than 1 in the future so let's not ignore 2 overhead.
hm, yes, good point. not arguing, just for notice -- 2) has an upper limit
on its complexity, because we basically just do a number of arithmetical
operations on a buffer that has upper size limit -- PAGE_SIZE; while reclaim
in zsmalloc() can last an arbitrary amount of time. that's why I tend to
think of a PAGE_SIZE compression contribution as of constant, that can be
ignored.
> Although 2 is smaller, your patch just accounts only direct reclaim but my
> suggestion can count both 1 and 2 so isn't it better?
>
> I don't know why it's arguable here. :)
no objections to put it next to goto. just making sure that we have
considered all the possibilities and cases.
will resend shortly, thanks!
-ss
next prev parent reply other threads:[~2016-05-13 7:39 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-11 13:45 [PATCH] zram: introduce per-device debug_stat sysfs node Sergey Senozhatsky
2016-05-11 13:45 ` Sergey Senozhatsky
2016-05-12 23:41 ` Minchan Kim
2016-05-12 23:41 ` Minchan Kim
2016-05-13 1:09 ` Sergey Senozhatsky
2016-05-13 1:09 ` Sergey Senozhatsky
2016-05-13 6:23 ` Minchan Kim
2016-05-13 6:23 ` Minchan Kim
2016-05-13 6:58 ` Sergey Senozhatsky
2016-05-13 6:58 ` Sergey Senozhatsky
2016-05-13 7:05 ` Sergey Senozhatsky
2016-05-13 7:05 ` Sergey Senozhatsky
2016-05-13 7:20 ` Minchan Kim
2016-05-13 7:20 ` Minchan Kim
2016-05-13 7:41 ` Sergey Senozhatsky [this message]
2016-05-13 7:41 ` Sergey Senozhatsky
2016-05-13 8:06 ` Sergey Senozhatsky
2016-05-13 8:06 ` Sergey Senozhatsky
2016-05-13 23:05 ` Minchan Kim
2016-05-13 23:05 ` Minchan Kim
2016-05-14 3:37 ` Sergey Senozhatsky
2016-05-14 3:37 ` Sergey Senozhatsky
-- strict thread matches above, loose matches on Subject: below --
2016-05-13 13:03 Sergey Senozhatsky
2016-05-13 23:08 ` Minchan Kim
2016-05-14 3:38 ` 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=20160513074105.GD615@swordfish \
--to=sergey.senozhatsky.work@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@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.