Received: by 2002:a05:7412:2a91:b0:fc:a2b0:25d7 with SMTP id u17csp73177rdh; Tue, 13 Feb 2024 09:43:47 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUuTjl1xWsGaD2EyRRr3W4i6DxpzW4T4CGHxl+rfoULvJEL8MLSx+reLkNHmfx49mczMecTA6xiA44EFUYF28v+2Nhcryn2RQfDpN5hYQ== X-Google-Smtp-Source: AGHT+IH2eREdqvxvnwLHVugUGEHIf7aUpn1qFg/mn2I8cZA9OHw4uf+HbfIC6jIi62mCv3iw6smM X-Received: by 2002:a17:906:398:b0:a3d:7f6:f3b9 with SMTP id b24-20020a170906039800b00a3d07f6f3b9mr45204eja.37.1707846227374; Tue, 13 Feb 2024 09:43:47 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707846227; cv=pass; d=google.com; s=arc-20160816; b=HbKJ2cvC13H/idKDsP5b94Bzc95ftYg9pThIAYBYSPLtULYD82zuXqxmuUYA2trQNe 3ZYaWTpKYmM3FOvTP0pt68y/0QpsolN2Vmg0am3sOnvjDPWV1/EzpEDq8SClL7GOxGOQ d3SFoo966IP1B6nUuhFK0gz+13EOauBFYm6lyv1GjiBUzjKbXBW4Npv3Idk/qFP3owwD FxT4vOT2I2gq+WnbTtzaPW6ji3MbG6sbk5q5ZpUTvhf89QfmH6itAbuMlCCl/LXaQNdx diFpio4PS1zRxYSs8JaRaBJuMBSD+13lK0CBlAkKVkTkX5T0AVOvTuMtBOUz4E/riP90 k7rw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:from:subject:message-id:references:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:in-reply-to:date :dkim-signature; bh=2KwJMEy4sS/qM3Y5N93JFeZraBwlubTDdqUKKmj/hdQ=; fh=Be/ixp+E02Zw1IlvReEzcKzdbKB+fPghhPo9IttDBmM=; b=rMl5ifP+sib3JzZbrviNJIbjaL1SrESpM624ax2E5ofFMUdN2sjJOcQT5h50C9ekR7 y66J+v6Yl1XXuVXSRZFQk8nZcbbv5cycwL6Dlw4uJ6zEQq8fMsEOYv9K4sJTvZBAY3W+ 07jj5zLgEVTCtm51aP/ZFvSZoC1H0fpkCZVIVuzE0M267r5J+xnIWCswfKcEuX2kMr/2 CQOGDCAQ3iL2b8eazdC1CPMqQio3ji7caVPz7SRcWh2ZNY6MWUBKDQiVhImHI3EQWWz2 z6pLrbVbF94NwELsk9Y2TOvDgbuqhhtXWt/4w0RUzLFmrhAXlPOVZXH+yKDhzJtDY6OA WxtQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=sSzNwVKY; arc=pass (i=1 spf=pass spfdomain=flex--yosryahmed.bounces.google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-64001-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-64001-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com X-Forwarded-Encrypted: i=2; AJvYcCVwnEj016E9bd2Q8/A4bVbiBopERT/7Y9L+4Kr0G0VzjBJpCZDNZreiYK6vjAf6vLlz7gXR12TdNo+LamQqCCqac+WtjpDW5/S91IUnqw== Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id mf12-20020a170906cb8c00b00a3badeabafesi1432843ejb.312.2024.02.13.09.43.47 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Feb 2024 09:43:47 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-64001-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=sSzNwVKY; arc=pass (i=1 spf=pass spfdomain=flex--yosryahmed.bounces.google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-64001-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-64001-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.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 245B01F223EF for ; Tue, 13 Feb 2024 17:43:47 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id CB1795FF07; Tue, 13 Feb 2024 17:43:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="sSzNwVKY" Received: from mail-yb1-f201.google.com (mail-yb1-f201.google.com [209.85.219.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8CA67111A6 for ; Tue, 13 Feb 2024 17:43:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707846220; cv=none; b=lBPPS3ImZ7nA5E5ucsVX0J8myzDb7VkCPj7EsOKkBXsNyHnYM0kU3CHsfUCN7p2/6s2pbvN0yqKbWRh46RKiCwm+ma+JsiAAsMX1ZmTuDz8kTsy9ZL1zPpbG+y1ljMr63onQuy281y+ahHRuGrQtT5ECPk2O0Ronv7Yx4edH+Fg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707846220; c=relaxed/simple; bh=jeL3jmuNA+2cZ8gk+1JE/g89YrEigyGIek9rxeXkew0=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=dunDTxZKy8dfHFrbmmROQNFK5Rm1q8zRFOMfoh6cb3MFYGyRkvlHQ5Ozdbxz04Gfw9v6fSslLSri2nqqdRKRaqc3qypoYDzBRASWOdjkZfsulm4GhE/zdyMFtn7DL/NMC/VLTY3HMqsBq82QoCbtZqZmiZGHnPKT/c4CVuf00r4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--yosryahmed.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=sSzNwVKY; arc=none smtp.client-ip=209.85.219.201 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--yosryahmed.bounces.google.com Received: by mail-yb1-f201.google.com with SMTP id 3f1490d57ef6-dcc58cddb50so2050981276.0 for ; Tue, 13 Feb 2024 09:43:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1707846217; x=1708451017; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=2KwJMEy4sS/qM3Y5N93JFeZraBwlubTDdqUKKmj/hdQ=; b=sSzNwVKY2PX+6cMy4LLJ+bvj3AmNQdLQYAS5zl699PuOTcefxn6fbHX9iclVaz73cF sYSy5tnVaHV3iF39voT/y2EvwBJgEyFoT3sUWWJgMMZFG/B0FlnERnkAs/fUfvJnDEI9 nfkybi4DFnwcrwLDAe2j6AUzlr3Isx92udggpDdKTJJVeLxR7iN/Ax2D2gM7+0d3dnnF Qcdg1RHQ9rH3xoJDgsgpcsuN35yU+tMgIJbZfwuyu+H7R++Eo82RNl+HNQIbQMRmwsm6 th+k+aVNphC8WRwyoNid77Ai7zC2M53/pf0Q5g3+ZgmKKGvkclZ1R9CqBx8Ndf8jcz0O vAxg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707846217; x=1708451017; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=2KwJMEy4sS/qM3Y5N93JFeZraBwlubTDdqUKKmj/hdQ=; b=QUhp84urJveHD1nseWB8gumucPDo4IokQ44bF7ai2rQSQYoWBxUG2exocqGWGGbu6F Wa/oD9IzNZuV9PbB6UZU32fl9zkxPA0OSdwtmaGXct0lYSGTyf2SUeepFps3Iha8bWzS 6mqpyrv+9d8BAdHIr7uY9P/Ebl0Mc2IdaLEmZZIVach1LcQtXkB33tKtxEtddaJsMR6X AfbhFN9ZHg8cJGlahupWXsdW8iObcGZjKcvHAzy05mZzvAtP8+69dBV7vG80US0N6viI H9lCvyIGYH2nkQFa5+VUHdBdXWeDGIMfqIudbRHooAm3zT9IpofAIFTArVZvXlL+5FBy jA6g== X-Forwarded-Encrypted: i=1; AJvYcCVKC40+wzDb3wynz+5VVU8h9ZlIU2YxnafLr/Vkr1gxP7wLGY8GecmurJDw/WlysVRmJ4eew/nxhKdTKQ5TZIp6fl1bkTQdUEx1uvFv X-Gm-Message-State: AOJu0YwAo5w8t8pvYPLmaO7wNlEsijUHYqJRaVzr1mbGTLZ/Y036MTYH WRqtWZP1wKKag10vWwATMuNe4jHizv+pethWOs+UyYinRzEPh+TTbxORtFBD73Nj7CB83wHlFth Fm4PBoH4qcu8PPiXD9g== X-Received: from yosry.c.googlers.com ([fda3:e722:ac3:cc00:20:ed76:c0a8:29b4]) (user=yosryahmed job=sendgmr) by 2002:a05:6902:1109:b0:dc6:5396:c0d4 with SMTP id o9-20020a056902110900b00dc65396c0d4mr2952081ybu.1.1707846217557; Tue, 13 Feb 2024 09:43:37 -0800 (PST) Date: Tue, 13 Feb 2024 17:43:35 +0000 In-Reply-To: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20240210-zswap-global-lru-v1-0-853473d7b0da@bytedance.com> <20240210-zswap-global-lru-v1-1-853473d7b0da@bytedance.com> Message-ID: Subject: Re: [PATCH 1/2] mm/zswap: global lru and shrinker shared by all zswap_pools From: Yosry Ahmed To: Chengming Zhou Cc: Andrew Morton , Johannes Weiner , Nhat Pham , linux-mm@kvack.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="us-ascii" > >> @@ -353,30 +353,16 @@ static struct zswap_pool *zswap_pool_create(char *type, char *compressor) > >> if (ret) > >> goto error; > >> > >> - zswap_alloc_shrinker(pool); > >> - if (!pool->shrinker) > >> - goto error; > >> - > >> - pr_debug("using %s compressor\n", pool->tfm_name); > >> - > > > > Why are we removing this debug print? This pr_debug() was introduced when dynamic zswap pools were introduced, and it was supposed to be printed right after the compressor is initialized. IOW, it is supposed to be after the call to cpuhp_state_add_instance() succeeds. The call to zswap_alloc_shrinker() was mistakenly added above that pr_debug() call. Anyway, I just realized you are now removing all failure cases between than pr_debug() and the zswap_pool_debug() below, so there is no need to keep both. You are right. I am wondering if these debug prints are useful at all now, but that's a question for another day :)