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=-10.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham 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 0EAC5C433F5 for ; Thu, 16 Sep 2021 10:38:37 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 94D7061108 for ; Thu, 16 Sep 2021 10:38:36 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 94D7061108 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=konsulko.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id C4E72900002; Thu, 16 Sep 2021 06:38:35 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id BFE016B0072; Thu, 16 Sep 2021 06:38:35 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id AECB3900002; Thu, 16 Sep 2021 06:38:35 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0208.hostedemail.com [216.40.44.208]) by kanga.kvack.org (Postfix) with ESMTP id 9D0416B0071 for ; Thu, 16 Sep 2021 06:38:35 -0400 (EDT) Received: from smtpin30.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 5299B1802FA4E for ; Thu, 16 Sep 2021 10:38:35 +0000 (UTC) X-FDA: 78593087790.30.8588631 Received: from mail-yb1-f179.google.com (mail-yb1-f179.google.com [209.85.219.179]) by imf13.hostedemail.com (Postfix) with ESMTP id D6887102F8CB for ; Thu, 16 Sep 2021 10:38:34 +0000 (UTC) Received: by mail-yb1-f179.google.com with SMTP id r4so12008851ybp.4 for ; Thu, 16 Sep 2021 03:38:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=XLxHMlXUHUIhj9IvqwBYZwvPrTaBaMFfo94cT4jV3hA=; b=gSC685zfyt+BLB9ynvaEhIgBUtuI65X+TjwwTIreopcYgVxEvn8EvS/qO8sl3CP8pD NOEkwZ7OETCD0yuVAfZHQKu1Cvg7SZxV6rzgj4UJ4crfqMCJ5FdRzxkByyBDr7jV6WmU bdO1U5EmJ8nG0wA4wEmea2b3gYF2/fmvx3Qnw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=XLxHMlXUHUIhj9IvqwBYZwvPrTaBaMFfo94cT4jV3hA=; b=triEA4ljMKgOKl5Nv7LL202cvivnIN17jmPBfxi+IaQOQo4gKGJ6Uj3W/XVYNwT1VN pZ8IQju7HLAa7YB6kmd6JBfqQv0/CS4BsA8fCJB24hNSS+xqMlOsE4aiS6i7GKQ9I0Wf +dggxvLowlFN4X+yRzjsqwMMDvEUV2vwMOEIzACn00sRGjuOfqwC+y9YiEnsO6n98ThH IcIIgueU9eyls47MwTDGrS3ZOLaIrTDMMUqAU8RvH5PTpKVGSozTvh+zcLCii/6Wm6VR ze4iGQeqB0DKmBZ6H3bkfzc9a2qIsprzmt/33BaI1xnVdqn0hlWVy9MzFpcY5cUS8zdZ UGgw== X-Gm-Message-State: AOAM531vewTfPI2o2zfl5tDa9kF10WbYFV/30PL9bE1+VZAbyTvzhDx7 xhXOw7hJdRaIHTMlTHyFw4pP/7zrFMH7uTD/8LiogA== X-Google-Smtp-Source: ABdhPJzp435BxzLxqbNKnDJjetrXsI0IlN9D5gK4babpYkfK2O1tUpgp9QEzzhkrfg0EWOcFurRhBHhLuoBZK2aOOs0= X-Received: by 2002:a05:6902:100c:: with SMTP id w12mr6222370ybt.47.1631788714083; Thu, 16 Sep 2021 03:38:34 -0700 (PDT) MIME-Version: 1.0 References: <20210916085102.19310-1-a.badmaev@clicknet.pro> In-Reply-To: From: Vitaly Wool Date: Thu, 16 Sep 2021 12:38:23 +0200 Message-ID: Subject: Re: [PATCH] mm: add ztree - new allocator for use via zpool API To: Vlastimil Babka Cc: Ananda Badmaev , Linux-MM Content-Type: text/plain; charset="UTF-8" X-Rspamd-Server: rspam01 X-Rspamd-Queue-Id: D6887102F8CB Authentication-Results: imf13.hostedemail.com; dkim=pass header.d=konsulko.com header.s=google header.b=gSC685zf; dmarc=none; spf=pass (imf13.hostedemail.com: domain of vitaly.wool@konsulko.com designates 209.85.219.179 as permitted sender) smtp.mailfrom=vitaly.wool@konsulko.com X-Stat-Signature: ob3cwnu91uxofbt3iwytwt88c4z7e6ms X-HE-Tag: 1631788714-729722 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 Thu, Sep 16, 2021 at 12:12 PM Vlastimil Babka wrote: > > On 9/16/21 10:51, Ananda Badmaev wrote: > > ztree is a versatile backend for zswap and potentially zram. It got its name > > due to the usage of red-black trees to store blocks of compressed objects. > > These blocks consist of several consecutive pages and ztree keeps an integer > > number of objects per block. > > > > For zram, ztree has better worst case malloc() and free() times than zsmalloc, > > does not deteriorate over time and has slightly worse but comparable compression > > ratio. For zswap, ztree has better worst case malloc() and free() times than > > z3fold, better compression ratio than z3fold and supports reclaim unlike zsmalloc. > > > > Signed-off-by: Ananda Badmaev > > So how many of these allocators do we need? Minimally IMHO some data should > be provided for the performance comparison claims above. > Sounds like if this is based on z3fold (I haven't actually compared the > code) and better in every aspect, why not just "upgrade" z3fold to ztree then? We have collected a lot of data and it wouldn't fit in the cover message. I believe Ananda will follow up with comparison details on various architectures. I wouldn't say that ztree is completely based on z3fold, the latter might have served as an inspiration and ztree shares the idea that keeping an integral amount of objects per page is a good thing. With that said, ztree operates on blocks, not on pages which allows for more flexibility. ~Vitaly