From mboxrd@z Thu Jan 1 00:00:00 1970 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 A7C0CC5475B for ; Sat, 9 Mar 2024 03:23:42 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id C2B616B0078; Fri, 8 Mar 2024 22:23:41 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id BDBA36B007B; Fri, 8 Mar 2024 22:23:41 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id AA33D6B007D; Fri, 8 Mar 2024 22:23:41 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id 9A7AC6B0078 for ; Fri, 8 Mar 2024 22:23:41 -0500 (EST) Received: from smtpin15.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id 6F4FBA14CE for ; Sat, 9 Mar 2024 03:23:41 +0000 (UTC) X-FDA: 81876055842.15.FBD8EE6 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf01.hostedemail.com (Postfix) with ESMTP id 63E8040007 for ; Sat, 9 Mar 2024 03:23:38 +0000 (UTC) Authentication-Results: imf01.hostedemail.com; dkim=pass header.d=linux-foundation.org header.s=korg header.b=W0sZ8yKg; dmarc=none; spf=pass (imf01.hostedemail.com: domain of akpm@linux-foundation.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=akpm@linux-foundation.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1709954620; 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-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=4bHM3L43lToQSqUEefin9TwYAO1czrjLzX+npevMgVw=; b=36P5M0crj07rThKEgvmYiP5VogmJNLSQHcTVrzJU2J8KgEh3QDWBvqvSgqs1b6kIORQjqN zphR4OdQQ+HhPEsoGD225AEEm003PuT4y4iPIUECrl/32x2mJVJtSV9esyS/IX2cBviQn1 5XI1te/YftSNzu0OXdJtk3UNpOFF8SQ= ARC-Authentication-Results: i=1; imf01.hostedemail.com; dkim=pass header.d=linux-foundation.org header.s=korg header.b=W0sZ8yKg; dmarc=none; spf=pass (imf01.hostedemail.com: domain of akpm@linux-foundation.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=akpm@linux-foundation.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1709954620; a=rsa-sha256; cv=none; b=M0hlZ9TsTJnsyXTerhc5Ij92NRlPfgMsSQFlP4ZQRXuStIibez8lRDFpSw07LXHscBMiRm S4y6FG7DMvppM4tcWLyunpIu44dEw1hrr1n9Q2gR+RQbwyegMbPvoANejoCN/C+v2bRBMR QdgXvl6ptHQgn+7u6zuGGimzOCv4vfI= Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 24C1F6119B; Sat, 9 Mar 2024 03:23:37 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1983BC433F1; Sat, 9 Mar 2024 03:23:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1709954616; bh=bSwSfWYlj9F7+5cVfSd2Y34uxjt9xC2p8EkDBAvcXVc=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=W0sZ8yKgVOMnY3zF8BvGAaQCSuCbkb6zj46ry8OzVPGsV0oWBesXhsp7pVHkTLEPN Zp0QW6McgLgRuK3FiP3Kg3MqPqAU3DmFSC+mWPZAvQeb1x/2BfuyGhOKyElRpWF1tl qJB/nvoFCrMM6ns8p1TYqvrYVmBckvkUgodQ/HiU= Date: Fri, 8 Mar 2024 19:23:34 -0800 From: Andrew Morton To: Barry Song <21cnbao@gmail.com> Cc: herbert@gondor.apana.org.au, chriscli@google.com, chrisl@kernel.org, ddstreet@ieee.org, linux-kernel@vger.kernel.org, sjenning@redhat.com, vitaly.wool@konsulko.com, Barry Song , davem@davemloft.net, hannes@cmpxchg.org, linux-crypto@vger.kernel.org, linux-mm@kvack.org, zhouchengming@bytedance.com, nphamcs@gmail.com, yosryahmed@google.com Subject: Re: [PATCH v6 0/2] zswap: remove the memcpy if acomp is not sleepable Message-Id: <20240308192334.845b27504a663ec8af4f2aad@linux-foundation.org> In-Reply-To: References: <20240222081135.173040-1-21cnbao@gmail.com> X-Mailer: Sylpheed 3.8.0beta1 (GTK+ 2.24.33; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 63E8040007 X-Rspam-User: X-Rspamd-Server: rspam04 X-Stat-Signature: iauggsqeju9ei6kumwg3r44j3y4szepk X-HE-Tag: 1709954618-449014 X-HE-Meta: U2FsdGVkX1+E5Z5t0vJbkNxLZOR6rkK6FU1EuZXVkI4PQqACEGuGLI8yG38knCAH5HSYb3wwDx8R7JTasuSKC69yvb3I9gIVeLIW/Q7ayJb4dUvmObMWA2XYAv4JUWEyV3cIFxM/HGo+OHprzW61AhhndksHRRCs5XPueuQM3irFJkaYzxRQdi8RKAsAmFE5mNahpPqqTByWSuV5ULUb1RKMd7gTHk5dr5Avc+m0ql7XBQJf+jffIl2b8V+sClopJro+iFQOj5Tdw4hVn0g+liP2OS6buvZp2d5we50Xu4caQjKc/ibsaEnYUDvK9cXLj29rJoxFeodCIFQomMDFkxKf92jN84sRsC6NC1pDhjOC6RUTXNNBcFOyHuNVyKRXXL0AYG3sYEGSR1SG/T2wOJZjKfSVvkrFO0e33H6ZvEOmi5+80HuKdo5cYtxR1+cbn9H7ysLHZ5rzuVcnv85CAZzIYrFhaUO/MHSRZHJEKKxfDJA37bXqKRxNSnfAviDXECTkgTQYtb4hneXaERtZ5/gHk/wiTmpIQe+3caMKy6nyGQPKLkJfhMBW/yLmHVHIPPU0+ZSrq1xOAfztoJqjIqAgLw6MA6ax3Rk7mBThx2eLGzYW3W3xQcROhy0ls+ELoz+WOntGbnLvnodIqE2DHri0LSh6zuuwUp6LHsFtkJw9AGYZTSzNrdYn2CwiDVcTas71/4j9WbxF0bX22rHqo6GwSmI+4kx7bsex7cnczyZ289V7RItPwPh11PO4srM4xUmuETZh+gmahWjYEXyPYigvaw8uTbw6wyvxBM0uqQacJyOiuoWaLW/xogUuG/YNkE/eV1P8LJpIXgsTG3SmvedyY6+BgVJMHi0AUhkjMDOMiaXdGzQzJ/KZ0ovrjIAy8Ea7HlprqpRh/upfWCE4+T+pJMGE/fgEbynQWg50Xfx3g1nWxLbSEw== 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: On Fri, 8 Mar 2024 19:57:38 +0800 Barry Song <21cnbao@gmail.com> wrote: > Hi Andrew, > > On Thu, Feb 22, 2024 at 4:11 PM Barry Song <21cnbao@gmail.com> wrote: > > > > From: Barry Song > > > > In zswap, if we use zsmalloc, we cannot sleep while we map the > > compressed memory, so we copy it to a temporary buffer. By > > knowing the alg won't sleep can help zswap to avoid the > > memcpy. > > Thus we introduce an API in crypto to expose if acomp is async, > > and zswap can use it to decide if it can remove copying to the > > tmp buffer. > > > > -v6: > > * add acked-by of Herbert, Thanks! > > * remove patch 3/3 from the series, as that one will go > > through crypto > > Can you please pull this into mm-tree? This used to have 3 patches. > > 3/3 was separated according to Herbert's requirements and has > been in a crypto tree. > crypto: scomp - remove memcpy if sg_nents is 1 and pages are lowmem > https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git/commit/?id=77292bb8ca > > Two drivers fixes(patch 1 needs) have also been in crypto tree: > crypto: hisilicon/zip - fix the missing CRYPTO_ALG_ASYNC in cra_flags > https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git/commit/?id=db8ac88385 > > crypto: iaa - fix the missing CRYPTO_ALG_ASYNC in cra_flags > https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git/commit/?id=30dd94dba35 > > So it should be quite safe to pull this series into mm-tree now. But this zswap chage requires the presence of the other patches, yes? So the mm.git tree alone will be buggy? And if mm.git merges ahead of the other trees, there will be a window where mainline will be buggy? If so, I think it wuold be better to merge the zswap patch in the next merge window.