From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id C1734C4167B for ; Wed, 6 Dec 2023 18:16:11 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id F12536B0074; Wed, 6 Dec 2023 13:16:10 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id EC2A66B0075; Wed, 6 Dec 2023 13:16:10 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D8AD86B0078; Wed, 6 Dec 2023 13:16:10 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id C72156B0074 for ; Wed, 6 Dec 2023 13:16:10 -0500 (EST) Received: from smtpin23.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 1C7D01201F7 for ; Wed, 6 Dec 2023 18:16:10 +0000 (UTC) X-FDA: 81537197700.23.B0B8AE1 Received: from mail-io1-f52.google.com (mail-io1-f52.google.com [209.85.166.52]) by imf09.hostedemail.com (Postfix) with ESMTP id 565C4140037 for ; Wed, 6 Dec 2023 18:16:08 +0000 (UTC) Authentication-Results: imf09.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=gELYeTcj; spf=pass (imf09.hostedemail.com: domain of nphamcs@gmail.com designates 209.85.166.52 as permitted sender) smtp.mailfrom=nphamcs@gmail.com; dmarc=pass (policy=none) header.from=gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1701886568; h=from:from:sender: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:dkim-signature; bh=gWAuKbmc4GqDy2A6rXUBPXUJNeUa8820dSUeOYSYNt8=; b=fnL5l1X30qGV2k+1A1ds5A7drjDQvWhrUeywKcPwUiRu1Ijkf5saMxFzARfw+ihKSsoYTv mv0jQXa2r+LqG/jrvdgU6edFJT9Rs1oSTpbbgz85OhZWHJp4UU1hxyQgf9MdmUgB76bwPE eV0RvxukJLMgkood6BOldzsFU3X5Nlw= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1701886568; a=rsa-sha256; cv=none; b=gw4Alm/bbpksU27cckq+Pl1lu5qM33f9cPviviB8j1p88VAbn8vX/IptqmJTfh6D/OF2Jd cFCwYzRjje9gHCKeoUKdag7vme5pAtckLLby/YU6j1TJzoiTJ5elaYaLEYpM+wYODxWHTh xHJp3u+Ge/sCnBAlR+jzThGD9JEEDEk= ARC-Authentication-Results: i=1; imf09.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=gELYeTcj; spf=pass (imf09.hostedemail.com: domain of nphamcs@gmail.com designates 209.85.166.52 as permitted sender) smtp.mailfrom=nphamcs@gmail.com; dmarc=pass (policy=none) header.from=gmail.com Received: by mail-io1-f52.google.com with SMTP id ca18e2360f4ac-7b389399dfdso2252239f.2 for ; Wed, 06 Dec 2023 10:16:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1701886567; x=1702491367; darn=kvack.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=gWAuKbmc4GqDy2A6rXUBPXUJNeUa8820dSUeOYSYNt8=; b=gELYeTcjO2zZFsn0/ST7T3N+GVgJrtlAWy+ig+EOp7JJftcxZmMueLs95B48/4KnGw 6xpMQKXrQnciYymVZxbvt0gUPA0aRiXpHkIRntMcTwvrPPABdNBhyvG34KbBsMLN/fox pf9IW7LuLQkw6y6ecuGlkeIx3X5TnEu2V4qSXOuz0HhD+0N5eSpc8Jl127XkWqb8bauV UklSHuOO6utpaFlXOOoYZ5ENvkHabY1/Ys4yPNgHky9yd48JKfSEpYX+AL/sSPmqwH1/ GOpFEyx0vo7SMbTgDAZrkP2v2/+C9wMXbVGgbr4gIGAPEPDB2LZrBcS3vooAaTmXFj0/ Bwnw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701886567; x=1702491367; 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=gWAuKbmc4GqDy2A6rXUBPXUJNeUa8820dSUeOYSYNt8=; b=TYXldm0u4jg44S64ie0y4cu9bY6mUbuLXpDc/fhYW1dVWj3m2ojCDdtNrQrjvpK3Aw ujRB5GE5Eiy4MUe67/OKfgtHHXXEQxOFJZBYXpirkarmkOlrFBCxDeCXDxXzga4fsd3P kSB7jqFhks/gvwlt2J9QDYeIs7efMc3NVaAqEm2RBi+4n0W6aKPcQD+YOwy+lT0T3nIN zUMjKGN4dQtzvw+sUKLhDZClpkuqvEzc6lGmzaTmRY0LUbCTqmMt6U5rFMSnBQfMHlk+ kVUI54pZOkOcUblxFQbN2tsZICZcYpR3Q66N0GfrqbseB7zBQSOm507Pj5KerJasIFjk d76g== X-Gm-Message-State: AOJu0YySnVlX13+rKzYTHUwrh+qcgSBOSRA+gemfiYxagGzU3tNPoQ6j OMm0+ln/U/ixoXCSLHBJo3eatBLpfyBJKuWgvW8= X-Google-Smtp-Source: AGHT+IFKnF3lw3Ax+avLPvnMd5vBZM4imRq0qasjFDFvW3fh5H8dgaFBeFrpeGdZS7/1eSisn26RBDrtRJrc1qJUFxw= X-Received: by 2002:a6b:ed19:0:b0:7af:fff7:c3f8 with SMTP id n25-20020a6bed19000000b007affff7c3f8mr1385949iog.15.1701886567239; Wed, 06 Dec 2023 10:16:07 -0800 (PST) MIME-Version: 1.0 References: <20231115172344.4155593-1-nphamcs@gmail.com> In-Reply-To: From: Nhat Pham Date: Wed, 6 Dec 2023 10:15:56 -0800 Message-ID: Subject: Re: [PATCH v5] zswap: memcontrol: implement zswap writeback disabling To: Chris Li Cc: Yosry Ahmed , Andrew Morton , tj@kernel.org, lizefan.x@bytedance.com, Johannes Weiner , Domenico Cerasuolo , Seth Jennings , Dan Streetman , Vitaly Wool , Michal Hocko , Roman Gushchin , Shakeel Butt , Muchun Song , Hugh Dickins , corbet@lwn.net, Konrad Rzeszutek Wilk , senozhatsky@chromium.org, rppt@kernel.org, linux-mm , kernel-team@meta.com, LKML , linux-doc@vger.kernel.org, david@ixit.cz, Minchan Kim , Kairui Song , Zhongkun He Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 565C4140037 X-Rspam-User: X-Rspamd-Server: rspam11 X-Stat-Signature: 8nhb3jry3tsewekkzga1jcq7ezkmjk7s X-HE-Tag: 1701886568-259636 X-HE-Meta: U2FsdGVkX18dzfDo1EFBLfyz8iwZLF6fOKDTAvlnuxu6/6LYHGvlpMl13VWVYqaxwtpgC9g5M+42rh0mXBAz4ES0O0Moc1aEI7C0t2yDaxBSM2f6PMLcNVZwUkoYSYjM55m9A5LS8SDT2vKmxC35jri27JBOtsxXoiZSuoXdjBZ2PmOOWyfvuqDLAMmjAZNlQSRE195xTqk0Kx5X2UBgGwY4hgZLBonZ1Cj6/wgzSszoHnEOwhNUY92++PEdijN+eIEBA7j5MFSIDKpLgR7lvuNrdLKrlCudBUIMcFSN3r0Z185H7fghjyPoXrjYfE1RLWDDGlQ0VY6fOJGyr6ieJu/KLZkAp1Tawg8AfNzBhbIt9RnJNl8dez+9yOGFvfDRL3OzENtBHCaeUwNSNFNELbFn5wXBN0iynvx872JdIBLKrSaO2A9gjh0+XfDqMFTF+LpB23h3o0TPo8S8c99AyH4KMFS695YwBg0G/uJLUUckD1xqjZF7a7COjbq0j+vR0K8I5147JUbDy8sxov/JaRAHVhO59rFVWYzfVE2jL9KE3Yx4AAc5ESGIZwv4/VceIl0kzgl8cIznwL359xxFJAOzjp/IvbsLwzQrcMhYsfSbLqYg+2obUZh7xzLy4NOK3J+YgAw/HtzHq52uHOkOVSwVI/XB7BcWjQS2xHOGXqjhBG4zx8sJloAeE6Jf0nusDvqZWGdmwjgOprm3HeHQcSGcxDHYGaifPAxo6tkh8DBxkwJtjzgTVoferoeoX0+ZDmb+lZMaJ7LVMGe7r/ApRRg1ueer3GuAC4E1rgRAuuzEcTlFkXtPJmZ7m41tI/coQtspeZ7I0ytgpQ0Q2ElgJlpmxrk9zaJvmeT3wCskWGtaiUoX/g1wc210Y6qtg+mX9Gti1rdt2MjWF0jVn2gZby4hpNyZqQmrES60/9/SHRdd/8x0SlF52jdpf3d8i6rsKxge6o5sugdv6XBL03E Hc2dJw1m h/QkoxTYn8VOJG4IYwW7p+UVwDbzO4o8N2M3tgu9YtyJ/udfVniP5Cvi2Ao4lT2qefXNR9Eq+O/hfjHXn27dtcdfybsSRcyprH3nryZHEXKoofxyADO6tq0N3t+4qzrnuT4QQsL+W4nP7KkAc7jqByG+Y2NkAJHPeto3gRenz3n3n0KwKOut1w4xbZG4czDA1xHetfKabCbbA8NSBZyoSn4Oci+ownyyXYkUIkS9GPB8cCxQBhxSk58Dk6QcOeIX6XbcUrmz3ipCvz+VAebQkuLn6C9Fw2zxbxOE8VQf5n7wKZd7xHb0Plt2x1rCf2wYmav2BdRztA4aWO52HoICQ8j745BJYWVcUhZMtp7tViMEQ/J30RFuJGtaCMWWq6xW2TFVKr5aRVJkWmd9ypo5b5XVAPWjOGpFFRawcJiMZTbi7qJQRMRTqT1f1Aw== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000034, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: On Wed, Nov 22, 2023 at 7:01=E2=80=AFAM Chris Li wrote: > > On Tue, Nov 21, 2023 at 5:19=E2=80=AFPM Nhat Pham wro= te: > > > > "all": zswap + swapfile > > > "zswap": zswap only > > > "no_zswap": swapfile only. > > > "none": no swap. > > > > > > All keyword names are open to suggestions. > > > > SGTM! There might be some functionality duplication between > > memory.swap.tiers =3D no_zswap and memory.zswap.max =3D 0, but > > otherwise this seems reasonable to me. > > > > no_zswap sounds a bit awkward, but I can't come up with a better > > name. > > I sleep on it a bit. I should apply my own suggestion of using the > positive words rather than negative one to myself. > I actually define it as a non RAM base swap device. How about "disk"? > It will include SSD and HDD disk. > > The current 4 combination will be: > > "all": zswap + disk swap file > "zswap": zswap only > "disk": disk only (including SSD and HDD) > "none": no swap for you. > > Chris Hi Chris, I chatted with Johannes a bit more about this design. While we still think it's potentially useful for the future, it lacks a concrete use case at the moment. We don't even have the infrastructure for multiple swap tiers at the moment, so adding this interface now is just making it more confusing for the users. I think zswap.writeback is a much more specific interface, with concrete and immediate usability (it stems from internal chatters and requests - so the demand is already there). I think we should just land the change we currently have (rebased on top of mm-unstable to resolve merge conflicts etc.). I don't think zswap.writeback will get in the way of any swap.tiers functionality, correct? There might be some functionality duplication, but that's not too bad IHMO. Then we can work on swap.tiers design and implementation as we add the support for multiple swap tiers.