Received: by 2002:a05:7412:b130:b0:e2:908c:2ebd with SMTP id az48csp126990rdb; Thu, 16 Nov 2023 13:58:10 -0800 (PST) X-Google-Smtp-Source: AGHT+IEDq+jb8ocIQ6iF+7tzTI8eyIMQpaQHSJJI6WDK0CDRvpzho/HdhZVzJf75ns8/JdmBz/Rj X-Received: by 2002:a17:902:f812:b0:1c9:fdbf:296a with SMTP id ix18-20020a170902f81200b001c9fdbf296amr3377811plb.8.1700171889656; Thu, 16 Nov 2023 13:58:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700171889; cv=none; d=google.com; s=arc-20160816; b=D+iZsQFJ3O9tI+NZtM8+HueEREM94yja/Qz5KSiebuBfXX34J5DBNejLpEacWc4Ojb /JSxBk6oC8EmVsaJeZYzEdFTQcSv/K5B6QE4I95tJAUJibB3hVRdrYGoQ4du5hF75BcI i/Dpd5eV1y7Z+hjq1rEHgsFkwgl/aKI+Ydde/FQZi8wPggoJVlVXEDvvmr2GaQnZnpzx QjNLaKO7J08g2ZzhNTM5+SIyDcRo498UvZeDaHIH6CbtTRoUSYWeEJjG1CWy/MTW6guX tnEzoycnPTauY26xUkgLuqlyUSg8COc7py2kl96fPd9nHqSonF8BDPscn1D5+R3agC97 m4sQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=C9RlePlXvZtD9ZcUlEtarYdOHARJjqyj2lMmxrk+hM0=; fh=GTsTIl5WkVrWFdt/nhYEQ+L1qCsZqgX8OdmVH4+mckE=; b=TkW0qauGY5LGgvvmNJStBoRK0TWHy0ToA7suN3SzEC9ynZ0pDJvmaUd7fLrVyjHOP6 SE3ErEnmfka/LbhEdGbY8rIZzP3K2E/+LtmMVs0jceLhcVERmmFwRII6yZsTiizz1sBE fFu6H4Nb2nW2nS12jhUuNCE3IzrXzqP6n4ACGgsq/VTUO+jygRpj3RaqRXRgSTHL/wxh E70UYYPkelZA7MUQjugz46QR8ArrmWZ5RHAknWggR5rb2/O6cAKuSH8LMMI2oKh6Mvb5 kGijTx76CcHsIb66gYaCEwk2ULBMvglRLSmcYhk/ZVTzA9iNLe/DPeAcbVWhm3wdfzNi Havg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=qc23cTZX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id ja19-20020a170902efd300b001bb9370760fsi313950plb.90.2023.11.16.13.58.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Nov 2023 13:58:09 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=qc23cTZX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 08FA28082861; Thu, 16 Nov 2023 13:58:07 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233460AbjKPV5z (ORCPT + 99 others); Thu, 16 Nov 2023 16:57:55 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47270 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232932AbjKPV5y (ORCPT ); Thu, 16 Nov 2023 16:57:54 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 78B95181 for ; Thu, 16 Nov 2023 13:57:51 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 152A3C433BA for ; Thu, 16 Nov 2023 21:57:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1700171871; bh=Y5SKnI8KWiPUqCAShlWpsNDBct9rlzSkcftG0eIw8Fw=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=qc23cTZXcHOVIEqQaLp6ZVyfhJoeY1rsCLG/MzL+cA5SJAemc9peMWygss3ZG+4Th gvJ0Gb8gqNgz4b3RpnG9fDGY8EhfQsWAuKlyoJeUn1WrCQDFzfTe9Jz1NNiHRXT+ZO LZXlYCQRacirg7KEs2svI+9DfBgQ6RiyzWupa2bU/XsDNpA+HDrVV3MtBv9V4Qcp52 5gKpNpQAxCTHGOL54Novu4ODcrEXzpM/sGSYiqB3EM5mtzL7YqcwcGm30TOzr0DpwU sQbxGj8omQHD2JiIurije/ApTrP5AFXpjuXQfc6nIfZI50ecPSRc8EqXph+CyqYmeY EwXBoGCIeSoSQ== Received: by mail-pj1-f45.google.com with SMTP id 98e67ed59e1d1-2809414efa9so1093277a91.1 for ; Thu, 16 Nov 2023 13:57:51 -0800 (PST) X-Gm-Message-State: AOJu0YzgWNkJEQRnyNrt35MfshBYtsRKgpnDaINYTzlOw/TOinqdlg3d Q++2GaQZEwe0A0opoYTJbg/lZaV9b1RsnRHiqnguVA== X-Received: by 2002:a17:90b:1e4c:b0:27d:5cca:9b69 with SMTP id pi12-20020a17090b1e4c00b0027d5cca9b69mr17169313pjb.45.1700171870173; Thu, 16 Nov 2023 13:57:50 -0800 (PST) MIME-Version: 1.0 References: <20231106183159.3562879-1-nphamcs@gmail.com> In-Reply-To: From: Chris Li Date: Thu, 16 Nov 2023 13:57:39 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v5 0/6] workload-specific and memory pressure-driven zswap writeback To: Nhat Pham Cc: Andrew Morton , Johannes Weiner , Domenico Cerasuolo , Yosry Ahmed , Seth Jennings , Dan Streetman , Vitaly Wool , mhocko@kernel.org, roman.gushchin@linux.dev, Shakeel Butt , muchun.song@linux.dev, linux-mm , kernel-team@meta.com, LKML , cgroups@vger.kernel.org, linux-doc@vger.kernel.org, linux-kselftest@vger.kernel.org, shuah@kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.3 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Thu, 16 Nov 2023 13:58:07 -0800 (PST) Hi Nhat, I want want to share the high level feedback we discussed here in the mailing list as well. It is my observation that each memcg LRU list can't compare the page time order with other memcg. It works great when the leaf level memcg hits the memory limit and you want to reclaim from that memcg. It works less well on the global memory pressure you need to reclaim from all memcg. You kind of have to scan each all child memcg to find out the best page to shrink from. It is less effective to get to the most desirable page quickly. This can benefit from a design similar to MGLRU. This idea is suggested by Yu Zhao, credit goes to him not me. In other words, the current patch is similar to the memcg page list pre MGLRU world. We can have a MRLRU like per memcg zswap shrink list. Chris On Wed, Nov 8, 2023 at 6:10=E2=80=AFPM Chris Li wrote: > > On Wed, Nov 8, 2023 at 4:28=E2=80=AFPM Nhat Pham wrot= e: > > > > Hmm my guess is that I probably sent this out based on an outdated > > mm-unstable. There has since been a new zswap selftest merged > > to mm-unstable (written by no other than myself - oh the irony), so > > maybe it does not apply cleanly anymore with git am. > > $ git am -3 patches/zswap-pool-lru/0005 > Applying: selftests: cgroup: update per-memcg zswap writeback selftest > Using index info to reconstruct a base tree... > M tools/testing/selftests/cgroup/test_zswap.c > Falling back to patching base and 3-way merge... > Auto-merging tools/testing/selftests/cgroup/test_zswap.c > $ git am -3 patches/zswap-pool-lru/0006 > Applying: zswap: shrinks zswap pool based on memory pressure > error: sha1 information is lacking or useless (mm/zswap.c). > error: could not build fake ancestor > Patch failed at 0001 zswap: shrinks zswap pool based on memory pressure > hint: Use 'git am --show-current-patch=3Ddiff' to see the failed patch > When you have resolved this problem, run "git am --continue". > If you prefer to skip this patch, run "git am --skip" instead. > To restore the original branch and stop patching, run "git am --abort". > > I was able to resolve the conflict on patch 6 by hand though. So I am goo= d now. > > Thanks > > Chris