Received: by 2002:a05:7412:ba23:b0:fa:4c10:6cad with SMTP id jp35csp53137rdb; Wed, 17 Jan 2024 17:03:48 -0800 (PST) X-Google-Smtp-Source: AGHT+IGzH4rrnA6A43t8oa1dyMMJ3l/PrQvnLgzv99IpVFiTQA9Tj7LIIMiEJ9f7UzjBtDcHksFg X-Received: by 2002:a17:903:268d:b0:1d0:6ffd:6e85 with SMTP id jf13-20020a170903268d00b001d06ffd6e85mr109918plb.125.1705539827998; Wed, 17 Jan 2024 17:03:47 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705539827; cv=pass; d=google.com; s=arc-20160816; b=Qdf/yHUBRHodwQrbQLzmm34CUAJE4KHPHoy1CAN8EOHY+1fszWL74bnxMrhYoh+aB9 ds7Jz3SjdgYtbBU81fnSyM9XouKTiaYDOTxopjSNTGdjr9TmstX35HiZrBaVFuoAp2zk uj9VcMpXvSZLIH9f9WPvJh73U+I2nGHsftVl43pjZ93Ob7K6WEdg1enqgQsE2Q0/jp1f vtizXMCf0YFpSijzVChNEpFLbWxqnE1m05BBOGYXmq+GI3rNV1+KAysRCqbUNX7ncWdR tx0aqT/7UQA8fcekCJGlpTfhezC0CW5whPKenBJUings2mPDNIIK4gjAhdk07ijJM19G GA/Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=rsLIlFzFyvOPLK2orpePH7+oGpdZ/DAUbqI9LqJinoM=; fh=o9jM6dHVkCSZXtG8mwTAzhM+Da81GC95VbCP7paW61I=; b=QPdiYRfAcv6oxZ52/IGpETbe4WS0vDSUqRDPyKd+G3xFGuJR/bmS+ZNP0w7DT7XVNI vPpJgDqi9C5MZk1noOWFyIBaXoH0SQDUSkS0OUTxj6xu+viG8/vske8RnJ8BoyQBAPXx Gz32TNMBWODFAdKgy/bEtWJskDgKaoB1eosidWlwzBVUuZBxyHXOlSK8sFEHQ+iAC0lv edL4DsEef7jNx1MHFjfnic/ycbs+Fc0dL7gRQWFiPZt7hYsbiVnfAaB2j0r1extzOZoz GTofs+Sd6xGgV2Zp2xpHfETPVE2JocClZ7vprgflpzs1F8eTeIKRVWOyoN6wLDi0D8Iu aoYw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=GpjSvDFe; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-29605-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-29605-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id o9-20020a170902778900b001d5c0c97f54si492530pll.433.2024.01.17.17.03.47 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Jan 2024 17:03:47 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-29605-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=GpjSvDFe; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-29605-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-29605-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id A39B428C830 for ; Thu, 18 Jan 2024 01:03:47 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7757F186E; Thu, 18 Jan 2024 01:03:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="GpjSvDFe" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9273A17C3 for ; Thu, 18 Jan 2024 01:03:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705539820; cv=none; b=IdwvFG9avSKvTf0xNgJd+dyImtuWfP/LaYX+MOTjhZXzftIQsa/B35/JRHU3UB5PxHsp/Dwk4BdOq2cr1EXsAayY+AiL2Jei1W7zb7NKugQi++10cgheKHRGEVttXfIRUXpJe6zbOefGWgJV8ABgQp/To77vpwDHRJfeZvSt0eo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705539820; c=relaxed/simple; bh=rsLIlFzFyvOPLK2orpePH7+oGpdZ/DAUbqI9LqJinoM=; h=Received:DKIM-Signature:Received:X-Gm-Message-State: X-Google-Smtp-Source:X-Received:MIME-Version:References: In-Reply-To:From:Date:X-Gmail-Original-Message-ID:Message-ID: Subject:To:Cc:Content-Type:Content-Transfer-Encoding; b=rEbc0yQWAy1EZcUOmGvLt8pNHLUVF8NTLQKh+PRY3BoDl6F3kX0oPnLWxctzxVs+dTcX8tpQ0oMXz0abAfxu9bX3NOGtCiGv9V5iNMG56zow/LHhbe+SuZfslqFTXMM55/lCl7zSum/5qYJXd+Iht0FWINj0qsVNRRgbZ3/qyD0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=GpjSvDFe; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5F09FC433F1 for ; Thu, 18 Jan 2024 01:03:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1705539820; bh=rsLIlFzFyvOPLK2orpePH7+oGpdZ/DAUbqI9LqJinoM=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=GpjSvDFe5lRAIeqHWDIBBWyHf1OHRGBDQ7bhub0QFDebAOsFzh70FEIcx5RvZfH7r 0nrxZf5lxFOg12w35V9l8CAAcii65TiwqLsjHboIQIyL0A6ayNFnV8EmgM2mUCr0bQ IXPM/FETVCxd9wW8cX437FFJJH8GPBRDyvb22PpHazj2UqBESet3Mw+uJuVJ0AS7Mu EXA/95xy7qAdjndGXlHoVu3xoSJP/IRgyGjl1bgqktOILtJluml4UXHcZl93orsFRl 7WyM637xCdThonphUZVjwykyzRc5iK1/AVMc47bro3GvDjXnG39RyNzRDxLUQBs6MP B4xWCc6EqRUmw== Received: by mail-pf1-f179.google.com with SMTP id d2e1a72fcca58-6daf694b439so6461164b3a.1 for ; Wed, 17 Jan 2024 17:03:40 -0800 (PST) X-Gm-Message-State: AOJu0YyLuhi2h/qFj7PEu0AcwCOz4RkGopKZFsfok1FDCAhPNolVBnks LkXVKFJ7gMGM8CHVqNd61GbeFwJd0cdF3wUZfWN8/K4UuWMCTxk8KypU1oFwJCMG88ur7UuXOUs zbK3D3wmR4iaY2Dcy0Tok9XHaYOyW9kI1Rgny X-Received: by 2002:a05:6a20:5530:b0:19a:4910:5716 with SMTP id ko48-20020a056a20553000b0019a49105716mr69166pzb.117.1705539819798; Wed, 17 Jan 2024 17:03:39 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240117-b4-zswap-lock-optimize-v1-0-23f6effe5775@bytedance.com> In-Reply-To: From: Chris Li Date: Wed, 17 Jan 2024 17:03:27 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 0/2] mm/zswap: optimize the scalability of zswap rb-tree To: Yosry Ahmed Cc: Chengming Zhou , Andrew Morton , linux-kernel@vger.kernel.org, Johannes Weiner , linux-mm@kvack.org, Nhat Pham Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Yosry, On Wed, Jan 17, 2024 at 4:35=E2=80=AFPM Yosry Ahmed = wrote: > Hmm I don't understand. What's the point of keeping the rbtree if we > have the xarray? Doesn't it end up being more expensive and bug-prone > to maintain both trees? Patch 2/2 remove the rb tree code. Just keeping the tree spinlock. > > When you say "eventual goal", do you mean what the patch would morph > into in later versions (as in v1 is just a proof of concept without > removing the rbtree), or follow up patches? V1 will remove the rb tree, but does not merge the rb tree lock with the xarray lock. Hi Nhat, > Hmmm why? Is there a reason to keep the rb tree around? No, not at all. Chris