Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp939613rdg; Fri, 13 Oct 2023 06:00:10 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGOipfL3IKf0QsZ5GNdtZ38/XBewynsDk7evjDsyvo6oNsN6hsb2TbIIW169i9iDTEmEINL X-Received: by 2002:a17:903:24d:b0:1bd:c7e2:462 with SMTP id j13-20020a170903024d00b001bdc7e20462mr28595900plh.11.1697202009157; Fri, 13 Oct 2023 06:00:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697202009; cv=none; d=google.com; s=arc-20160816; b=r5mvZrd8QGCP/yOTVTwm7cWGuNkEFlB9hpWzKhmxGtZUejh5vqwUrQJCecrpJNANBh Wgr2T7M5u9xosjvFSY29wsN3MUQHeWa7cCSpDFtAet4XUYoG3WEoPm7SaZk2pHgQX2O6 atSorzRtGmWXkvhBUo9+rk0HyR/3y0RVkvN2lMffPGn0Fdm6QG3AUiQCP+zJLDkorxWL H7JtGh4G7oJ9n91Gspclkn6RhsPcV1h1iZMqB6aY8meHaNcs9GdmEyNQfL8y50L/3DNR Sh+bcQX/zWEk9NKEUcFsJ9hisXFzXVr4MqR0+hkhxN/99jaaFvVV928qPTr8cFlnq42l U57Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=Eg6s+PkmAT7pmMliH2xO/Md/Hft9jtXneskCjh9+2ds=; fh=tXsScpX+PPkUXsXbhXvuN6E7Uo/vSoGsimrlsLe4lGc=; b=cn1f4xtCiCj5+/wazV3D0cM0Gz5acckcYiHaqZLac0UZACXgiaA7FImJLL4UDXaY2t Ev5Zahbt+WWvRUhQoIIUiaOb6Hi2VD6N1v6Ia2TIQFQVnYmL+3t0ZkovtdzFRv7k8PKG 8qVxk3/BwEPT/+LpUtoC+BNHJYtcSdT9F3Fj4heAvg/8dJlo3eqYQrjcem1IkIuMhwRI I5S2qt2LGri8TtSYRU8w9aBTPknvifAJUFQ/id2LID/JzUIjb7oD90+ns0QkEZrdpvNb CBBbOA8bn+2+qP1LRIVPBv8fa9LsN3iUGvUj827sBvkS3BIBmvz9ZIQyOdCxi6snZpWh Pyww== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bytedance.com header.s=google header.b=Koa3lLSN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=bytedance.com Return-Path: Received: from fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id u18-20020a17090341d200b001c3a06b4fd7si4766737ple.561.2023.10.13.06.00.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Oct 2023 06:00:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) client-ip=23.128.96.38; Authentication-Results: mx.google.com; dkim=pass header.i=@bytedance.com header.s=google header.b=Koa3lLSN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=bytedance.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 20E8F808EE79; Fri, 13 Oct 2023 06:00:04 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231419AbjJMM7y (ORCPT + 99 others); Fri, 13 Oct 2023 08:59:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58760 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231359AbjJMM7x (ORCPT ); Fri, 13 Oct 2023 08:59:53 -0400 Received: from mail-lf1-x134.google.com (mail-lf1-x134.google.com [IPv6:2a00:1450:4864:20::134]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 40633D7 for ; Fri, 13 Oct 2023 05:59:30 -0700 (PDT) Received: by mail-lf1-x134.google.com with SMTP id 2adb3069b0e04-5079f3f3d7aso227161e87.1 for ; Fri, 13 Oct 2023 05:59:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bytedance.com; s=google; t=1697201968; x=1697806768; darn=vger.kernel.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=Eg6s+PkmAT7pmMliH2xO/Md/Hft9jtXneskCjh9+2ds=; b=Koa3lLSNMjkB8ByG9692xuUgl47CTLLr9wU0Yyh2AqbUekf23ooerFDGHyOG/ZUjne YFd/54pPoSxXfx/7pnTTgeZtWUhwI5YbECmuYgJvi/98ZzrZqBpgKaJFh74tSfikoU+L Q0fhwGw8kuF+9NSoDUoA9za5BhQx7K0Z2uO8s6mSrEwxjkODeZ5ifbCJ9WFpok9UFp1+ 0PpWC3hGRYR9z1rR19IXVIZWQBy/YxGQRseaxWFjOZwHCPjnabxwg7bO/kmK6aL7lZXd UsNAEk7AcMTyySJYZJatdXX91gXe0sQEsenZWjFmalElSu/okD0RGV3OisX3kRKgAMdP dOgQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697201968; x=1697806768; h=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=Eg6s+PkmAT7pmMliH2xO/Md/Hft9jtXneskCjh9+2ds=; b=dS1O1oP8bCdVr8X3V/sOo51Gj/v/pKd4rEkqyYObpPwNL56o+piWLh145kaB0zC2xs 51hNRI+Kc5EesgLtlsqQLY/bPqLSWsbtV1AP/aV58mvghWgobUtLrPj9OfastgcuoCyA h//wUQmndovb4yPCw3ZGkyZmokedOxvJ2D1ZoAudQhCzrJGX/GkXSNs/lO/QUa91KZ+f 6w0KuKoQeWssiirEerelTNY9mR7bhmjGtaM2HAc+CiMIxbbD7HACIKOp4nI3V/dQT6lQ 3yFDlo7Kz6qauR4xq41MAT9L9pNh/mkPawoMb5+dKNA7+TcwUYD4p7ieFCayG08bmI5i C3Ng== X-Gm-Message-State: AOJu0Yw+75b6xIladU8U7cLKucbC9BqSUSgRKY1nNZ92x5ITJiz29+LL vc+OOTG+R7OJOfP9zkZQW6HFvGvFdbDR94R+aZv0pyfWxfzWXB2T X-Received: by 2002:a05:6512:3ca4:b0:500:b9f3:1dc4 with SMTP id h36-20020a0565123ca400b00500b9f31dc4mr28837815lfv.68.1697201968478; Fri, 13 Oct 2023 05:59:28 -0700 (PDT) MIME-Version: 1.0 References: <20231011051117.2289518-1-hezhongkun.hzk@bytedance.com> <20231012142203.GB470544@cmpxchg.org> In-Reply-To: <20231012142203.GB470544@cmpxchg.org> From: =?UTF-8?B?6LS65Lit5Z2k?= Date: Fri, 13 Oct 2023 20:59:16 +0800 Message-ID: Subject: Re: [External] Re: [RFC PATCH] zswap: add writeback_time_threshold interface to shrink zswap pool To: Johannes Weiner Cc: Nhat Pham , akpm@linux-foundation.org, yosryahmed@google.com, sjenning@redhat.com, ddstreet@ieee.org, vitaly.wool@konsulko.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.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 (fry.vger.email [0.0.0.0]); Fri, 13 Oct 2023 06:00:04 -0700 (PDT) > > Can you use memory.reclaim itself for that? With Nhat's shrinker, it > should move the whole pipeline (LRU -> zswap -> swap). > Thanks, I will backport it and have a try. > In many instances, swapins already free the swap slot through the > generic swap code (see should_try_to_free_swap()). It matters for > shared pages, or for swapcaching read-only data when swap isn't full - > it could be that isn't the case in your tests. Got it. Thanks for your reply.