From patchwork Thu Dec 19 14:19:28 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vitaly Wool X-Patchwork-Id: 11303715 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 3E39D6C1 for ; Thu, 19 Dec 2019 14:19:34 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id F124E24672 for ; Thu, 19 Dec 2019 14:19:33 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="URHFujMF" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org F124E24672 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 3AD988E0171; Thu, 19 Dec 2019 09:19:33 -0500 (EST) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 35EA28E00F5; Thu, 19 Dec 2019 09:19:33 -0500 (EST) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 273CC8E0171; Thu, 19 Dec 2019 09:19:33 -0500 (EST) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0136.hostedemail.com [216.40.44.136]) by kanga.kvack.org (Postfix) with ESMTP id 1101D8E00F5 for ; Thu, 19 Dec 2019 09:19:33 -0500 (EST) Received: from smtpin01.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id BD60F180AD811 for ; Thu, 19 Dec 2019 14:19:32 +0000 (UTC) X-FDA: 76282098984.01.cause17_1912162cdeb31 X-Spam-Summary: 50,0,0,35cf30ef0f7fe2a1,d41d8cd98f00b204,vitalywool@gmail.com,::akpm@linux-foundation.org:ddstreet@ieee.org:minchan@kernel.org:sergey.senozhatsky.work@gmail.com:linux-kernel@vger.kernel.org:vbabka@suse.cz:shakeelb@google.com:henrywolfeburns@gmail.com:tytso@thunk.org,RULES_HIT:41:355:379:541:967:973:988:989:1260:1277:1311:1313:1314:1345:1437:1515:1516:1518:1534:1541:1593:1594:1711:1730:1747:1777:1792:2196:2199:2393:2525:2553:2566:2682:2685:2737:2859:2898:2933:2937:2939:2942:2945:2947:2951:2954:2987:3022:3138:3139:3140:3141:3142:3353:3865:3866:3867:3868:3870:3871:3872:3934:3936:3938:3941:3944:3947:3950:3953:3956:3959:4250:5007:6119:6261:6653:9025:9413:10004:10400:11658:11914:12043:12048:12297:12517:12519:12663:12740:12760:12895:13069:13095:13137:13150:13161:13229:13230:13231:13311:13357:13439:14039:14181:14394:14659:14687:14721:21080:21433:21444:21451:21627:21666:21740:21788:21795:30051:30054:30070:30090,0,RBL:209.85.167.43:@gmail.com:.lbl8.mailshell.net-62.18.0 .100 66. X-HE-Tag: cause17_1912162cdeb31 X-Filterd-Recvd-Size: 4757 Received: from mail-lf1-f43.google.com (mail-lf1-f43.google.com [209.85.167.43]) by imf29.hostedemail.com (Postfix) with ESMTP for ; Thu, 19 Dec 2019 14:19:32 +0000 (UTC) Received: by mail-lf1-f43.google.com with SMTP id 9so4455054lfq.10 for ; Thu, 19 Dec 2019 06:19:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:mime-version :content-transfer-encoding; bh=Ork8StQMfTVuX32o3J7KQH8US/EDzzdCiRmJE8RfJBY=; b=URHFujMFr1oJ1RLGikF9aTCU3xHEYaZQX8j1Hjhtdn+f2YtC9q/phQZL8AvUVd4Hk0 DNpzhv+ByT3w1TaWEyhIyJWTMDaXCnamNsUtfIH6LiFivdaVQPF30i7klNu7LmFPV8Lt VC6o1BoJS6GbElkhFWYE3tBBTxm5dFcNCmVZtUMYq/sD3SxG0v/aYwDWcDaBlWXoaXyF GN+3WSQ/nk1y8dCRFxrYS9xjxNaHiz4r/9O2s0jcXqfE9VAEykbQZlA+d8LvT1e4G9o9 c3DIe0IzUU8XC3f0/ARiCa5XiswuAHCORmJrLXYXi3l//xd3rFFbh26hTK3wViGyrYJV xqNQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-transfer-encoding; bh=Ork8StQMfTVuX32o3J7KQH8US/EDzzdCiRmJE8RfJBY=; b=TLwEzs6yPFyQxUVqCsDHAHEfE3XJ0RtovdayvRBkKTJskgvjnFEm4W6TzEA/0Z2/dG UwDQSYQqmjQ/e4VuGSVNLB8ASxxlUhCp/uSe9wtTUVI2NmUyhUN0b7/hmBCN3XeEB6mf SImy2ywl1gQQ5LPtG4gXCWyXrAUZUeIUoU0kLe9OjIfqhIzQw2aUaKs6AcIiNxikkIE5 oaRfJorN0zABI3/pvsSnXOEpj2itsV5Ys7n6XEW0XHEJiW1vuB4oLJyiQzRN2MIGO6M6 S+qQvKFP+gnXO3zA/8CfKv0g0+XyR9W/zYeu+BnGDNxCFqSwmUuBO6YN8w65TrLiAf27 7G0g== X-Gm-Message-State: APjAAAUnJprwBa72tn6rxkYnm0Wd8ph8LXF4yc+JWblTsPQY3HKBLCZr jhO44/g0TpGteqdjDu4vIN9meOItjupgVg== X-Google-Smtp-Source: APXvYqx+hCVlogKDGM50k+93eSlGJzWm8A6efIZ48yFykFdwV0mRzUKANU9HWvlNGvh7xmek/HrsYQ== X-Received: by 2002:ac2:4422:: with SMTP id w2mr5572379lfl.178.1576765170264; Thu, 19 Dec 2019 06:19:30 -0800 (PST) Received: from assa ([109.252.14.238]) by smtp.gmail.com with ESMTPSA id n14sm2712984lfe.5.2019.12.19.06.19.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Dec 2019 06:19:29 -0800 (PST) Date: Thu, 19 Dec 2019 15:19:28 +0100 From: Vitaly Wool To: Linux-MM , Andrew Morton , Dan Streetman , Minchan Kim Cc: Sergey Senozhatsky , LKML , Vlastimil Babka , Shakeel Butt , Henry Burns , Theodore Ts'o Subject: [PATCHv2 0/3] Allow ZRAM to use any zpool-compatible backend Message-Id: <20191219151928.ad4ccf732b64b7f8a26116db@gmail.com> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.32; x86_64-pc-linux-gnu) Mime-Version: 1.0 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: The coming patchset is a new take on the old issue: ZRAM can currently be used only with zsmalloc even though this may not be the optimal combination for some configurations. The previous (unsuccessful) attempt dates back to 2015 [1] and is notable for the heated discussions it has caused. This patchset addresses the increasing demand to deploy ZRAM in systems where zsmalloc is not a perfect match or is not applicable at all. An example of a system of the first type is an embedded system using ZRAM block device as a swap where quick application launch is critical for good user experience since z3fold is substantially faster on read than zsmalloc [2]. A system of the second type would, for instance, be the one with hardware on-the-fly RAM compression/decompression where the saved RAM space could be used for ZRAM but would require a special allocator. The preliminary results for this work have been delivered at Linux Plumbers this year [3]. The talk at LPC ended in a consensus to continue the work and pursue the goal of decoupling ZRAM from zsmalloc. The current patchset has been stress tested on arm64 and x86_64 devices, including the Dell laptop I'm writing this message on now, not to mention several QEmu confugirations. The first version of this patchset can be found at [4]. Changelog since V1: * better formatting * allocator backend is now configurable on a per-ZRAM device basis * allocator backend is runtime configurable via sysfs [1] https://lkml.org/lkml/2015/9/14/356 [2] https://lkml.org/lkml/2019/10/21/743 [3] https://linuxplumbersconf.org/event/4/contributions/551/ [4] https://lkml.org/lkml/2019/10/10/1046 Nacked-by: Minchan Kim