Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp1990114ybl; Thu, 19 Dec 2019 06:21:02 -0800 (PST) X-Google-Smtp-Source: APXvYqw/iJ+mbu7CZe52byyX/1IHz12G2R6EeVVXv+grc7IXFPx5gtJn9VVE1ayUTnOpna9626kw X-Received: by 2002:a9d:7c97:: with SMTP id q23mr8947786otn.253.1576765262381; Thu, 19 Dec 2019 06:21:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576765262; cv=none; d=google.com; s=arc-20160816; b=FhrjhKO24ey390cmkAn+h+l7x5GxM2g2/tmAHhlSbnCrEqdISUNsbrd2Jrm6KaBEw3 QEUWbJU+f/u8oJduD1/4JGLD80jMMkBQTXE5MBKl1sE9TwittKGQVPD0jNT6a4u1dCwm z3WsD0AYSGrxTsSO1xwtEwEGuffowh5C7l1PPwn6EX6wz6uVhNWDsidjPJYihs2bQuSU CxI4B0XP8MT9AewlDjJigwwJAkIkfX7OZM9rf+2oeTe5JHtv6UQziDb/oqLys9ST9GVJ aVGjKXu2+a0ZlZvogUxCMiEXZ7hrl8LmI+/NNK2436MolrAgVRSpAevAFmfO7poQ+Ln3 P49w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:subject:cc:to:from:date:dkim-signature; bh=Ork8StQMfTVuX32o3J7KQH8US/EDzzdCiRmJE8RfJBY=; b=gey4/iE4VmkH0BM9RfxAcNQVCJtmqMoKYAhyUUPY5vEf3Phwz3AR0dz/yqBoksKiPE Ew4PcPlijbxFAMtyyi3ebMBOAjajPavclG3A4PoeWdtNQ43P+JWZ2Sa/QC+ljQ9/Rs2t dIgvm5W5E6PYm+nANMKsQv2MVaRAzkr2iKiCJo/9GurTX5vCdLKXMGMDWkgu0I8i9vEH tKL31DYIy5MG2FC8zepcp7AJy87d84v5fml0EHQlhGQcQtsgfSfXvbNHcWMMMJYyXsXs JwAlcS14D8EXyrRv7Cg+UvYLSXQVh21sMFdn0iQ408qrIEZukiTtwEHSeC3U8DoYMQed 5CrQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=URHFujMF; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o13si3584366otp.27.2019.12.19.06.20.47; Thu, 19 Dec 2019 06:21:02 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=URHFujMF; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726808AbfLSOTc (ORCPT + 99 others); Thu, 19 Dec 2019 09:19:32 -0500 Received: from mail-lf1-f45.google.com ([209.85.167.45]:44519 "EHLO mail-lf1-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726757AbfLSOTc (ORCPT ); Thu, 19 Dec 2019 09:19:32 -0500 Received: by mail-lf1-f45.google.com with SMTP id v201so4448985lfa.11 for ; Thu, 19 Dec 2019 06:19:31 -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=p75s6s6kXdP/Jo/dlUV8nqmwRRkXqegk3DMyj3IGExL0VzZk83hHb8IjqJVJjxQZub tcsVlrJ/ZaLhBdZRZlluDZWjx40NxBpFp5PVPH4NSok6ty55K5Y4AvOQv4fk61D+Bcxe wmDPVn6dj0lnjOZVi/+mFFtDpUJLZetoD80tm3UF2JTjAezcDq77f4Rzd91R9aMSG4B+ 339lLXQx3gj2oAhj0j9UUyFeu7ZzY4EuObtJySj9Y8HqIbwLT5o6KFoXb5nEvUhgx58s lWXFklN2pkFqQMkTXYGsqNFCEmoQNPNSgVxprO4xdO5nL8BQYd3jN9PsU/CVVMwYKiUZ xxaQ== X-Gm-Message-State: APjAAAXzCG2bzqN8njAnyJ1gigiJsWOAdkl3dTprqJN6NKJTzJvnoHWn 9ZIf4RXkri5m8S/XYGx/38qhCCzNKzevJQ== 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 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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