Received: by 2002:a05:7412:ba23:b0:fa:4c10:6cad with SMTP id jp35csp404593rdb; Thu, 18 Jan 2024 07:05:50 -0800 (PST) X-Google-Smtp-Source: AGHT+IEhnyKXEB1j9xQZ17uR7hxdN0RGlkqHjxwEqzCS+VCuLfou3xzkVF6sXEF+GAkBFyAtMvMd X-Received: by 2002:a17:90a:fd07:b0:28e:86a3:11f9 with SMTP id cv7-20020a17090afd0700b0028e86a311f9mr824752pjb.34.1705590350175; Thu, 18 Jan 2024 07:05:50 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705590350; cv=pass; d=google.com; s=arc-20160816; b=DSEpDx630glM5PGYtU/qG8IG0PjK5TEH4bc4iCXWWNdaryR2T4jIxuKT+sak2Km/xr fnVezgKi56Sc4ZkI+GSbQHW2yaYp9f7gwF4ZSwlj2BG+YChl8dkUNjyTsXw/foQf/pvT bjtgIvTP+nhsgXCinE+kM/jSRBvrNGSBc2VQmXhL5tAyy7guQs4BLb/ee8QpIZNYSKzU otNXxQI6eIkPXQWuWURE0hk1tGPhNqdWSwf38QoVugYoMbKit+puq54IEtt6Xg6fT3y8 /6H0FMO6uLJqQQfEPoDGxldwQr3rDKHgq1eNCkDp3KbVcnmLoxyKRbAOKlvFWH0oQBhA hKYg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=Ai11Ox6ozQ1+i3t6b5EKtUxSZgIrQyAtf+uNDfugNVg=; fh=D1cWAJuGNmcJ1YPMTsJ2cSrPLj+UUf07JbtSjsTOM+8=; b=vhGEGLc6C8m2lc955xAQ/88LIynGRP1W3PcmsxhjQprwrmKoVAp4Hs9e0Jvbw3ibzF ajEryFajMJoG75rGrTXP3sC8twJYBs4WIvJ5/rxVfh60UfCf/revd/AaUfcmKQ+9Wqyf tfYo0jehMBAS+jNn7zb0hIRs72gX1FyrFzAbKNJeHOTRUX7W/SiI/wl1Ig0+byQX3gcS ivCFj8iWOSWOtYEk6ZhahBLWPtEFlN/+io3UOkPlwsQDrtXgH/3MtqEPZLX9//DUBc3v 40QnCU4cYwW99DcFsJPAOSmioga+hu9JriOSaOJD9nkQF+9LVjointabEEH4c9iculHN P5hg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@cmpxchg-org.20230601.gappssmtp.com header.s=20230601 header.b=zubU+iIQ; arc=pass (i=1 spf=pass spfdomain=cmpxchg.org dkim=pass dkdomain=cmpxchg-org.20230601.gappssmtp.com dmarc=pass fromdomain=cmpxchg.org); spf=pass (google.com: domain of linux-kernel+bounces-30236-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-30236-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=cmpxchg.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id f6-20020a17090ace0600b0028e8dace207si1595407pju.36.2024.01.18.07.05.49 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Jan 2024 07:05:50 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-30236-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@cmpxchg-org.20230601.gappssmtp.com header.s=20230601 header.b=zubU+iIQ; arc=pass (i=1 spf=pass spfdomain=cmpxchg.org dkim=pass dkdomain=cmpxchg-org.20230601.gappssmtp.com dmarc=pass fromdomain=cmpxchg.org); spf=pass (google.com: domain of linux-kernel+bounces-30236-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-30236-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=cmpxchg.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 sy.mirrors.kernel.org (Postfix) with ESMTPS id A6279B22DC9 for ; Thu, 18 Jan 2024 15:05:45 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8E8331E4B1; Thu, 18 Jan 2024 15:05:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=cmpxchg-org.20230601.gappssmtp.com header.i=@cmpxchg-org.20230601.gappssmtp.com header.b="zubU+iIQ" Received: from mail-qv1-f51.google.com (mail-qv1-f51.google.com [209.85.219.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 09FF939B for ; Thu, 18 Jan 2024 15:05:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.51 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705590336; cv=none; b=kb3PA8mOm/mrjXV8ACopjKplJANRsKFGy4SL4kL+MZmKeNmioomwN8cfOe8hkndwauFmoevtwpy5HbyTU5FEi6Cr7a9QodNQMTtZAeKQgxZe7Xx9nB0IqzixGguQ86lRxpzBjuI+p1fvclE+zJfpwQFYqL8KgcoiPi8yyLZ8s0s= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705590336; c=relaxed/simple; bh=5LIBRqIH9d38AqW642NsUE5T+QZsWHhG1v1PwOLgS+E=; h=Received:DKIM-Signature:X-Google-DKIM-Signature: X-Gm-Message-State:X-Google-Smtp-Source:X-Received:Received:Date: From:To:Cc:Subject:Message-ID:References:MIME-Version:Content-Type: Content-Disposition:In-Reply-To; b=Mqq1HtseD0htqiWQ8PDtoa7y/7r4CjVS1WVUJeshBKrBxprndBYD2Ih9kov+6mop0M3h9cmun4i6C0HnJsGQjBoLmoxjYJs+xVhEobIVaNDL8z6lIIblh9OzwNlZc712TxjZ1lBC4Qq7hnuLdQm7ehvSo62Mof2dMSEFlGM+JPc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=cmpxchg.org; spf=pass smtp.mailfrom=cmpxchg.org; dkim=pass (2048-bit key) header.d=cmpxchg-org.20230601.gappssmtp.com header.i=@cmpxchg-org.20230601.gappssmtp.com header.b=zubU+iIQ; arc=none smtp.client-ip=209.85.219.51 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=cmpxchg.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=cmpxchg.org Received: by mail-qv1-f51.google.com with SMTP id 6a1803df08f44-681397137afso48373066d6.1 for ; Thu, 18 Jan 2024 07:05:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cmpxchg-org.20230601.gappssmtp.com; s=20230601; t=1705590333; x=1706195133; darn=vger.kernel.org; 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=Ai11Ox6ozQ1+i3t6b5EKtUxSZgIrQyAtf+uNDfugNVg=; b=zubU+iIQwv0J7O/+W96ledxZsWpeD0tAk5w/kozk+NQReoYVwmgoSR5vV2ZcIGyHJx em8Pb4W5klaTCyUu11xj1zzHvFPrJoITkmJ60eX0hjZn/Hg6QnBOPpVJZKBniDz8CDgV sk2oipXHTt2eM4yT/oM+lA09EgiXtB/ipwErIcfyheOYIj5HPu0hb/ldT1K1OdV9r6Sy bR3wP3tTizA9AjnkkDLZb3tfA6wP61rx0y1uOMJDasuw7f0tCbSauA3wSdYsftnh9Onu FvJcRVg18VShBww/w5QhlUs/tcT8x2uFkovXOquBHSw8dfHaHw/JeVHbjUOy3IQPrxYd yqTg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705590333; x=1706195133; 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=Ai11Ox6ozQ1+i3t6b5EKtUxSZgIrQyAtf+uNDfugNVg=; b=N7/oj9rHnpeohEBsSJ51PAWiYMSnD1T+MyUxsxmy9YJSLb46Nm+HpL5OTDgmZtULoV 2TtErAWaLPjAwIrQydBKAAVWLQcVR3cTVWRH+ZWzolm/veJJse2JM57BdvtaLozOH1Ge yGoM9sH5EcBBNyvttGRfwrhfLrzR6piWQXayQ3ZTnkkv5UtI2FsKtGWWIHW2IY2tafFI j3OzzNA1mKTl2yELivXL2H2e1Ply1soeHxDSMriVqugIwGyK7cAxWUwOf6M7+NJ0sRig wKCHgp9MtMiwtqOPTQ0bTYYyuFsxPtI/cNYUbhOT61VbUDdYF0Op9DnFnnLJCzO2AjF0 5uGQ== X-Gm-Message-State: AOJu0YzDH+84vDV+uhvJNy/IdbXXCF6wpkTApmSM5xJlLuhQV+KjtZHE I1E5f+xaeGxJpTCr0g/ahVcCI8ZYsh/wXe5dMtxTj0jSiFOg0zl56t/rra/bZ60= X-Received: by 2002:a05:6214:21e9:b0:681:8739:9171 with SMTP id p9-20020a05621421e900b0068187399171mr952164qvj.119.1705590332640; Thu, 18 Jan 2024 07:05:32 -0800 (PST) Received: from localhost ([2620:10d:c091:400::5:c3fe]) by smtp.gmail.com with ESMTPSA id eb1-20020ad44e41000000b00680cbea3c84sm5968443qvb.84.2024.01.18.07.05.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Jan 2024 07:05:32 -0800 (PST) Date: Thu, 18 Jan 2024 10:05:31 -0500 From: Johannes Weiner To: Chengming Zhou Cc: Andrew Morton , Yosry Ahmed , linux-kernel@vger.kernel.org, linux-mm@kvack.org, Chris Li , Nhat Pham Subject: Re: [PATCH 1/2] mm/zswap: make sure each swapfile always have zswap rb-tree Message-ID: <20240118150531.GG939255@cmpxchg.org> References: <20240117-b4-zswap-lock-optimize-v1-0-23f6effe5775@bytedance.com> <20240117-b4-zswap-lock-optimize-v1-1-23f6effe5775@bytedance.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240117-b4-zswap-lock-optimize-v1-1-23f6effe5775@bytedance.com> On Wed, Jan 17, 2024 at 09:23:18AM +0000, Chengming Zhou wrote: > Not all zswap interfaces can handle the absence of the zswap rb-tree, > actually only zswap_store() has handled it for now. > > To make things simple, we make sure each swapfile always have the > zswap rb-tree prepared before being enabled and used. The preparation > is unlikely to fail in practice, this patch just make it explicit. > > Signed-off-by: Chengming Zhou Acked-by: Johannes Weiner