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 6642AC433FE for ; Sat, 19 Nov 2022 16:38:28 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 7DD6A6B0072; Sat, 19 Nov 2022 11:38:27 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 78E0B6B0073; Sat, 19 Nov 2022 11:38:27 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 62E2480007; Sat, 19 Nov 2022 11:38:27 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id 564326B0072 for ; Sat, 19 Nov 2022 11:38:27 -0500 (EST) Received: from smtpin24.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id 1B69E80D50 for ; Sat, 19 Nov 2022 16:38:27 +0000 (UTC) X-FDA: 80150749854.24.34C1FF9 Received: from mail-qt1-f177.google.com (mail-qt1-f177.google.com [209.85.160.177]) by imf26.hostedemail.com (Postfix) with ESMTP id 6CAE814000E for ; Sat, 19 Nov 2022 16:38:26 +0000 (UTC) Received: by mail-qt1-f177.google.com with SMTP id h21so5004541qtu.2 for ; Sat, 19 Nov 2022 08:38:26 -0800 (PST) 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=WSgz2nzJehsyTKRNYi+yiLi2lk7XHUxTG8Mz68ePwKQ=; b=4eFIquBW1bhKQKH+CUcHwN7HZI3d6/wCL5+hDv1zJxuiU0wJyXTorHUUzpCqkqTf46 QiA750fOxovYnTS5HF3WnoMemWVO7naSohuj4pfxEwHHFJZbZUp5mHDsHhc4Nq6m0M1O F7vi30ZPxVxC6FoDcDLLHnVE2rL1hTMSjnvACHnbFHRCPOnx2UfZuptm8QXFEuMteGwu yfEveAvHri24J6xLUnJB0/FO8K5wn7iAEgeCBeBLIs3EUMqv5k/cSjwKLlOPAjIfBrAZ 1+BqWy2AD250MWSAhu0RIPzUIDIsusYfqv2icQjYrdpexMQ7HmxaLBshr2Pt501TdeSg QLAQ== 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=WSgz2nzJehsyTKRNYi+yiLi2lk7XHUxTG8Mz68ePwKQ=; b=3g8v4fCc3Qij/PucjVO2Dz2IaW/ajFG02/n3iLdHigiGh6M0WdrtZWeAH+5jVWBKGW 5kYdgsAtqY+GtsBvB/JxTJwpsq9Oo2erIII9aZH9fDGzKImSOuAlp81Ijl3vzrzy7Bmn bQ7a4ejBEOAri9hdmfvXVzkp1aVpPrmNW2wbi1orSVFvD3eHiwSa1VL9NVXpjse0pmGq 9VXhcO3Gbxj8IVluLcJ2UkCvunyaKLXhQ7BylcAyTUJTeqJOME6vPAIO2j5gX4PTZMRl ZUdACmFm9N8TkDQAtgGw/5QODeCCfoA7O7pbEZi7JfGhYglcPDYe0hKSiFof4Nwqsj/r JsfA== X-Gm-Message-State: ANoB5pmcoahPFbtRVs2TFchpzG1EDpaj4JukEig9QwWPmtSaWwMF/2rw QsV00v/0Cf2ydPfhGaBTc0GqBQ== X-Google-Smtp-Source: AA0mqf6Y1pa1Wc0L1gf3W/Xl8P04bwsa9hyhvWfnERt68d2RkSmB2Gck70/uxCsfJD7tqzxkxAOiLQ== X-Received: by 2002:ac8:5992:0:b0:3a6:7a7:b39d with SMTP id e18-20020ac85992000000b003a607a7b39dmr10866276qte.193.1668875905566; Sat, 19 Nov 2022 08:38:25 -0800 (PST) Received: from localhost ([2620:10d:c091:480::1:bc4]) by smtp.gmail.com with ESMTPSA id f5-20020a05620a280500b006ce76811a07sm4877677qkp.75.2022.11.19.08.38.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 19 Nov 2022 08:38:25 -0800 (PST) Date: Sat, 19 Nov 2022 11:38:49 -0500 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 v6 4/6] zsmalloc: Add a LRU to zs_pool to keep track of zspages in LRU order Message-ID: References: <20221119001536.2086599-1-nphamcs@gmail.com> <20221119001536.2086599-5-nphamcs@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221119001536.2086599-5-nphamcs@gmail.com> ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1668875906; a=rsa-sha256; cv=none; b=ZjAL5ymWQX3yaAYeNgpbALc8X2QorYqsQ2z8d8blvzHXOy6RrL9UCcOxbte5ojCXp0Egqw l0gKRKSdRUnhXwzIrhm00uXkqxFoxg8Om3ReSHIcNtMKmNt1APG56xZt5C0C2mb26k2vvP /1z8b+AK6JyUWhFurYV5N6YAp23FHJQ= ARC-Authentication-Results: i=1; imf26.hostedemail.com; dkim=pass header.d=cmpxchg-org.20210112.gappssmtp.com header.s=20210112 header.b=4eFIquBW; dmarc=pass (policy=none) header.from=cmpxchg.org; spf=pass (imf26.hostedemail.com: domain of hannes@cmpxchg.org designates 209.85.160.177 as permitted sender) smtp.mailfrom=hannes@cmpxchg.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1668875906; 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=WSgz2nzJehsyTKRNYi+yiLi2lk7XHUxTG8Mz68ePwKQ=; b=C7kwO0MiWWNc4SLREO5vhWdP4IIR/+rZettIA9AUS6X3jAGRmafKVBFDss6Ngr1cVkHqcw ts+L2k32C91m1CpSlnWJEiZ2S1hUSAjpPT6G4zTBAj7QjiNSdWTipLz28G+jOY9XCqLNF8 7T0iDkNaxVQQLrpNpueCIlBhdlFdGmo= X-Stat-Signature: tkr16wbtyifqzt6kapz3riq5knisxzpk X-Rspamd-Queue-Id: 6CAE814000E Authentication-Results: imf26.hostedemail.com; dkim=pass header.d=cmpxchg-org.20210112.gappssmtp.com header.s=20210112 header.b=4eFIquBW; dmarc=pass (policy=none) header.from=cmpxchg.org; spf=pass (imf26.hostedemail.com: domain of hannes@cmpxchg.org designates 209.85.160.177 as permitted sender) smtp.mailfrom=hannes@cmpxchg.org X-Rspam-User: X-Rspamd-Server: rspam12 X-HE-Tag: 1668875906-329724 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 Fri, Nov 18, 2022 at 04:15:34PM -0800, Nhat Pham wrote: > This helps determines the coldest zspages as candidates for writeback. > > Signed-off-by: Nhat Pham Acked-by: Johannes Weiner This looks good to me. The ifdefs are higher than usual, but in this case they actually really nicely annotate exactly which hunks need to move to zswap (as CONFIG_ZPOOL == CONFIG_ZSWAP) when we unify the LRU! zbud and z3fold don't have those helpful annotations (since they're zswap-only to begin with), which will make their conversion a bit more laborious. But zsmalloc can be a (rough) guiding template for them. Thanks