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 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id D20A4C38A02 for ; Fri, 28 Oct 2022 15:18:57 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 1A7168E0001; Fri, 28 Oct 2022 11:18:57 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 157726B008C; Fri, 28 Oct 2022 11:18:57 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 01F4D8E0001; Fri, 28 Oct 2022 11:18:56 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id E77A76B008A for ; Fri, 28 Oct 2022 11:18:56 -0400 (EDT) Received: from smtpin15.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id 929E5140F00 for ; Fri, 28 Oct 2022 15:18:56 +0000 (UTC) X-FDA: 80070715872.15.5681421 Received: from mail-qv1-f44.google.com (mail-qv1-f44.google.com [209.85.219.44]) by imf15.hostedemail.com (Postfix) with ESMTP id EE073A0004 for ; Fri, 28 Oct 2022 15:18:55 +0000 (UTC) Received: by mail-qv1-f44.google.com with SMTP id x13so4252787qvn.6 for ; Fri, 28 Oct 2022 08:18:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cmpxchg-org.20210112.gappssmtp.com; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=YwOzV2q2gswd0J8/E9zZ/Pe+D1iExvQAsMOLRmOBDhM=; b=2aracjlQ9pAx4AjpKSSWB6a7/BcmnIszcNlW2iJJyRZOreEjkYFMrdN28VoRqMRomv 1AJd0nVrpgdaNwfOo2xUigg1fhf2JTme3muHqlvs2Ql6Brt9ynxjCBTWaBNycuSgjtgf yz6jaW3o0LGXdAxt5smSe8A1yYIwqYrEjguvdwnDeIErEMQeaAZx+Op+nXk4vZtmVJAD 9oGIFrPf4cD+peHoIqHAeQDN/8AMTM84VolEo7HwhalBhGdn9IXosp7IGieWpnbPGgeV MT9N2Qonsux40iwtBbXog8V+j21nnrBXyDbiusoX+4FsCV8a/5Pz/ceYTzbytYFzOUaq 5K4Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=YwOzV2q2gswd0J8/E9zZ/Pe+D1iExvQAsMOLRmOBDhM=; b=CqwDg28cFSxXqAaQgX4w7Oto6CNoRULZNOxbAi8zf+x4r1PaBgoedp+dOYhnx1FP7c vq3XZjfoNyw3VI7N+9BJ521zeHS4KoyMBBld02++B7ZgsoJUhgZ+XsizKOYqzzZIKSYf V37dH3PDrQMRbJNaN2h0YdLc3fKwMbNmmOL6rmprHpR3kJH1wqxcTmGKmuBZXubmQlaE rnpiTK0MJG2TaKyizIQv4u2vClsGB425Htj590/4dwtppULjQthnp7iJPCuA/wkZsiqA 27mJ65hrHZpNQvo6lywwvirktBtEbcBJFF/q9Homyl7AJfO5xYOxdgvYK39KdOVnSv/t 9bNQ== X-Gm-Message-State: ACrzQf2zx58PfAovtihtyXklmGcRmH8SGav79L+W+qf2USJ4S6KvAb90 DEkKGj+K1CdzSqmaHK/p4BUfxHaXJX2K3w== X-Google-Smtp-Source: AMsMyM4xR7bYLx8Vw62ow+SU54+zaofsnx2x0ghY+Rd87nETHNB4WM8AeqetSnCa89xWMfEd8gKnJw== X-Received: by 2002:a05:6214:226b:b0:4bb:6500:8f44 with SMTP id gs11-20020a056214226b00b004bb65008f44mr26151296qvb.109.1666970335104; Fri, 28 Oct 2022 08:18:55 -0700 (PDT) Received: from localhost ([2620:10d:c091:480::25f1]) by smtp.gmail.com with ESMTPSA id k2-20020a37ba02000000b006bb83c2be40sm3052174qkf.59.2022.10.28.08.18.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Oct 2022 08:18:54 -0700 (PDT) Date: Fri, 28 Oct 2022 11:18:55 -0400 From: Johannes Weiner To: Nhat Pham Cc: akpm@linux-foundation.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, minchan@kernel.org, ngupta@vflare.org, senozhatsky@chromium.org, sjenning@redhat.com, ddstreet@ieee.org, vitaly.wool@konsulko.com Subject: Re: [PATCH 4/5] zsmalloc: Add ops fields to zs_pool to store evict handlers Message-ID: References: <20221026200613.1031261-1-nphamcs@gmail.com> <20221026200613.1031261-5-nphamcs@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221026200613.1031261-5-nphamcs@gmail.com> ARC-Authentication-Results: i=1; imf15.hostedemail.com; dkim=pass header.d=cmpxchg-org.20210112.gappssmtp.com header.s=20210112 header.b=2aracjlQ; dmarc=pass (policy=none) header.from=cmpxchg.org; spf=pass (imf15.hostedemail.com: domain of hannes@cmpxchg.org designates 209.85.219.44 as permitted sender) smtp.mailfrom=hannes@cmpxchg.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1666970336; a=rsa-sha256; cv=none; b=ozlEOCyS/onJcFP41Dg1fGDtvEWx/SaTtbIezBKXiBoaHh/8vkQxyU0M/1JY857UEH1SvE 1jGeMuQkDZPe1ojmWwARWPKGZJeYKTqAsueOiphxHU/fDdoyr5TeefEg4Q/D/SL2VV9dWf 1lOK8FNsNqspWqDwJYOAxF7dokUF83I= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1666970336; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=YwOzV2q2gswd0J8/E9zZ/Pe+D1iExvQAsMOLRmOBDhM=; b=WTzC0nL+wMtMvcCMjcayegXv3Sh8rNxpo6pwJ0fCogNIpTLgFvpN6w8ogpxi+J9cmvK08S idZdXg5gk6gCSZcRpNYr12w/7zBD+9o/cLvGloutiCMqPE+vcyYnbz41RDMiUTkCsFO3H/ gAuYRpbbLTASQoS/iiAAbSuJ5Pe1j6E= Authentication-Results: imf15.hostedemail.com; dkim=pass header.d=cmpxchg-org.20210112.gappssmtp.com header.s=20210112 header.b=2aracjlQ; dmarc=pass (policy=none) header.from=cmpxchg.org; spf=pass (imf15.hostedemail.com: domain of hannes@cmpxchg.org designates 209.85.219.44 as permitted sender) smtp.mailfrom=hannes@cmpxchg.org X-Rspam-User: X-Stat-Signature: e17m6mf6codjkaayy9xpfjnr36nc8f8e X-Rspamd-Queue-Id: EE073A0004 X-Rspamd-Server: rspam11 X-HE-Tag: 1666970335-429732 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 Wed, Oct 26, 2022 at 01:06:12PM -0700, Nhat Pham wrote: > This adds fields to zs_pool to store evict handlers for writeback, > analogous to the zbud allocator. > > Signed-off-by: Nhat Pham Acked-by: Johannes Weiner > --- > mm/zsmalloc.c | 36 +++++++++++++++++++++++++++++++++++- > 1 file changed, 35 insertions(+), 1 deletion(-) Sort of tangential, but this patch highlights the boiler plate that is involved in supporting multiple allocator backends. We evaluated zswap with a variety of workloads, and found zbud and z3fold simply not dense enough for the compression ratios we would get at the higher end. They also seem more limited at lower compression rates due to the space they require for the in-line metadata. With writeback support, zsmalloc finally appears to be a superset of the others. I believe Google in their DCs is using zsmalloc exclusively, too. Android is using zram, which only supports zsmalloc. Given their impact on the codebase wrt maintenance and hackability, it begs the question zbud and z3fold are worth keeping around. Seth, Dan, are you aware of usecases where zsmalloc would be a no go?