From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.5 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, FSL_HELO_FAKE,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E541AC10F14 for ; Tue, 15 Oct 2019 20:00:51 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 96B9620854 for ; Tue, 15 Oct 2019 20:00:51 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="smlfLvqn" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 96B9620854 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 2DA018E0005; Tue, 15 Oct 2019 16:00:51 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 28A868E0001; Tue, 15 Oct 2019 16:00:51 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 1521F8E0005; Tue, 15 Oct 2019 16:00:51 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0096.hostedemail.com [216.40.44.96]) by kanga.kvack.org (Postfix) with ESMTP id E27B78E0001 for ; Tue, 15 Oct 2019 16:00:50 -0400 (EDT) Received: from smtpin16.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with SMTP id 66FB681ED for ; Tue, 15 Oct 2019 20:00:50 +0000 (UTC) X-FDA: 76047087060.16.cloth48_5e88347c54b31 X-HE-Tag: cloth48_5e88347c54b31 X-Filterd-Recvd-Size: 7612 Received: from mail-pf1-f193.google.com (mail-pf1-f193.google.com [209.85.210.193]) by imf18.hostedemail.com (Postfix) with ESMTP for ; Tue, 15 Oct 2019 20:00:49 +0000 (UTC) Received: by mail-pf1-f193.google.com with SMTP id q21so13138105pfn.11 for ; Tue, 15 Oct 2019 13:00:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=bKSMfoLnTiv4QZbW0fJJA4m+PiNxXqAUdLzNlRxhxZ8=; b=smlfLvqnBgLugbB5EXTVpkRdxwG3UfprpJYAoiPjjtLSX8aqWDhttgYImQ75oBfc/m 9dFbydtkYxirekHbHRXwRoqyd7qybSV0S9AVf3+GWX9tG71d4MPJzaufGycp5cw0rEi6 KMKZ3l+cPQhTMTbHnZoaG/59KTZOsBOz/sRMsGMu4QxVLVHRlDhdfJudmE7Gup5F73n/ fkukCJGaxS93SEHuzjTUyfDQUNSGXsus8ppcvXoXM5mjsGS5q9ObVn28sb2lj32dI0wF jqdxho1CEMR/d+VvyLZYhN30J8/gdUBlMKGb3c9pBqz3FUaJfJKCYNDTsgebMvG0Ruzj I3gQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=bKSMfoLnTiv4QZbW0fJJA4m+PiNxXqAUdLzNlRxhxZ8=; b=uTDkSv+Kfmz8D2q21Fi3ncjP4NA/mJxcDyaipBhpLs6uGZjByErsHb0hIxCgjeg6of oVmDecrmNH94QlWedK0m6aeFCqDWCDrKRBHTr0xi6JlhRbr2GdMsRlgLsX2GhMT24x3a RHEY6x05Pin6ahxP/yuNV3qdO0KEpK3mwN2/dKYvURnlrFsgHKMDoEEv1vPRu6gNTPke nNSVdoJ/H9u/BJZiBl72P7ad2gt5BryO0jfv4eYGz2xV+YMbkPm9GnQ7XRVGgsJvfwuL 3kWtPPiB9Q77QRCAIAdL17whTH/Q7m7QdQt3qQ6AOy2/SuB++Gt/DhXTqVZFLetYcFh0 +FoQ== X-Gm-Message-State: APjAAAUZFMuWM/Lr0XJOaq57n8F688R4Ktxd6au/vNPzWim4JCZjL/pi GXnpuUPsuHV687c9bSWLNww= X-Google-Smtp-Source: APXvYqz/o8Hq4dSmkY1+22lVOONVEL5yweEBQUbwe8qQo7Buyvuy5G6g31Jub/Qp8NztQMwd0E+IaA== X-Received: by 2002:a17:90a:246e:: with SMTP id h101mr294379pje.133.1571169648112; Tue, 15 Oct 2019 13:00:48 -0700 (PDT) Received: from google.com ([2620:15c:211:1:3e01:2939:5992:52da]) by smtp.gmail.com with ESMTPSA id a13sm33572074pfg.10.2019.10.15.13.00.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Oct 2019 13:00:45 -0700 (PDT) Date: Tue, 15 Oct 2019 13:00:44 -0700 From: Minchan Kim To: Vitaly Wool Cc: Linux-MM , Andrew Morton , Dan Streetman , Sergey Senozhatsky , LKML , Vlastimil Babka , Shakeel Butt , Henry Burns , Theodore Ts'o Subject: Re: [PATCH 0/3] Allow ZRAM to use any zpool-compatible backend Message-ID: <20191015200044.GA233697@google.com> References: <20191010230414.647c29f34665ca26103879c4@gmail.com> <20191014164110.GA58307@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) 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: On Tue, Oct 15, 2019 at 09:39:35AM +0200, Vitaly Wool wrote: > Hi Minchan, > > On Mon, Oct 14, 2019 at 6:41 PM Minchan Kim wrote: > > > > On Thu, Oct 10, 2019 at 11:04:14PM +0300, Vitaly Wool wrote: > > > 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. > > > > > > The patchset in [1] had basically the only goal of enabling ZRAM/zbud combo which had a very narrow use case. Things have changed substantially since then, and now, with z3fold used widely as a zswap backend, I, as the z3fold maintainer, am getting requests to re-interate on making it possible to use ZRAM with any zpool-compatible backend, first of all z3fold. > > > > > > The preliminary results for this work have been delivered at Linux Plumbers this year [2]. The talk at LPC, though having attracted limited interest, 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. > > > > > > [1] https://lkml.org/lkml/2015/9/14/356 > > > [2] https://linuxplumbersconf.org/event/4/contributions/551/ > > > > Please describe what's the usecase in real world, what's the benefit zsmalloc > > cannot fulfill by desgin and how it's significant. > > I'm not entirely sure how to interpret the phrase "the benefit > zsmalloc cannot fulfill by design" but let me explain. > First, there are multi multi core systems where z3fold can provide > better throughput. Please include number in the description with workload. > Then, there are low end systems with hardware > compression/decompression support which don't need zsmalloc > sophistication and would rather use zbud with ZRAM because the > compression ratio is relatively low. I couldn't imagine how it's bad with zsmalloc. Could you be more specific? > Finally, there are MMU-less systems targeting IOT and still running > Linux and having a compressed RAM disk is something that would help > these systems operate in a better way (for the benefit of the overall > Linux ecosystem, if you care about that, of course; well, some people > do). Could you write down what's the problem to use zsmalloc for MMU-less system? Maybe, it would be important point rather other performance argument since other functions's overheads in the callpath are already rather big. > > > I really don't want to make fragmentaion of allocator so we should really see > > how zsmalloc cannot achieve things if you are claiming. > > I have to say that this point is completely bogus. We do not create > fragmentation by using a better defined and standardized API. In fact, > we aim to increase the number of use cases and test coverage for ZRAM. > With that said, I have hard time seeing how zsmalloc can operate on a > MMU-less system. > > > Please tell us how to test it so that we could investigate what's the root > > cause. > > I gather you haven't read neither the LPC documents nor my > conversation with Sergey re: these changes, because if you did you > wouldn't have had the type of questions you're asking. Please also see > above. Please include your claims in the description rather than attaching file. That's the usualy way how we work because it could make easier to discuss by inline. > > I feel a bit awkward explaining basic things to you but there may not > be other "root cause" than applicability issue. zsmalloc is a great > allocator but it's not universal and has its limitations. The > (potential) scope for ZRAM is wider than zsmalloc can provide. We are > *helping* _you_ to extend this scope "in real world" (c) and you come > up with bogus objections. Why? Please add more detail to convince so we need to think over why zsmalloc cannot be improved for the usecase.