[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160513074105.GD615@swordfish>
Date: Fri, 13 May 2016 16:41:05 +0900
From: Sergey Senozhatsky <sergey.senozhatsky.work@...il.com>
To: Minchan Kim <minchan@...nel.org>
Cc: Sergey Senozhatsky <sergey.senozhatsky.work@...il.com>,
Sergey Senozhatsky <sergey.senozhatsky@...il.com>,
Andrew Morton <akpm@...ux-foundation.org>,
linux-kernel@...r.kernel.org, linux-mm@...ck.org
Subject: Re: [PATCH] zram: introduce per-device debug_stat sysfs node
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
Powered by blists - more mailing lists