Message ID | 20240217045102.55339-1-21cnbao@gmail.com (mailing list archive) |
---|---|
Headers | show
Return-Path: <owner-linux-mm@kvack.org> 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 32EFBC48BF6 for <linux-mm@archiver.kernel.org>; Sat, 17 Feb 2024 04:51:27 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 963556B00A1; Fri, 16 Feb 2024 23:51:26 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 913AF6B00A2; Fri, 16 Feb 2024 23:51:26 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 7DC236B00A5; Fri, 16 Feb 2024 23:51:26 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id 6A2EC6B00A1 for <linux-mm@kvack.org>; Fri, 16 Feb 2024 23:51:26 -0500 (EST) Received: from smtpin09.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 0C4FB160135 for <linux-mm@kvack.org>; Sat, 17 Feb 2024 04:51:25 +0000 (UTC) X-FDA: 81800072130.09.65605F8 Received: from mail-oa1-f49.google.com (mail-oa1-f49.google.com [209.85.160.49]) by imf03.hostedemail.com (Postfix) with ESMTP id 4236520013 for <linux-mm@kvack.org>; Sat, 17 Feb 2024 04:51:22 +0000 (UTC) Authentication-Results: imf03.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=hRShIs7j; spf=pass (imf03.hostedemail.com: domain of 21cnbao@gmail.com designates 209.85.160.49 as permitted sender) smtp.mailfrom=21cnbao@gmail.com; dmarc=pass (policy=none) header.from=gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1708145482; 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:references:dkim-signature; bh=MNOBgtxjdzfRlEyGVe+9BRmZDkEvX9p4KtMFsgHAFh4=; b=uEqZZRqgygvTTn+ece2XR6ylNxElouvL/wdTwDC5ceMKPrz2yauv3sb+ItuP0uLbG2Y+Gn eZHbYMs5hQBoXW0EyjPJC0ZIpCDNT4BJlrKGdirKaTqGdWVVPm5+C73he4lye7Aodd+4kc Phs+mCGYTjOMLzBV5ZwE22N1c5hQA+c= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1708145482; a=rsa-sha256; cv=none; b=aRJ/oQdMKBv7SbSsObHQi8VRFcAX4226qLfipLgsCFFJA8BelOUQar/u5Ui51TAg7kAmm8 uhFv4GNnPUXqtFgsabLrZg8l7HSGSV9QkGh4PAECRQ7jWYmvljkbSVIiihnWtTJK59EwLZ tCRAWQtveX0M+8Rrmi3Z3Q4Gte/jiAs= ARC-Authentication-Results: i=1; imf03.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=hRShIs7j; spf=pass (imf03.hostedemail.com: domain of 21cnbao@gmail.com designates 209.85.160.49 as permitted sender) smtp.mailfrom=21cnbao@gmail.com; dmarc=pass (policy=none) header.from=gmail.com Received: by mail-oa1-f49.google.com with SMTP id 586e51a60fabf-21e63b586fcso819876fac.3 for <linux-mm@kvack.org>; Fri, 16 Feb 2024 20:51:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1708145481; x=1708750281; darn=kvack.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=MNOBgtxjdzfRlEyGVe+9BRmZDkEvX9p4KtMFsgHAFh4=; b=hRShIs7jqszoD5A9D51sa2Z3oQsWws0PyxHrDyMYfFbm0DaFz7flMPwqF50E4HPmvU Sj5RY+EJPqnv0QxR8Ru9caEcGZW4d2XxaPMAd2nu4fyzZrEwymf50V9mTSDssIzJf899 Br5a3faIGwP1JuAdosmw7OW8Vpos6QzYLF6bmOh89PEz0vHyeGD255vAYn1NIypvdypO iXvfr2F24pBTap7XGl4eoRtD2U7BNXRIP/C4BAIfX64H3rjnR+AVWzNUCbkTf0SYdWc4 Jm5ERTQVMoeD/KqVvGaznsqKbtCPAu9288cjx8V+UiUIXvisDNs9SkPZ8avkbSlHz2HA EMOA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708145481; x=1708750281; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=MNOBgtxjdzfRlEyGVe+9BRmZDkEvX9p4KtMFsgHAFh4=; b=XntOCwHjM0ujAFC0DQlJm1zbKaThDk8LeBGpuXdxQnW4bqZXHwtA8A9Lw2T8gpbFhq mu9lQUQsI++qw2Zogkcv4WMD92Lk6jG41EXXXVkktj8u+1ciWO075dseRecP0G7Cb3YC yJ9I9JX7wX7D+IHLY57FzrXMy8JqdU+bnDoZ1ni87t3yzjBzH/svm/sz+ij1+o95Tj6Z WQD2o3UtYXJ+0QcEeoTdSryVunnUC2IiRYKoUHrePgah/nRcHnOWFU5Qz9toU14YYBkg Hsom7+nIJLMHYYjF70G1ihiqlDSfKHtVolYOfMyxTL3/qHu8xxIXP8ep2yE5sU27mU4G zmkg== X-Forwarded-Encrypted: i=1; AJvYcCUJ7GdL2LToWe3ghrTr+h2ktnQs6n2UpXQKrcLoavXueRBGxWsh4PANDxR2Xti+IDvnb0RSlLKmoEFEmzmgf0VwsiM= X-Gm-Message-State: AOJu0YxaraD4FOSJLghqsOLStx2NlP/vdQKiIPWM4eW7UHjZkWajTcUw EaG9qJL7dE7OzoLSE3j6ZVp40sHo5dSTkA/QM1mqnn+MoJZEtmFQ X-Google-Smtp-Source: AGHT+IFgDSQJ8AJcEw2iGomSXji4WMGKVF3I6ZMj2AHljsVZsd9dVexoTSkScldRN6Oa7jw2L7sdGw== X-Received: by 2002:a05:6870:56a1:b0:218:51dd:d4a6 with SMTP id p33-20020a05687056a100b0021851ddd4a6mr6971333oao.43.1708145481312; Fri, 16 Feb 2024 20:51:21 -0800 (PST) Received: from barry-desktop.hub ([2407:7000:8942:5500:e82e:22f2:1bdb:989f]) by smtp.gmail.com with ESMTPSA id n14-20020a635c4e000000b005dc2ca5b667sm610703pgm.10.2024.02.16.20.51.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Feb 2024 20:51:20 -0800 (PST) From: Barry Song <21cnbao@gmail.com> To: akpm@linux-foundation.org, davem@davemloft.net, hannes@cmpxchg.org, herbert@gondor.apana.org.au, linux-crypto@vger.kernel.org, linux-mm@kvack.org, nphamcs@gmail.com, yosryahmed@google.com, zhouchengming@bytedance.com Cc: chriscli@google.com, chrisl@kernel.org, ddstreet@ieee.org, linux-kernel@vger.kernel.org, sjenning@redhat.com, vitaly.wool@konsulko.com, Barry Song <v-songbaohua@oppo.com> Subject: [PATCH v3 0/3] mm/zswap & crypto/compress: remove a couple of memcpy Date: Sat, 17 Feb 2024 17:50:59 +1300 Message-Id: <20240217045102.55339-1-21cnbao@gmail.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Stat-Signature: 78g7zj5qtrdyecrtoigyxe4sutwnroid X-Rspamd-Server: rspam10 X-Rspamd-Queue-Id: 4236520013 X-Rspam-User: X-HE-Tag: 1708145482-416816 X-HE-Meta: U2FsdGVkX1+7Lu6Kh0UEemsJdM9oxGKWJXLBuM+u7lLwvPnymdu8FAOxZ28c8S2eFnDO/6+cg7y/XaaVPZEFUSNE1aQkEBvIh/txhCkjaxrMjALQr1xZwx47YlP6yIJrcYVg32pDr2q0VegQYCbElkCIIBw5emJN4bMKiz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aaJZpv6+TdLSRz3mkTBV21QdQCloksNJMFLCfxTKPM6ZPPu3MQAyVRZl/8r6csepcxa+0NaFem3hDBRhMqrVzSkRfNuOX3fQIMyLwhAp0AXd7mmOfDQEBcR/EeOIa0mBxXJN8LnyHmikeYUghFq5qA== 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: <linux-mm.kvack.org> List-Subscribe: <mailto:majordomo@kvack.org> List-Unsubscribe: <mailto:majordomo@kvack.org> |
Series |
mm/zswap & crypto/compress: remove a couple of memcpy
|
expand
|
From: Barry Song <v-songbaohua@oppo.com> The patchset removes a couple of memcpy in zswap and crypto to improve zswap's performance. Thanks for Chengming Zhou's test and perf data. Quote from Chengming, I just tested these three patches on my server, found improvement in the kernel build testcase on a tmpfs with zswap (lz4 + zsmalloc) enabled. mm-stable 501a06fe8e4c patched real 1m38.028s 1m32.317s user 19m11.482s 18m39.439s sys 19m26.445s 17m5.646s -v3: * collect Acked-by of Yosry, Reviewed-by of Chengming * enhance commit message with respect to Yosry's comment Hi Andrew, Herbert, As zswap is the direct use of this patchset and zswap benefits from this series, It is probably better for this patchset to go through Andrew's mm tree than Herbert's crypto tree if there is no objection from Herbert. Barry Song (3): crypto: introduce acomp_is_sleepable to expose if comp drivers might sleep mm/zswap: remove the memcpy if acomp is not sleepable crypto: scompress: remove memcpy if sg_nents is 1 crypto/acompress.c | 8 ++++++++ crypto/scompress.c | 36 +++++++++++++++++++++++++++++------- include/crypto/acompress.h | 9 +++++++++ mm/zswap.c | 6 ++++-- 4 files changed, 50 insertions(+), 9 deletions(-)