From: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
To: Minchan Kim <minchan@kernel.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org,
Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>,
Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
Subject: [PATCH 0/3] zsmalloc: small compaction improvements
Date: Sat, 11 Jul 2015 18:45:29 +0900 [thread overview]
Message-ID: <1436607932-7116-1-git-send-email-sergey.senozhatsky@gmail.com> (raw)
Hello,
First two patches introduce new zsmalloc zs_pages_to_compact()
symbol and change zram's `compact' sysfs attribute to be
read-write:
-- write triggers compaction, no changes
-- read returns the number of pages that compaction can
potentially free
This lets user space to make a bit better decisions and to
avoid unneeded (which will not result in any significant
memory savings) compaction calls:
Example:
if [ `cat /sys/block/zram<id>/compact` -gt 10 ]; then
echo 1 > /sys/block/zram<id>/compact;
fi
Up until now user space could not tell whether compaction
will result in any gain.
The third patch removes class locking around zs_can_compact()
in zs_pages_to_compact(), the motivation and details are
provided in the commit message.
Sergey Senozhatsky (3):
zsmalloc: factor out zs_pages_to_compact()
zram: make compact a read-write sysfs node
zsmalloc: do not take class lock in zs_pages_to_compact()
Documentation/ABI/testing/sysfs-block-zram | 7 +++---
Documentation/blockdev/zram.txt | 4 +++-
drivers/block/zram/zram_drv.c | 16 ++++++++++++-
include/linux/zsmalloc.h | 1 +
mm/zsmalloc.c | 37 +++++++++++++++++-------------
5 files changed, 44 insertions(+), 21 deletions(-)
--
2.4.5
next reply other threads:[~2015-07-11 9:46 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-11 9:45 Sergey Senozhatsky [this message]
2015-07-11 9:45 ` [PATCH 1/3] zsmalloc: factor out zs_pages_to_compact() Sergey Senozhatsky
2015-07-11 9:45 ` [PATCH 2/3] zram: make compact a read-write sysfs node Sergey Senozhatsky
2015-07-11 9:45 ` [PATCH 3/3] zsmalloc: do not take class lock in zs_pages_to_compact() Sergey Senozhatsky
2015-07-15 4:07 ` Sergey Senozhatsky
2015-07-15 23:38 ` Minchan Kim
2015-07-15 23:59 ` Sergey Senozhatsky
2015-07-13 23:36 ` [PATCH 0/3] zsmalloc: small compaction improvements Minchan Kim
2015-07-14 0:31 ` Sergey Senozhatsky
2015-07-14 0:55 ` Minchan Kim
2015-07-14 12:29 ` Sergey Senozhatsky
2015-07-14 16:52 ` Minchan Kim
2015-07-15 0:21 ` Sergey Senozhatsky
2015-07-15 0:24 ` Minchan Kim
2015-07-15 11:16 ` 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=1436607932-7116-1-git-send-email-sergey.senozhatsky@gmail.com \
--to=sergey.senozhatsky@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 \
/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;
as well as URLs for NNTP newsgroup(s).