Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp6560046rdb; Fri, 15 Dec 2023 01:56:05 -0800 (PST) X-Google-Smtp-Source: AGHT+IFCi3ahvSIMC6RuBS0Z03EJ6P2fU8H3uDv9DaQ/X9etuyYB8wr237evJG75McFqYu1GLGqN X-Received: by 2002:a17:906:3f19:b0:a1d:8c6d:bf04 with SMTP id c25-20020a1709063f1900b00a1d8c6dbf04mr2918814ejj.50.1702634165701; Fri, 15 Dec 2023 01:56:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702634165; cv=none; d=google.com; s=arc-20160816; b=h40K1iNOtvsyLyey6aFh0VMGlGGYgATClZywcnOZQa8tCvW4FZfVOg6IbL4EaYhnpQ Pbtb4Tvi1cViXlMCuQYXnvo95GwJgEKyG/y1zxMauTocMfttXj7tsK4ur3dV60RwXFlA Wn0oWWGgBuDYnAy2fln/Ssi2gRz1HOTULClzFIDUelPodeUWabRXqZeTdViWcyZ6nKiJ CV3i72KD7pIOfeLWU6fyhDHWny1MgMPHOssYq80Os6Iq6fW9xAyPCC/e13H5ALUlW3vv Iz8gsHnqYztsPLjqUXhNNAhKkA1gVa+sct2uBKIuzcrFas3G55p9tdzFKK9tF0oyQdjX Jyxw== 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=2jUFk+kWF85SdiIX9/ky14z9K9zUyz1416eEiXRguD8=; fh=3vTjrkprnFrzptVBzyoO+GXM/P77wycn7yHq9CF2NNk=; b=UlVhFJN1oF/OD8+3qvuY7l+f3+tB/J9uCeJtNB8m1VhcES07bG+S8qwDYrr77uy6Y2 nnMxl+l6w+K/6fjQrQoThUUtOAlkwHunQNttGqtfBag+zYGskg7Ebb0vyq1+wJJCB0Bw FHRwM6/FGdqFB7jyppyk5HlMXFTq7pPxaQB7hZuG8kHjjUj01oPnhyCka9qe2CBPAhzN BRhZ3D51VP5evBSd0ZUxdbk5pyIdUb6buBCmPAK9yfukQ0o12NdmNiKeMF6k4AT+OMQd ShVjW3vrHS2im/BAKc5tgex8hF9T6YqCxZl0ixWsr+G+ROVtT6HhKrsuwe/9PP3l1zbJ SH5w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=g96uBB21; spf=pass (google.com: domain of linux-kernel+bounces-703-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-703-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id y5-20020a170906470500b00a1d0e5a303bsi7217388ejq.234.2023.12.15.01.56.05 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Dec 2023 01:56:05 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-703-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=@redhat.com header.s=mimecast20190719 header.b=g96uBB21; spf=pass (google.com: domain of linux-kernel+bounces-703-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-703-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com 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 3E3C01F23FAA for ; Fri, 15 Dec 2023 09:50:51 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6F1FA18E2B; Fri, 15 Dec 2023 09:50:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="g96uBB21" X-Original-To: linux-kernel@vger.kernel.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (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 DA19918C1D for ; Fri, 15 Dec 2023 09:50:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1702633838; h=from:from: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:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=2jUFk+kWF85SdiIX9/ky14z9K9zUyz1416eEiXRguD8=; b=g96uBB21EwDdbbEK4/z1GRHQrUCoSFRAG50O0P4wm3rIrM3UW39f1xXk6f3+DTYZnvoDf1 4Cz3KxMfSpu8yQtDXRRDUMkWqxpJEwEpSZP5kZqPwVYRoKZg4U6SXFDLp4MUeZuhePy+TO 65Xn45uJLZN6Yb1t8nFBZRbfaUnKcdM= Received: from mail-yw1-f197.google.com (mail-yw1-f197.google.com [209.85.128.197]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-629-gkTnKiVcMbqsjdJ46jJbLA-1; Fri, 15 Dec 2023 04:50:37 -0500 X-MC-Unique: gkTnKiVcMbqsjdJ46jJbLA-1 Received: by mail-yw1-f197.google.com with SMTP id 00721157ae682-5e46cbc3d34so3535207b3.3 for ; Fri, 15 Dec 2023 01:50:37 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702633837; x=1703238637; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=2jUFk+kWF85SdiIX9/ky14z9K9zUyz1416eEiXRguD8=; b=n0U+co14RuBezm4+kNMD+wmgP4C9fo23im3gpjqxTALZEanAfJuAmzN16tsMlQf7XG 8n0GEtC3izgP4vusPR0x7R27gMAxMhy9VD9E3XhtT5SYlZOHWq3oDG8owDfWpRMLUCsU CKeBf/NcAwXKoTxdZablqtjzhTUbvA7Ja1FOGw3fNLLhqKQQX7sF6tOGdTOWCGIb/WI7 +rQM0Se9L8w6stxEZ0X6rqBeG37IZD3PW6kr2FTEQER7dtvajUPxplqNvj3zOB8DEWVj Ygh+xBNNqd4T1KncXpH0PEQQWjsTyCH667q4+YgAoEHGcqQx3ZbVrZs+6TTBilvkpiWJ 0Kag== X-Gm-Message-State: AOJu0YwAPERMAkzs7gyrqiY80k4zAaw+alylZE4wN52LTJwWv8xx44n4 Z6HZqmBPFcPH6lieFs9lIhASJliyLQxgZsWViTAGLiBFEqTL37BDhBnIgiW/WVQ+mhX3jb7aiLc xnbpL2P+eOr3aFEdbIb9i2AXbR45S3cwimYovyioo X-Received: by 2002:a0d:f842:0:b0:5d7:1940:b377 with SMTP id i63-20020a0df842000000b005d71940b377mr9389541ywf.67.1702633837025; Fri, 15 Dec 2023 01:50:37 -0800 (PST) X-Received: by 2002:a0d:f842:0:b0:5d7:1940:b377 with SMTP id i63-20020a0df842000000b005d71940b377mr9389520ywf.67.1702633836737; Fri, 15 Dec 2023 01:50:36 -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: Fabian Deutsch Date: Fri, 15 Dec 2023 10:50:16 +0100 Message-ID: Subject: Re: [PATCH v6] zswap: memcontrol: implement zswap writeback disabling To: Chris Li 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 Fri, Dec 15, 2023 at 10:40=E2=80=AFAM Chris Li wrote= : > > 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 a= ll cgroups allows you toachieve a similar behavior (only opt-in cgroups wil= l get swap). > > >> - the above approach however will still have a shared swap backend f= or all cgroups. > > > > > > Yes, the "memory.swap.tires" idea is trying to allow cgroups to selec= t > > > 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 acciden= tally 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. Yes - I guess like writing it onto a dmcrypt device with some random key. Nevertheless, this was one of the topics. > > > > 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-ca= se. > > 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. Yes, it sounds like a fit. What use-cases did you have in mind for the tiers feature?