Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp6554250rdb; Fri, 15 Dec 2023 01:41:02 -0800 (PST) X-Google-Smtp-Source: AGHT+IE7VRP4Ndq3MmTSUlyDJgeeqsXJh9XfpyOksyYss1fCdNlHUqmSYJuiCbpvlIxoJA7qyGTB X-Received: by 2002:a05:6214:1149:b0:67a:1d83:66ef with SMTP id b9-20020a056214114900b0067a1d8366efmr10332734qvt.6.1702633262486; Fri, 15 Dec 2023 01:41:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702633262; cv=none; d=google.com; s=arc-20160816; b=o+rruNV0PZwBPp7QBiFNePFcPK8zVjyd5Euu3Q4rrGbYhQjQUW9qCHHMpO64ww440d nbkZMAQPRW8AcvkT03OzsqkYAVFYsSObiRH6afeFut5E5C/lPOZYK2WM4suEyU+wnoYx 2La3TMd16jq9E27DglQgwJ0RCsqSOOhYXddEG+CcM23VdT0EQ53CVTTIy+LUKSkoVjtl 4HpJ1okGWyEvUR66DeZwD5mAI04kSyiUF7nCgkRA8Ff4U8s29RN4xKZNPmSFVzbSvb7N LurGFsZGAE4SwwidXDSWT6D8gQKArwmGPMGFxPj/844C+7e3DjZRe7vq0TzUHOFDMqNx KwWw== ARC-Message-Signature: i=1; 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=B1jVCgUdR0dEGHelPgDtGvwgu8YigQ5hzfeCXGXgKnY=; fh=mGgNdHwVz+yNq14RM4/HNzKcjZh+gxz7LLUmZzR1H0U=; b=0D1E3HtinH3pkDYB3Qo8T/cWR816RPlVsT6oe2apl+eVj5cIZEUM2E+ubWuq8uJwkZ +taqgGGwTaG9dIm70dVFveVX3OWhuwwmtuwpnP0/LnmlB8lk3XFrdMPBdfkMUWtW28zh nP+92G5usUTtLQRAOrROuCkZucJRZ3duM/9crxsGvwla6tOPvIavTFtkRYiCMteKoaBZ l+16CIcxGEb86ZRHPcyQZK8qtnEISdPOp2n9yi2MalU2Y0XJrckj7qlyhIO9mrN7+w5D B1KRprtjjaZiNlUNeWH5Lk2Mm80s1DKZt0jAA2HluHU6FrRz/m67OuvRZR495f98kFps APrA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=KHhvqwen; spf=pass (google.com: domain of linux-kernel+bounces-695-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-695-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id l5-20020ad44d05000000b0067ef267d46fsi6630938qvl.457.2023.12.15.01.41.02 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Dec 2023 01:41:02 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-695-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=KHhvqwen; spf=pass (google.com: domain of linux-kernel+bounces-695-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-695-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 405C01C22880 for ; Fri, 15 Dec 2023 09:41:02 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5306A18AE1; Fri, 15 Dec 2023 09:40:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="KHhvqwen" X-Original-To: linux-kernel@vger.kernel.org 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 8A6E7182C3 for ; Fri, 15 Dec 2023 09:40:46 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 25105C433CB for ; Fri, 15 Dec 2023 09:40:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1702633246; bh=vVpmxdeUmcOhDj8UvS9uojHcu7m53pDfJgItKw2MeOo=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=KHhvqwen/RLPuNr7ABccWxNkon+Qc3eIA3eWWTIFEDdt+p4s2TPl5UehB1jzPvSkt LvAxBBuSG7gBt3IL73uYGw/lazeTUyF7xBBKdyH+WiXu+hS2JCqdEHQSoUoAEcx6Gq qub5vDlyMwDe65hSDU60v6RIVUdSXcVrfTaXhF8UlGmcomUR/lGIaChWuCqxkIjx5N hgjoRpbC32IvMjdmQKOZGnqDHygLrDridtpPDAkTjgGwVG8mMrCpTmZLqalC1QjtIY lS11o6sQqNkFA4REuMVYMvNC8bZix0+nzd4+sMwgTFp/HOqmMVmzc1SJGdJnaypePY Ju3gWJ66qpEXQ== Received: by mail-pf1-f182.google.com with SMTP id d2e1a72fcca58-6ce72faf1e8so198648b3a.0 for ; Fri, 15 Dec 2023 01:40:46 -0800 (PST) X-Gm-Message-State: AOJu0Yw/OrOuqYddyz52m0+IT4MUtyCyPrGHDRMFXo2MKYMQaiA0tb0s F/mFuSDRNZJcoV4AaiWWQ0MD/j8W082DTu5n8cuPcQ== X-Received: by 2002:a05:6a20:77a9:b0:18f:97c:8256 with SMTP id c41-20020a056a2077a900b0018f097c8256mr5200831pzg.96.1702633224789; Fri, 15 Dec 2023 01:40:24 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20231207192406.3809579-1-nphamcs@gmail.com> <20231209034229.GA1001962@cmpxchg.org> <20231214171137.GA261942@cmpxchg.org> In-Reply-To: From: Chris Li Date: Fri, 15 Dec 2023 01:40:12 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v6] zswap: memcontrol: implement zswap writeback disabling To: Fabian Deutsch Cc: Yu Zhao , Johannes Weiner , Minchan Kim , Nhat Pham , "akpm@linux-foundation.org" , "tj@kernel.org" , "lizefan.x@bytedance.com" , "cerasuolodomenico@gmail.com" , "yosryahmed@google.com" , "sjenning@redhat.com" , "ddstreet@ieee.org" , "vitaly.wool@konsulko.com" , "mhocko@kernel.org" , "roman.gushchin@linux.dev" , "shakeelb@google.com" , "muchun.song@linux.dev" , "hughd@google.com" , "corbet@lwn.net" , "konrad.wilk@oracle.com" , "senozhatsky@chromium.org" , "rppt@kernel.org" , "linux-mm@kvack.org" , "kernel-team@meta.com" , "linux-kernel@vger.kernel.org" , "linux-doc@vger.kernel.org" , "david@ixit.cz" , Kairui Song , Zhongkun He Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, Dec 14, 2023 at 11:42=E2=80=AFPM Fabian Deutsch wrote:. > > > > Just to clarify, the "node" you mean the "node" in kubernetes sense, > > which is the whole machine. In the Linux kernel MM context, the node > > often refers to the NUMA memory node, that is not what you mean here, > > right? > > Correct, I was referring to a kubernetes node, not numa node. > > > > >> - With todays node level swap, and setting memory.swap.max=3D0 for all= cgroups allows you toachieve a similar behavior (only opt-in cgroups will = get swap). > >> - the above approach however will still have a shared swap backend for= all cgroups. > > > > Yes, the "memory.swap.tires" idea is trying to allow cgroups to select > > a subset of the swap backend in a specific order. It is still in the > > early stage of discussion. If you have any suggestion or feedback in > > that direction, I am looking forward to hearing that. > > Interesting. There have been concerns to leak confidential data accidenta= lly when it's getting written to a swap device. One common solution is to encrypt the data written to the device. If someone gets hold of the swapped outed device without the key, they can't get to the memory data without the key. > The other less discussed item was QoS for swap io traffic. > > At a first glance it seems like tires could help with the second use-case= . The idea is that you can select the swap tiers list for each cgroup. That way you can assign different swap QoS to different cgroup. Chris