Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp6328399rdb; Thu, 14 Dec 2023 15:23:09 -0800 (PST) X-Google-Smtp-Source: AGHT+IEcaRulAMUgzeTVGg0Wc3zjgOGy5hPmxgznLNXoztG4c36fXP+9aQ5Ftel9+zIDoiTYIegU X-Received: by 2002:a50:c908:0:b0:551:12f7:84e with SMTP id o8-20020a50c908000000b0055112f7084emr4279073edh.28.1702596189006; Thu, 14 Dec 2023 15:23:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702596188; cv=none; d=google.com; s=arc-20160816; b=V7xc6fsQV17pJVRzpFPb7c+NaInfKfyo0CvBLeLL4UvikRxUM7AD/qqX8K5i+eA0lr y7APp5G4mJ0ebCRUgJIYXuDIqi8bChdl87zzVsTj/gKHN0bfkhzh7J9m7x91CbUkmYUd bxQqM/NgMpiLZi0Ki1i6jSixCzvCooxhmB+XLsAGe3KYfsLsgmdJ8yC8JXCurzQSMjWW xnlzSbig5XLy0lEp/iiCOGlK5kmiB0z2ENZNh/dX4vL2yfCsqbcCHqXV08ZlJNy8GG73 xf2FNUttzKXgdJ1wrukZnG6oj2XUG5ZqgciZz1aLM4/rfO0uy3E/q6ljzC0PAMtxR0yi zRzA== 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=1/u39glqJuuCFGGeFe99yJG58ZnMFafYYR4VOOatUWQ=; fh=StDSCCBzzNWsxniIsU/G37coQX+k2Pp9q8FMDGMJui8=; b=O81rFIcX4tBvzEq6gtA7D76KPAE74kHmE/iD6XB+tkcvQeFG/wQetOOJt4jjpaQqvZ DKz/I3nd9VeHMlhE4RmzS0Q9r+JzwnUZW+KxaxDAQBIaSpEzpwUWVTv2hJsBqTVNH/oF rEQwYPNIy4wOWtzuzuA4SemonXubZAGXeWTTvR9TY3VK5lLmkT33Mp4C4PElVlryEGbs 3H+qvHuSyI7sEiF+bgTqDmZRxlpwyg+XgYQ5W3brjQBknCIkgc4qurrGLev1WilI91Pb Su7q9zn0sVVPsDzjxSPQL8dxHLPkmzQd75rdbh3egwg8lujEU4wN6lGF5147OMOj3f8E hCJw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ZigrrUym; spf=pass (google.com: domain of linux-kernel+bounces-242-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-242-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id z11-20020a05640235cb00b0054c392acb7asi6686122edc.281.2023.12.14.15.23.08 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Dec 2023 15:23:08 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-242-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ZigrrUym; spf=pass (google.com: domain of linux-kernel+bounces-242-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-242-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 am.mirrors.kernel.org (Postfix) with ESMTPS id BFE871F225BD for ; Thu, 14 Dec 2023 23:23:08 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5A6482DB67; Thu, 14 Dec 2023 23:23:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="ZigrrUym" 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 8AEBF6C6C6 for ; Thu, 14 Dec 2023 23:23:00 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 20794C433CA for ; Thu, 14 Dec 2023 23:23:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1702596180; bh=1/u39glqJuuCFGGeFe99yJG58ZnMFafYYR4VOOatUWQ=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=ZigrrUymbeTlt6AU1HRAXv7jMBpQWvb1gcpRzKPyaqWPjtK/ZukvpuBH0tx//B5V2 xGGdRQq/UJU8pCYSjQoBtOUnm8yqaYPlQXHninxh7G38lN+ORxGkmOh6VW3p49RE3/ cl9wP/hiz8FsCssjpPtCCdBH7MJn3dTY9y6b52jMNrTjoegH+YCJK4rjX+uVmCB0xK Rvaz8t6iqG+VJA3+L+mriVnrX6buOTQvFQzX6IDvHQYR4oqdliZaR0avGpxBLl00YM ua6J+41beCJ7f57ICKjAZgzd6hVo1NS/8bLApsuDaH1Fcz/RMtrS9q2L5Z4ntkx45M K3AXSTSUzFe9w== Received: by mail-pl1-f181.google.com with SMTP id d9443c01a7336-1d0c4d84bf6so251625ad.1 for ; Thu, 14 Dec 2023 15:23:00 -0800 (PST) X-Gm-Message-State: AOJu0Yz5ECtun8T8gNMNvOpXL+QvaPn1BbKzO69LdePDQt30bifd6T03 VzpARQvCvqvejib9gZ3jhe/NNiQcy0aUe3OhwMH5Zw== X-Received: by 2002:a05:6808:1310:b0:3b8:b063:9b56 with SMTP id y16-20020a056808131000b003b8b0639b56mr11308602oiv.72.1702596158708; Thu, 14 Dec 2023 15:22:38 -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: Thu, 14 Dec 2023 15:22:27 -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 Hi Fabian, On Thu, Dec 14, 2023 at 10:00=E2=80=AFAM Fabian Deutsch wrote: > Yep - for container use-cases. > > Now a few thoughts in this direction: > - With swap per cgroup you loose the big "statistical" benefit of having = swap on a node level. well, it depends on the size of the cgroup (i.e. syst= em.slice is quite large). 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? > - With todays node level swap, and setting memory.swap.max=3D0 for all cg= roups 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 al= l 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. Chris