Received: by 2002:a05:7208:70d5:b0:7f:5597:fa5c with SMTP id q21csp117112rba; Wed, 20 Mar 2024 12:42:09 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCV2AWpN3L3pJTTL8kZNMLYMm72ildjwNJqPiSewWsy9eNh01wPCQwwBBqrqClzXJWx+3Ex7cdRX+1IpbpGR6WbKZ1WNStfags7fwZp9uA== X-Google-Smtp-Source: AGHT+IGHaGp7XI3FGgehcmJpaNx5+dDaSsXUWh+QUK8RbINoataKO8ssiPq4EDGLbZD3FjrNQCqH X-Received: by 2002:a05:6402:4348:b0:566:d27a:2ab5 with SMTP id n8-20020a056402434800b00566d27a2ab5mr12739202edc.10.1710963729451; Wed, 20 Mar 2024 12:42:09 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710963729; cv=pass; d=google.com; s=arc-20160816; b=pI/molGKGn6t9fWxGU9+Q2ydtruezTG0gZbtnDurfRlf/oXaKpQ8MpJLX+Ofj+eBM8 CZhz/XounbQsfLWBvkBybxvQw6q0PXTIgxP8TvVzHva86RcTD9n81X8MWV9nuom5yjoR cQtsM0U0Z3Z3g5W8r1DF/eEfOAW6p52YJ1C4zeIBYCbtRTfxFmXx1W90uxU9qEmWBhyD trLIgDaO0go52n7lZ/n3VXroNhKEu+5thad4xOt097b/ZMCsNjcp3LDeH0lqVaM/MiiT 8zmLxqkIa7p3wA3rF4gHSIEwjJ3pzxk2ZPaeUHAgZ6CwxG7PwbnDUs1D9CpzR2BofS/C oYDw== 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=w5Yuh9BjXp5GoGMUuDtJBbyXbQeDSwEhm62Pk+ikl2M=; fh=uv1PyuxLdw7TauK1KanyL02e2GMKQPxs0xpeWSueQqg=; b=1KYPM7M6scYUlAkN03q9K9RB6XbXSOPEEsrlwtGTyoXR21T2y2kmDJ4Kdp9oGKRa1j q/L5hgyOMsH+m5vy0LyFpIQN8QYY2tfGl2EXQdf16UcK37uzGfHsshh3HvNEWNw27F2H PnPK/9R+IpxD9Qim9XzZ5phbkeReMkfDRMtHXD4FhwXwvzuwDDLnLQu3pSCY3ew7UPYr HzHzJlb5e/PAz0387ZEXUZQNF9Y/gYN+enrNg6nTrN9fF+kCIH9uYjlDt2wcaC75z7du Uyt3jnLOkN0/dio/eu4zX9honp/mdfTa11xrJ68aVExTn35Bt0qbmKxNulHfLkKy8wF1 JGeA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=B2Fc3H+J; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-109361-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-109361-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id n8-20020a05640205c800b00568b450fcd6si5485401edx.321.2024.03.20.12.42.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Mar 2024 12:42:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-109361-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=B2Fc3H+J; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-109361-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-109361-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 am.mirrors.kernel.org (Postfix) with ESMTPS id F20811F232A0 for ; Wed, 20 Mar 2024 19:42:08 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E179785654; Wed, 20 Mar 2024 19:42:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="B2Fc3H+J" 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 0CC3653E2C for ; Wed, 20 Mar 2024 19:42:02 +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=1710963722; cv=none; b=gf5RyfgCb96jXt9qZJNoOucKg5cZzMPqYHuNhWEWeBUuHTVH0FoKL6KVTYac62XdfXvnJd41lUoODif5OzkvA8UJ7EyXhr/eqz5jFPmxRYdAtEI+PnPYBd4oeaSPI4bnI6naUdysosBnWWavKUmQbAp4LiTgyzAcq405ocjxabE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710963722; c=relaxed/simple; bh=w5Yuh9BjXp5GoGMUuDtJBbyXbQeDSwEhm62Pk+ikl2M=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=tE9kuGmu0wg0Es4ywsn8k93hHvd+74XsqAdB6h97vvu7eT0TPfmDa0DoIaN8Fyaih9yhB+sk/blPECKB24N2km5L/62wTpAU4w3Gdlrs7fHFYVa+Yqepv5MIg83bvH6/tBjhR8tLXVE95ncciQvOuLoGXoWaWQo4gfuklExyD4Y= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=B2Fc3H+J; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id D5F06C433A6 for ; Wed, 20 Mar 2024 19:42:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1710963721; bh=w5Yuh9BjXp5GoGMUuDtJBbyXbQeDSwEhm62Pk+ikl2M=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=B2Fc3H+JI069j5/n3AEGv4loJnpcmwuGOkRsr07w/GXrXu4bZOdQVKk/P/UU/Kp9B lDUkMk6Lp110B590dZ3vyefynuj8cDOWkDO+eHGdR3fo1WbN8Us3P+iK4kycU26O8h d6LYf7vn+3wvm/DJkNFmETNAWDGmObhomjp9GFktypi6ZEoiR7v0IB1PKwBgEX0sO+ SHdUkooG3pG5BL2FlUO7FPY6L0yEfLH8RFHOWRTktD4UXYQ7/4hODxz+ft+jr+uABP 8D6LSTe2knqVbUq8yAYyP0FoKy9LqiAZSjwxeSlZaX355FE+TNzi6HVNa8zY/tJFi+ prYCrtQ9EoCmQ== Received: by mail-lj1-f174.google.com with SMTP id 38308e7fff4ca-2d23114b19dso3351151fa.3 for ; Wed, 20 Mar 2024 12:42:01 -0700 (PDT) X-Forwarded-Encrypted: i=1; AJvYcCVWq5OPozFQsfCqYfoTtX7RunF2V4yLzKoFSVh+tTLU/fs9G+7FbNCplVx+f5E6KP5mOcxnCBRXcxywIj34opY07VDkTeFNYmY7DCvL X-Gm-Message-State: AOJu0YxS+BGVNjMYUSsf6xuLKi1lOsjorD3hl/u7D7QmwWGpz5S9i9wx MqoyzadGij+HXfR496x2wbxDZKU2x3UhaBNJsHg4PdeX/GqxLyI2kpshMgEY9lYD+7ulssBO/gM TY/4YOD6Nqsq1GFi/x+qCGG+u2w== X-Received: by 2002:a05:651c:820:b0:2d4:7532:92f2 with SMTP id r32-20020a05651c082000b002d4753292f2mr10587672ljb.45.1710963720595; Wed, 20 Mar 2024 12:42:00 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240319-zswap-xarray-v7-1-e9a03a049e86@kernel.org> <20240320100803.GB294822@cmpxchg.org> <20240320192558.GF294822@cmpxchg.org> In-Reply-To: From: Chris Li Date: Wed, 20 Mar 2024 12:41:48 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v7] zswap: replace RB tree with xarray To: Yosry Ahmed Cc: Johannes Weiner , Andrew Morton , linux-kernel@vger.kernel.org, linux-mm@kvack.org, Nhat Pham , "Matthew Wilcox (Oracle)" , Chengming Zhou , Barry Song Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, Mar 20, 2024 at 12:34=E2=80=AFPM Yosry Ahmed wrote: > > you can expect it to be coherent. > > Fair enough, but don't we still need a barrier there? Couldn't some > initializations still be reorder after zswap_lru_add()? I am under the impression that the lru list handling function already handles the barrier. If an explicit barrier is needed, wouldn't all other lru callers have barriers sprinkling all over the place? Chris