Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp2135361rwb; Sat, 19 Nov 2022 09:31:41 -0800 (PST) X-Google-Smtp-Source: AA0mqf6PtjQzRZ+poaAOiICyj+FY+bdeQKWzNasFIavp9Fya38VYGyGU8Gi5gIphOIpS+zkoYGXB X-Received: by 2002:a17:907:b606:b0:7af:ecf4:61c0 with SMTP id vl6-20020a170907b60600b007afecf461c0mr10227384ejc.178.1668879100840; Sat, 19 Nov 2022 09:31:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668879100; cv=none; d=google.com; s=arc-20160816; b=x0FhLbtC+I383tsj7WBlbss3GSZgveigHyvl3kynKhJwM5/NZv/cgx0W9+RiclWkUQ Sxg9xhZhwwCSSo8oZP0TpevcvYu4iYuTI9eMU4yU/71zkitlDuYEleLZDIWMpla0Cp72 u0/UJN5wkG0ESdER9FkZlN2AXsNWutjF5/Fwb0ek9Q4+5pTDqLniZV3VUfxvnn+MguAM 0mfRrAcBGG2GT6/nBM+7BOXm9clB46+UMLyerCQagBtfpka0JUwThjMc9AIDDGfIWL+R O76BUM5Qjjri18ITXKvvQTOgxBEDivICDnU5/8MLgm5nLqVe0yDIUcb41QIo+GMhmurq I3bQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=WSgz2nzJehsyTKRNYi+yiLi2lk7XHUxTG8Mz68ePwKQ=; b=betRwQCaBBBqoetZkRHdXIJOCYk805sIwjh01Ej/4tg1a+rHlfXrIlQLOdqaQWCUxC UoRF9BuCHaTCMnPUOJtXf29J+9hXxRLYSseSyfxuMifbWgKhB55i11FqaRjxgRtVGwEt e8MmPUODZz4CnuMCdtTunMnMBfWuLO09cwQeXBgKyxsLD1FBeFaPV0apsj36GK6ZpvHQ xT80SImQWLWS30agNF8Ko6/aruVEO06m0vVizkI0SeMPD84BcBJTYBAZX9y4lsblulAB KHcMhyVeRS39dasI/MPEl1bkiP7hO3jvwqGnD0grJYR8XsJB3yWhIEIR3+lHD8MBOc+d y4Ag== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cmpxchg-org.20210112.gappssmtp.com header.s=20210112 header.b=4eFIquBW; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=cmpxchg.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id xh13-20020a170906da8d00b0078e2828052asi5219758ejb.638.2022.11.19.09.31.17; Sat, 19 Nov 2022 09:31:40 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@cmpxchg-org.20210112.gappssmtp.com header.s=20210112 header.b=4eFIquBW; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=cmpxchg.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232969AbiKSQid (ORCPT + 90 others); Sat, 19 Nov 2022 11:38:33 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51068 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231626AbiKSQib (ORCPT ); Sat, 19 Nov 2022 11:38:31 -0500 Received: from mail-qt1-x831.google.com (mail-qt1-x831.google.com [IPv6:2607:f8b0:4864:20::831]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 90D1510B5 for ; Sat, 19 Nov 2022 08:38:26 -0800 (PST) Received: by mail-qt1-x831.google.com with SMTP id l15so5005282qtv.4 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=KtQax1QLaaO1Rzw2n2BuWN+SjZGnkZUt2HKCl/4+1UkEZOWTXeS1HKbyXaGULf2oMm zGvZiMCy5Xn6CO3UtS4ZywggCAhSGkJxFeljIHcfSUG18w7adX7O9EPgERkzpShQZEaN +NnOuDiBt0fwfyc9au7pKz0Uk0xp3HZu7/8NmUvlJbkh2F+PiqYxRvWnhCvjzjeNS8Tq rqpieePFNulHCW2cLOZ8sGdPaJR2hs/dnIolD9QEflgCsDH+g2Jwara7u5H3a66v6mlN t4hDO7rcOaB9oIitk6JKCJzyInbVRyYTCYWQp/91F2pUU39nh3SWKGFfolSdQmKKQYfl QZYg== X-Gm-Message-State: ANoB5pkrCRen4tmcWuTBlhROBnFfVbDTHhFvCdHNfJwvzd3EPjjGqMWh sfOctcoMWRDea7tQtQSxmDjR/g== 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> X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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