From: Seth Jennings <sjenning@linux.vnet.ibm.com>
To: Minchan Kim <minchan@kernel.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Nitin Gupta <ngupta@vflare.org>,
Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>,
Dan Magenheimer <dan.magenheimer@oracle.com>,
Robert Jennings <rcj@linux.vnet.ibm.com>,
Jenifer Hopper <jhopper@us.ibm.com>, Mel Gorman <mgorman@suse.de>,
Johannes Weiner <jweiner@redhat.com>,
Rik van Riel <riel@redhat.com>,
Larry Woodman <lwoodman@redhat.com>,
Benjamin Herrenschmidt <benh@kernel.crashing.org>,
Dave Hansen <dave@linux.vnet.ibm.com>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org,
devel@driverdev.osuosl.org
Subject: Re: [PATCHv4 3/7] zswap: add to mm/
Date: Fri, 01 Feb 2013 11:46:34 -0600 [thread overview]
Message-ID: <510BFF7A.4000804@linux.vnet.ibm.com> (raw)
In-Reply-To: <510BDFBD.7090808@linux.vnet.ibm.com>
On 02/01/2013 09:31 AM, Seth Jennings wrote:
> On 01/31/2013 08:38 PM, Minchan Kim wrote:
>> On Thu, Jan 31, 2013 at 01:06:46PM -0600, Seth Jennings wrote:
>>> On 01/31/2013 01:07 AM, Minchan Kim wrote:
>>>> On Tue, Jan 29, 2013 at 03:40:23PM -0600, Seth Jennings wrote:
>>>>> zswap is a thin compression backend for frontswap. It receives
>>>>> pages from frontswap and attempts to store them in a compressed
>>>>> memory pool, resulting in an effective partial memory reclaim and
>>>>> dramatically reduced swap device I/O.
>>>>>
>>>>> Additionally, in most cases, pages can be retrieved from this
>>>>> compressed store much more quickly than reading from tradition
>>>>> swap devices resulting in faster performance for many workloads.
>>>>>
>>>>> This patch adds the zswap driver to mm/
>>>>>
>>>>> Signed-off-by: Seth Jennings <sjenning@linux.vnet.ibm.com>
>>>>> ---
>>>>> mm/Kconfig | 15 ++
>>>>> mm/Makefile | 1 +
>>>>> mm/zswap.c | 656 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>>>>> 3 files changed, 672 insertions(+)
>>>>> create mode 100644 mm/zswap.c
>>>>>
>>>>> diff --git a/mm/Kconfig b/mm/Kconfig
>>>>> index 278e3ab..14b9acb 100644
>>>>> --- a/mm/Kconfig
>>>>> +++ b/mm/Kconfig
>>>>> @@ -446,3 +446,18 @@ config FRONTSWAP
>>>>> and swap data is stored as normal on the matching swap device.
>>>>>
>>>>> If unsure, say Y to enable frontswap.
>>>>> +
>>>>> +config ZSWAP
>>>>> + bool "In-kernel swap page compression"
>>>>> + depends on FRONTSWAP && CRYPTO
>>>>> + select CRYPTO_LZO
>>>>> + select ZSMALLOC
>>>>
>>>> Again, I'm asking why zswap should have a dependent on CRPYTO?
>>>> Couldn't we support it as a option? I'd like to use zswap without CRYPTO
>>>> like zram.
>>>
>>> The reason we need CRYPTO is that zswap uses it to support a pluggable
>>> compression model. zswap can use any compressor that has a crypto API
>>> driver. zswap has _symbol dependencies_ on CRYPTO. If it isn't
>>> selected, the build breaks.
>>
>> I think we can factor out compressoin part and remove dependency
>> at compile time by Kconfig. No?
>
> I'm still not following. How would one "factor out" the crypto API
> dependency when we use it to access the compressor modules.
>
> The only thing I can think you're saying is to hack up the code with
> ifdefs to call the lzo code directly based on a Kconfig option. I
> really hope you aren't saying that though :-/
Looking into this more, I found out that INET also selects CRYPTO, so
unless the kernel is not doing networking, CRYPTO will be enabled
anyway. EXT4 also selects it.
>
>> Of course, if we disable CRYPTO in Kconfig,
>> we lost pluggable model but not a problem for embedded system.
>
> The pluggable model is _very_ necessary for us because we use it to
> access our hardware compression accelerator. We do not use lzo in
> that case. We use 842 (crypto/842.c and drivers/crypto/nx/nx-842.c).
>
> I'm not sure why we are misunderstanding on this. Is there a specific
> objection to depending the crypto API here? I understand that you are
> thinking about embedded systems. Does the enabling CRYPTO and
> CRYPTO_LZO add significant size to the kernel or something?
If size is the concern, I did a quick size diff between a vmlinux with
and without CRYPTO:
text data bss dec
CRYPTO=n 4747622 602704 7774208 13124534
CRYPTO=y 4755437 602960 7774208 13132605
diff 7815 256 0 8071
Bottom line is CRYPTO adds about 8k to vmlinux.
Thanks,
Seth
>Just trying to understand why this is a problem.
>
> Thanks,
> Seth
>
>>
>> Anyway, If it's a burden for you at a moment, I'm not going to insist on it.
>> Will do it for myself.
>
>
>
--
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>
next prev parent reply other threads:[~2013-02-01 17:47 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-29 21:40 [PATCHv4 0/7] zswap: compressed swap caching Seth Jennings
2013-01-29 21:40 ` [PATCHv4 1/7] debugfs: add get/set for atomic types Seth Jennings
2013-01-29 21:40 ` [PATCHv4 2/7] zsmalloc: promote to lib/ Seth Jennings
2013-01-29 22:51 ` Andrew Morton
2013-01-30 16:28 ` Seth Jennings
2013-01-30 23:34 ` Andrew Morton
2013-01-31 5:35 ` Minchan Kim
2013-02-13 16:00 ` Seth Jennings
2013-01-29 21:40 ` [PATCHv4 3/7] zswap: add to mm/ Seth Jennings
2013-01-31 7:07 ` Minchan Kim
2013-01-31 19:06 ` Seth Jennings
2013-01-31 20:07 ` Robert Jennings
2013-02-01 2:38 ` Minchan Kim
2013-02-01 15:31 ` Seth Jennings
2013-02-01 17:46 ` Seth Jennings [this message]
2013-01-29 21:40 ` [PATCHv4 4/7] mm: break up swap_writepage() for frontswap backends Seth Jennings
2013-01-29 21:40 ` [PATCHv4 5/7] mm: allow for outstanding swap writeback accounting Seth Jennings
2013-01-29 21:40 ` [PATCHv4 6/7] zswap: add flushing support Seth Jennings
2013-01-29 23:03 ` Andrew Morton
2013-02-01 7:27 ` Minchan Kim
2013-02-13 6:24 ` Seth Jennings
2013-01-29 21:40 ` [PATCHv4 7/7] zswap: add documentation Seth Jennings
2013-01-29 23:07 ` Andrew Morton
2013-01-29 22:14 ` [PATCHv4 0/7] zswap: compressed swap caching Joe Perches
2013-01-29 22:49 ` Seth Jennings
2013-01-30 4:32 ` Minchan Kim
2013-01-30 16:01 ` Seth Jennings
2013-02-01 1:39 ` Simon Jeons
2013-02-01 15:13 ` Seth Jennings
2013-02-03 0:17 ` Simon Jeons
2013-02-04 14:56 ` Seth Jennings
2013-02-04 1:03 ` Simon Jeons
2013-02-04 15:07 ` Seth Jennings
[not found] ` <5110287A.5050200@linux.vnet.ibm.com>
2013-02-04 21:45 ` Seth Jennings
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=510BFF7A.4000804@linux.vnet.ibm.com \
--to=sjenning@linux.vnet.ibm.com \
--cc=akpm@linux-foundation.org \
--cc=benh@kernel.crashing.org \
--cc=dan.magenheimer@oracle.com \
--cc=dave@linux.vnet.ibm.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=jhopper@us.ibm.com \
--cc=jweiner@redhat.com \
--cc=konrad.wilk@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=lwoodman@redhat.com \
--cc=mgorman@suse.de \
--cc=minchan@kernel.org \
--cc=ngupta@vflare.org \
--cc=rcj@linux.vnet.ibm.com \
--cc=riel@redhat.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).