Received: by 2002:a05:7412:40d:b0:e2:908c:2ebd with SMTP id 13csp785189rdf; Tue, 21 Nov 2023 17:19:47 -0800 (PST) X-Google-Smtp-Source: AGHT+IE7GRyDibVRxaoC15D270OljolyRzfmmJM+bfkLbwiJt+IooG/MInNxRSEGBIrS4Qyx+fOV X-Received: by 2002:a17:902:724b:b0:1ce:5cc0:dc6d with SMTP id c11-20020a170902724b00b001ce5cc0dc6dmr775605pll.66.1700615986828; Tue, 21 Nov 2023 17:19:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700615986; cv=none; d=google.com; s=arc-20160816; b=ykowB3o6hz49yk2wTj6EGnUzqPZoUaGqsf3U8LAUSXrUIk/lCXEi+LM5KnERfXQ3xF qIqt6LR0fuTLJM2Bkd20F2AR8RCszaEBg5/fCtj7Z7sP1lzzD/0DOkLs7e9j1ox7O0g9 09FALWMKCiPk1/kC3S4EPiKwJ12vMBIBVAz9ZYnLQ/jZGU8LSCnFibL+3dNxo9Ir5v/2 aasQlMeIOD+BGdNE6QbvDAWbidXUDqNw1c/c9KsbfPuexIzjTaTqQdP+DgR0B0ieV1do AOabotTK79UWSt3TryjEZujm0v11OT6U4XgHSloYxjXaingZHaZbFm4rpSIeciUruDj6 2PuA== 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=cihilcVY5OStqtWe30Okdv2euw2yNNgkn3qMNIzpAgo=; fh=vrRJ6THxHbrSldogpHi9EZ1a7k4f6J3mb2v2jybUcL4=; b=oV0XavzshBOnJ1FP1krftT2YsERlRDIG2VDCZhdAZ3yy0AMyPL8w7SkN7w8JqVD3Iq 1GUk1dYozKATPDD/Ylv5nysVRl0Z5FnoLWTND7FrWBuywUezyR0IhCySFFiVnKWGEonW ENdY307AuJTDn1SFI6nxrvTVfChDwNc3prnAmpwvqcoibBX69iiCAMe5nZ1Vjgs24hqO KnCLwJLVl/YxETNjYdrlXUHZLDiBm5F8u+rlmLkkDJ/0b4v+uz+x6WB75ZQJZWh/55Vr yheapSOh6Wj7AlvAm41FR8UBDUMERD8WlXLGVjOEoRZdtmPo+OV0/8aWT5T2H19DfCcT MKZg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=bbGzPYp2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id ix3-20020a170902f80300b001c589ba4a04si10768342plb.24.2023.11.21.17.19.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Nov 2023 17:19:46 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=bbGzPYp2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 15C5480CFD5E; Tue, 21 Nov 2023 17:19:44 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229775AbjKVBTh (ORCPT + 99 others); Tue, 21 Nov 2023 20:19:37 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55486 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229464AbjKVBTf (ORCPT ); Tue, 21 Nov 2023 20:19:35 -0500 Received: from mail-io1-xd33.google.com (mail-io1-xd33.google.com [IPv6:2607:f8b0:4864:20::d33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A39E8197; Tue, 21 Nov 2023 17:19:32 -0800 (PST) Received: by mail-io1-xd33.google.com with SMTP id ca18e2360f4ac-7a6774da682so273773139f.3; Tue, 21 Nov 2023 17:19:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1700615972; x=1701220772; darn=vger.kernel.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=cihilcVY5OStqtWe30Okdv2euw2yNNgkn3qMNIzpAgo=; b=bbGzPYp26QGA584/5mltjnFsDCneQVIlgsquIf91ol0mxp7Onz0lBhrrLF3cjI+1mg NvwS141ssTORi3f2pfYtix993l7nCfm2+B2S1Rl2PHB4Xkmn0C4apG7SvMFh1hZjbBY/ nKYoilBSwz9cwvXT35roMYZvOaTAosfYQjOQ0IN0a8T0p3QkWSAxPiUgb4h3uUN65CPV JMVhPgdJtrthq7LL7i+RJnzhFQqwvijRJszhdVcrPlc0mazwsmO1d94bowelQyV/dN+R sIbYBzLPq4KvmPT0+o7c4LCaKi2I2iqzmuvLQ+3a+1KwFg8aW2lSpO+TcNNAtKVhTsij oMfQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700615972; x=1701220772; 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=cihilcVY5OStqtWe30Okdv2euw2yNNgkn3qMNIzpAgo=; b=fzN8eUNrUR1y7HKJFOzcfR0Q1uqknZbi76J6kUlizmbf2FY8GMgfbeL3jD9HqIqGTi EQijQFkpTxgvV0VdceWkcErIdndxUrVAFVGyscdwtANLpjfpmnf75lPM7eom7pLZj8UD AYzDActwDY7Tg3TqM8wLvP3JXRdB9CP+z/78tvf9yPp3gkwcr2Z3ixHjus4vfALT3Gwh +NsN6aKZJIEZ40aDPmhFS6CQdFeMf/D+NwBL/CvMTU6VH27FyOAmkQ7iXOAmisSLbh4p igdaz825WHMMW4XmHZqV4XV0HpClRJ1ZcNmRBomyzcMFhWSiO/bJn5eHBfidOGxL7M0f WcoA== X-Gm-Message-State: AOJu0YyPi7yS/mhmuTT1B+cqdYyCK1Apbi+um88/e/8mPanJhiM0zGnB +lbQrPOolc+oNx63c7UwJxHoVKqgLian3TZfEp0= X-Received: by 2002:a05:6602:3999:b0:7a6:7e4c:1bf0 with SMTP id bw25-20020a056602399900b007a67e4c1bf0mr855787iob.16.1700615971940; Tue, 21 Nov 2023 17:19:31 -0800 (PST) MIME-Version: 1.0 References: <20231115172344.4155593-1-nphamcs@gmail.com> In-Reply-To: From: Nhat Pham Date: Tue, 21 Nov 2023 17:19:19 -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-Spam-Status: No, score=-0.6 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,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 groat.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 (groat.vger.email [0.0.0.0]); Tue, 21 Nov 2023 17:19:44 -0800 (PST) On Tue, Nov 21, 2023 at 11:09=E2=80=AFAM Chris Li wrote= : > > On Tue, Nov 21, 2023 at 10:13=E2=80=AFAM Nhat Pham wr= ote: > > > > Hi Chris! > > > > Thanks for the patch. Would you mind if I spend some time staring > > at the suggestion again and testing it some more? > > Of course, by all means. That is just the minimal version to be > functional compatible with your zswap.writeback. > > I might consider a follow up patch to add "no_zswap" and "none" to > convert the SSD only swapfile, which can't be expressed by > zswap.writeback. > That should cover all 4 combinations of zswap and swap files without > creating a custom swap tiers list. > > "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. > > > > > If everything is good, I'll squash this patch with the original version= , > > (keeping you as a co-developer of the final patch of course), and > > update the documentation before re-sending everything as v6. > > Great! > > > > > Anyway, have a nice Thanksgiving break everyone! Thanks for > > taking the time to review my patch and discuss the API with me! > > My pleasure to discuss the swap with you. We should do the online > "swap meet" and invite other developers who are interested in the swap > area as well. I look forward to this meeting! I'd love to discuss more about (z)swap development (and more generally, multi-tier memory management). Generic page promoter/demoter that takes into account workload (cgroup), access recency (LRU + generations)/frequency, and tier characteristics (latency, bandwidth, etc.) will be awesome to explore! > > Chris