From patchwork Tue Jan 30 01:36:42 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Weiner X-Patchwork-Id: 13536672 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 82069C47DB3 for ; Tue, 30 Jan 2024 01:42:30 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id F01986B00AD; Mon, 29 Jan 2024 20:42:23 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id E8A816B00AE; Mon, 29 Jan 2024 20:42:23 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id CDFFA6B00AF; Mon, 29 Jan 2024 20:42:23 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id B91316B00AD for ; Mon, 29 Jan 2024 20:42:23 -0500 (EST) Received: from smtpin04.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 99A631203BB for ; Tue, 30 Jan 2024 01:42:23 +0000 (UTC) X-FDA: 81734277366.04.2BFA7AF Received: from mail-qt1-f176.google.com (mail-qt1-f176.google.com [209.85.160.176]) by imf21.hostedemail.com (Postfix) with ESMTP id CE1E21C000F for ; Tue, 30 Jan 2024 01:42:21 +0000 (UTC) Authentication-Results: imf21.hostedemail.com; dkim=pass header.d=cmpxchg-org.20230601.gappssmtp.com header.s=20230601 header.b=1d3s+uIn; dmarc=pass (policy=none) header.from=cmpxchg.org; spf=pass (imf21.hostedemail.com: domain of hannes@cmpxchg.org designates 209.85.160.176 as permitted sender) smtp.mailfrom=hannes@cmpxchg.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1706578941; 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-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=CQR6B9VdWNRnJssZsaOhbSU079VyNfF2R3mXiYKEIjI=; b=TirOgV7/q2zVhrItxtRJLthX46bgnnBX3GYy2IQ2m4loA8GbSZ74KJL21bLdvLsEf7Uj7w luhDqUP5y8HdAKhwess15ST9YsA1RMwEv8RtvzaiquN97H5vujWHOEJynloQQD0d27YkzO /ccUoq1a4MqRiAn8R3ACnjPz2Erx1H8= ARC-Authentication-Results: i=1; imf21.hostedemail.com; dkim=pass header.d=cmpxchg-org.20230601.gappssmtp.com header.s=20230601 header.b=1d3s+uIn; dmarc=pass (policy=none) header.from=cmpxchg.org; spf=pass (imf21.hostedemail.com: domain of hannes@cmpxchg.org designates 209.85.160.176 as permitted sender) smtp.mailfrom=hannes@cmpxchg.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1706578941; a=rsa-sha256; cv=none; b=nlsMiM5mgS3TQoBOWhhCKnGipVCFg4GhS2/PZdwVtUrA7ccMQLypKbvfPxJK5li6pzrEAw BqlN06Xigl8DjjmnSmuNthihDHR4UgTdyM28+MqaFs/rB2Kw4vXK+Xtx9pKnSfmu/SlZOc 0rdk3O+/5nzuPziRGPiv3JuYG6gSFek= Received: by mail-qt1-f176.google.com with SMTP id d75a77b69052e-42ab4f89bdbso2145991cf.0 for ; Mon, 29 Jan 2024 17:42:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cmpxchg-org.20230601.gappssmtp.com; s=20230601; t=1706578941; x=1707183741; darn=kvack.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=CQR6B9VdWNRnJssZsaOhbSU079VyNfF2R3mXiYKEIjI=; b=1d3s+uIn+/YajlyLCOP41HfCRMCugJEo/Pcsk4eV+55v8nPTLN2H2/d8V6crDr0P+m 0abPMCLlqRq51Zw8AnK4diXH50d1KN1bE+JTT/iFWxxKnJEzmZ8agIEfAkbuVuYhsku6 w0a3RGZ3uiklIyezowS/kX3tdyKUE72nzwaM2+Yjnrem8PoOzNRs2c4FNcRF39CwW4xH gvpWXMVzu7db+qfGra54Q4TybAZC0bpILATiaoPffjiFOztxUrn8gzBa71aBcw8irioE 6oe+hKEzdhodvR1os0BpI4YwVKJAtswWwHeM+zTSi5Wg5gN/thnNrdx2Kpbey3fc14dL 4Stw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706578941; x=1707183741; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=CQR6B9VdWNRnJssZsaOhbSU079VyNfF2R3mXiYKEIjI=; b=Ts3L7GGDWEcq332AtpwHjA+iROCO2qbYa1xEClSqEmgf844e34+gGSZAj/DLXfk/x5 dgi/qkgXnZoiP0KCkf32TFx8EDK0HF0sG6/XHaaBvJZXDR9ugHl2YAaOJiymij4G1dRp uPMzYRf64agC0dAdTWh6O9BV/mULG9qt1z8LPIuYeLE4NNW5+l5q764GCnnrGjrDc090 L0IxZ+Wu6iYVn1iv8RiUVjSo5G0KlGEKBPqyc+XRKmvjXRyeIb0I0+QCQrww6fQK8x6g 7o06byUyJlHeZcnNP1TeZMdbZwcd0m+pWyUD+opNaNxzHhzR0i0SY57oCeIo/FJxoHWH sVzw== X-Gm-Message-State: AOJu0YzfY1RTo7cc9Mar8YxI6jyOQIIAjJo07jx9tej76+MZotJBChq3 FpYnnotFsnWjED3Cf8EEsOjLCAPK5z+1xx88N88iyJt3uT41D3wGAFNpkH9tkDE= X-Google-Smtp-Source: AGHT+IErWm9kcg1l0jaG/xKO+cFOv3Pm8kp13SmDYTiZeddMh6ZfVthab4Aji7BCAsCUkY1gLrj0kw== X-Received: by 2002:a05:622a:40d:b0:42a:b079:e665 with SMTP id n13-20020a05622a040d00b0042ab079e665mr1722772qtx.12.1706578941087; Mon, 29 Jan 2024 17:42:21 -0800 (PST) Received: from localhost (2603-7000-0c01-2716-da5e-d3ff-fee7-26e7.res6.spectrum.com. [2603:7000:c01:2716:da5e:d3ff:fee7:26e7]) by smtp.gmail.com with ESMTPSA id bw21-20020a05622a099500b00427f8c50f31sm4145530qtb.46.2024.01.29.17.42.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Jan 2024 17:42:20 -0800 (PST) From: Johannes Weiner To: Andrew Morton Cc: Nhat Pham , Yosry Ahmed , Chengming Zhou , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: [PATCH 06/20] mm: zswap: rename __zswap_load() to zswap_decompress() Date: Mon, 29 Jan 2024 20:36:42 -0500 Message-ID: <20240130014208.565554-7-hannes@cmpxchg.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240130014208.565554-1-hannes@cmpxchg.org> References: <20240130014208.565554-1-hannes@cmpxchg.org> MIME-Version: 1.0 X-Rspamd-Queue-Id: CE1E21C000F X-Rspam-User: X-Rspamd-Server: rspam04 X-Stat-Signature: yyihrbjhriib9k5ic3ek68ipi1fo6gc3 X-HE-Tag: 1706578941-328171 X-HE-Meta: U2FsdGVkX19oKhsi7Z7Qmn7YJQtyEpBaPc3PqRkadDg/mAxkohkfTNfTMsesV11/e90z7xXmNUp8vMLHoTc3SYoAFbwYlFrIzljiBzrlY4hN0JHl8U0cM5nVzqMylPbMiZfrKifHU41dSSRjsdJsKdrfwIK7gZfVsNTqzVooaa8NnECRrufVmFB7Tu710YJkq1LtfwaHo7V4OjRhu6xjrKFa1BvnJ2w0n+Mw1eBXWNjHF7ykalX04Aq5IU8zvIFzgtZurhGHKoa5SQEVwvyMhjEpZv9ARSxEIQ8L5PsE1sMeA5dVlWVI+7cZf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4Cry2d3pOM1Wxpq40mPKpP8SGuotpV2wi2O4NpqqRdmFolyGRoEPOqh4XNWzUe1/NWT68GGYnUysNp8At8= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: Signed-off-by: Johannes Weiner Reviewed-by: Chengming Zhou Acked-by: Yosry Ahmed Reviewed-by: Nhat Pham --- mm/zswap.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mm/zswap.c b/mm/zswap.c index 7a7e8da2b4f8..bdc9f82fe4b9 100644 --- a/mm/zswap.c +++ b/mm/zswap.c @@ -1316,7 +1316,7 @@ static int zswap_enabled_param_set(const char *val, return ret; } -static void __zswap_load(struct zswap_entry *entry, struct page *page) +static void zswap_decompress(struct zswap_entry *entry, struct page *page) { struct zpool *zpool = zswap_find_zpool(entry); struct scatterlist input, output; @@ -1411,7 +1411,7 @@ static int zswap_writeback_entry(struct zswap_entry *entry, zswap_entry_get(entry); spin_unlock(&tree->lock); - __zswap_load(entry, &folio->page); + zswap_decompress(entry, &folio->page); count_vm_event(ZSWPWB); if (entry->objcg) @@ -1702,7 +1702,7 @@ bool zswap_load(struct folio *folio) spin_unlock(&tree->lock); if (entry->length) - __zswap_load(entry, page); + zswap_decompress(entry, page); else { dst = kmap_local_page(page); zswap_fill_page(dst, entry->value);