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=-13.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 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 21331C433EF for ; Thu, 16 Sep 2021 10:12:25 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 9875760F4C for ; Thu, 16 Sep 2021 10:12:24 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 9875760F4C Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.cz Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id DCB876B0071; Thu, 16 Sep 2021 06:12:23 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id D5EED6B0072; Thu, 16 Sep 2021 06:12:23 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C1C16900002; Thu, 16 Sep 2021 06:12:23 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0063.hostedemail.com [216.40.44.63]) by kanga.kvack.org (Postfix) with ESMTP id B463E6B0071 for ; Thu, 16 Sep 2021 06:12:23 -0400 (EDT) Received: from smtpin10.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 686E482499A8 for ; Thu, 16 Sep 2021 10:12:23 +0000 (UTC) X-FDA: 78593021766.10.ED9D919 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by imf27.hostedemail.com (Postfix) with ESMTP id ED0A570000AB for ; Thu, 16 Sep 2021 10:12:22 +0000 (UTC) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 80502222F7; Thu, 16 Sep 2021 10:12:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1631787141; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=zWeDRXiOmMDr4iY6pxliEs9Iiz1bYDucs2rkrdTBtAM=; b=oQdQOPlE6XNIUbVVOcC7RCdOGSgQ8vqnqvf946/LQN6EvWmUs2ygx21CPAFK9nzVST2lgf ivwn0Sf0IGWXXS8bouEmHWSFCIGvR09dXr5QbfwH8t284czQ0edSOJl/LlPiVJ0SZQW9+K mVcRiFfXbZnrE6KpB6dkqJLB1oQNJ6s= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1631787141; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=zWeDRXiOmMDr4iY6pxliEs9Iiz1bYDucs2rkrdTBtAM=; b=J5yUBidFwEHrVE6KcVdV/MHu+MHBVZKBolbK9f5wsYv+j2I/IOpJLWTwDH/k1EHaHG/AT0 OGDU71iL4i+cNOAQ== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 670CD13A23; Thu, 16 Sep 2021 10:12:21 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id 5PfoF4UYQ2FFbQAAMHmgww (envelope-from ); Thu, 16 Sep 2021 10:12:21 +0000 Message-ID: Date: Thu, 16 Sep 2021 12:12:20 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.1.0 Subject: Re: [PATCH] mm: add ztree - new allocator for use via zpool API Content-Language: en-US To: Ananda Badmaev , linux-mm@kvack.org, Vitaly Wool References: <20210916085102.19310-1-a.badmaev@clicknet.pro> From: Vlastimil Babka In-Reply-To: <20210916085102.19310-1-a.badmaev@clicknet.pro> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Stat-Signature: ef18yps3gmqteqba8wsb1s31zrzr1zo6 Authentication-Results: imf27.hostedemail.com; dkim=pass header.d=suse.cz header.s=susede2_rsa header.b=oQdQOPlE; dkim=pass header.d=suse.cz header.s=susede2_ed25519 header.b=J5yUBidF; dmarc=none; spf=pass (imf27.hostedemail.com: domain of vbabka@suse.cz designates 195.135.220.28 as permitted sender) smtp.mailfrom=vbabka@suse.cz X-Rspamd-Server: rspam03 X-Rspamd-Queue-Id: ED0A570000AB X-HE-Tag: 1631787142-78413 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 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?