Received: by 2002:ab2:f03:0:b0:1ef:ffd0:ce49 with SMTP id i3csp72757lqf; Tue, 26 Mar 2024 14:57:28 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXE133kDT2fsBtCf4Q7gFXwa05yEwaSAVPtd1F4lMP2V1utZ9Ytr6DlhPb7JRTuPW/h0snpl/Pi1IrTKHbr59Gnq6YjSbuCKROwyCufFg== X-Google-Smtp-Source: AGHT+IHdi7NJa/yoNRvGmOJ8bZifrF9EGGe/6ZmbIEqXjz3067m9RejsB/u4uHuVyyEAMjrDjJyr X-Received: by 2002:a05:6a00:138b:b0:6ea:c2ef:3b71 with SMTP id t11-20020a056a00138b00b006eac2ef3b71mr1128492pfg.20.1711490248102; Tue, 26 Mar 2024 14:57:28 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711490248; cv=pass; d=google.com; s=arc-20160816; b=UkkK5RHkTdwSX8Blbw1qPAeAR+KOkMzhj1E995HxyAUH7nQmRBpNSzEA3igymRwvp1 YnC+iXyRxBpKyO1KcgXt4e+mWpstosPkm8HB/vRKGcIqlh1LpjiT4AbabfGB8Yn+dT29 6PKl1uQiFrHNOu9F1GBG44ZxZ73rggJvI//ONLW+Ty0onOvMhDm1YJXC90Vzm5hL67Qg PFSQX8tL70OvCKjLTtGPLaseCz6hh/RAaZG9/GtIjg/C6dOo1b2SnK/jbBjsm0IzRKHL eBKv6Pb47gE82YHlI65l5n8Ow6ptvuG+XfesjnfngfO/jfqV4TJndKQ/vmEaWPahasNf 87Qg== ARC-Message-Signature: i=2; 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=jXtqhW7TrzvsAEXyOy5z64mjAY/B+CgwYFFgZL+QG1k=; fh=nUwgDfxX9OR/a2k2E+UiSZQKAztJ4O/g2/CtMzCUSwY=; b=Dz/Nazqqaei/k9TKpLcJJVqKABchuHwRDv0cd+NHpkYgtYGYqJYuSvpDI8h5dYwfwU kWlCH2vbP/3033WpSdEcWadRjaq4nl1dpZFFxaG+yZ0EOQ3uL3kHwCFv7q54H4c4N/Jz WdUCeEf0FSuRfDdvyf/AauISuFYUv/eQZ7nMy0PwpnjUQtBhrEh/rDTyHDdLjX6TclSp 2vQsAGs8WA9+8D8ksjI7PbpWUS7up7xPcfm+MrMJlIQuJLbnBMH2LfBiBWlECnIooa57 +gtPXBUzO7PEA4zafa8KaPrdWpl3teZL0xpgBf81UylrzpNE/PtRdYy4q9GiLSItMIbi F7Yg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=D4bqrpzQ; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-120020-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-120020-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id b17-20020aa78111000000b006e6c81ac98dsi7890858pfi.365.2024.03.26.14.57.27 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Mar 2024 14:57:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-120020-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=D4bqrpzQ; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-120020-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-120020-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.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 sv.mirrors.kernel.org (Postfix) with ESMTPS id C41A5323DE1 for ; Tue, 26 Mar 2024 21:57:27 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id AF82513D89F; Tue, 26 Mar 2024 21:57:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="D4bqrpzQ" Received: from mail-qt1-f182.google.com (mail-qt1-f182.google.com [209.85.160.182]) (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 75DBF3C26 for ; Tue, 26 Mar 2024 21:57:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.160.182 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711490241; cv=none; b=bVyl96p5Qlx0ShKwnnynG95zOk7WL4lRY12YdfbVmGuYANwa6Ug7i+EFvhdfJlA+Glx5yFjiMAlDTTeDc5nA+J8mbw75U4jgciTA6T1ctDDK0wxvBh0iiOcv/5rG5wl/esutniXJCb+ZDOvYOvvrW6NLo+g6dU7WExcyu51WiYU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711490241; c=relaxed/simple; bh=jXtqhW7TrzvsAEXyOy5z64mjAY/B+CgwYFFgZL+QG1k=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=DhzZX3Alw501ZkE/pm9LC/SzmCw9lytZnclCBfvnKMddiiXK///uN2rrfcUewTexmRMHThUU2AICCNj3JhktD8XCuHqj5nAAztvDybQ6tHiN9RnQEvRpgPKZcbbvUtiVpggGYFphDYzut7IpfcF0c86ibSe9KCX6pq4uHuQY/6E= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=D4bqrpzQ; arc=none smtp.client-ip=209.85.160.182 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-qt1-f182.google.com with SMTP id d75a77b69052e-430dbcfc2afso42498051cf.0 for ; Tue, 26 Mar 2024 14:57:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1711490239; x=1712095039; 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=jXtqhW7TrzvsAEXyOy5z64mjAY/B+CgwYFFgZL+QG1k=; b=D4bqrpzQ5ByrQ87dzbj5SElg2kvmbbHilikNdH4ECg//WKsfFtpcXRMHJEOanE0qnd JdJpZ2Y9D2SX8rSNRedz+iOo+Uw1K3Ltwid4oNFGWKGiCBIbvAuU5A77gV1y3FGI8L8R GqHNOa0faW2OONMTQOgPfRKRmxTFjI8zFlVSlIWEUuToUC4PBC14UW5kobDLrHBnandb haWQNmAHcdatAE+ph2V62m5Kgl0w1CstwmCjdAu02nHjFEiyCCVdaEloEZzleXv52MCI US6gc14Lvy/D6Qkwzeuvb4NShOxX7yuI9aN4iahhFieSTz5G1AUjWuQsOwY8Bwbl+h0M EPQA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711490239; x=1712095039; 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=jXtqhW7TrzvsAEXyOy5z64mjAY/B+CgwYFFgZL+QG1k=; b=BBEurBRlSA6GgR7ggkplQb9POPNlJOm4HM52iVMHGOCMyr4niCitAsiixu6Cf79N6G dyob7579oyy9U6uB9OZ6iohX4glxNz8xDYvN6jVil/1f/xuSx/AuO8iHf7+M801V2Y87 m9acCNoRd95JprnV4naJFqLctgGcNR4JymBdWP18WF7A0RL0KKVqEjFRRWPV9ShV9YZw Dbcluakq+gEJ/VV5rXBPupdXknF0QjnlBfselErApTY1CH98Rabb0rwfBkDYu7TkgJK9 GQQ48KgywTqDHYaqmuQqDuVCVG9Xp3KOkCdzcFxgDaiSPv4Tvu7xZadLipidOVyv5ZHL t5bg== X-Forwarded-Encrypted: i=1; AJvYcCUW3Xu/GFV9ah0LapoO49wy7JGieoft31dBLS4c0TRx10QrKewJJKqkY+lFB1tyPvRvCirZaD80o02x/dqVcVs3jGbo2i9MSz/zuXgL X-Gm-Message-State: AOJu0YzQYNThkkwuJR1AHFbr7e923ACRVV77xowXwbr66rWlNGtQ11n0 xtpxN3mFnoRLaNYkoNkXDa87mtDJeAULNAqf9ywkRmKB1p6fPrFFIXLcyov7ezn4vCIHcbWV0FB AGTqKSz1h7lmWBcpfCKS+eOJThyI2iHJeMMA= X-Received: by 2002:a05:6214:e65:b0:696:76bc:357f with SMTP id jz5-20020a0562140e6500b0069676bc357fmr1124376qvb.6.1711490239244; Tue, 26 Mar 2024 14:57:19 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240325235018.2028408-1-yosryahmed@google.com> <20240325235018.2028408-5-yosryahmed@google.com> In-Reply-To: <20240325235018.2028408-5-yosryahmed@google.com> From: Nhat Pham Date: Tue, 26 Mar 2024 14:57:08 -0700 Message-ID: Subject: Re: [RFC PATCH 4/9] mm: zswap: move more same-filled pages checks outside of zswap_store() To: Yosry Ahmed Cc: Andrew Morton , Johannes Weiner , Chengming Zhou , linux-mm@kvack.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, Mar 25, 2024 at 4:50=E2=80=AFPM Yosry Ahmed = wrote: > > Currently, zswap_store() check zswap_same_filled_pages_enabled, kmaps > the folio, then calls zswap_is_page_same_filled() to check the folio > contents. Move this logic into zswap_is_page_same_filled() as well (and > rename it to use 'folio' while we are at it). > > This makes zswap_store() cleaner, and makes following changes to that > logic contained within the helper. > > Signed-off-by: Yosry Ahmed Reviewed-by: Nhat Pham