Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp3847971rdb; Thu, 28 Dec 2023 01:49:45 -0800 (PST) X-Google-Smtp-Source: AGHT+IG8kORsG1LGmLZSu2BrZS6OgSn9upKGSjQFk5M5zj6RCBUUx2s1C9ulVgK14NdMQ8zXv1VH X-Received: by 2002:a81:7814:0:b0:5ed:2f09:2011 with SMTP id t20-20020a817814000000b005ed2f092011mr2289661ywc.54.1703756985688; Thu, 28 Dec 2023 01:49:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703756985; cv=none; d=google.com; s=arc-20160816; b=HIP51Q6RcQsPfvBzHgnniV9iz8dQtoV7rEiHuAgijIX0qqG8ZIU+ntN2lktp2yWo5Z tX2eEsK5ffSb5OhlOgq+HumkR2zBB4bex/RRtaETMriyrTki1d6+eKweue9bdV+aZgaZ R+ugkK9zurtgAdZjn6NUXV7W83cRm1yvfmhX6YI+UaUE0mn4C+judHw9zVp+WOjbntB0 FDvL/Qi+9IwXGI4w99mBkT9Mv0QVtXGKw2dkLnhaGYgXHT5EreQE86wbKKMO5iZ/+jR0 fVjAklhpPzbwJIY81C2NGljM6nXtjJnv/RW33+nQ/90rY/+T4U06NuUtiSTtEqGRRCTQ P0EQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date; bh=VpuVlMNAgNxy3TExMz7w8YcpF//gbKD/hst3ZY3VhU4=; fh=aOkqjSAgD3ZBTcAq0pjqMUX8gvTpoWVWqzMjo+xCoSk=; b=rAdMFli4f4UKAOQmx6w1uxGS01vBKCx3Royn7QJBLZvBmOp7XHsbS2MkMmN1P6dlwG Ae0JrI9RO35tswUciSE/e4l/3xASfYGszFzOwDvATDOJIa1x9ZCohIT1tp130GHKUpdO I4FlMcZkQREUCCj8t1EaNFXoInqEGi2q9w+ACfo4wDu4WVXD/3gL8n4AdIjpg4DluMe6 HfqsdrkuAdmSr1/9toE8NEr13bgcMq0TQ2UPx6/YO7KhpavKKnM4waWB5t9TNs7sSunI jYWOdduu9Ub/A3tctwSAH663yCIAny65SBlUojgQ9co5M/WA8p9qJY9/RduPtdU7Jtr7 N+DQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-12547-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-12547-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id z20-20020a0cf014000000b0067ef97830a5si16590733qvk.458.2023.12.28.01.49.45 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Dec 2023 01:49:45 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-12547-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-12547-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-12547-linux.lists.archive=gmail.com@vger.kernel.org" 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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 72C711C22838 for ; Thu, 28 Dec 2023 09:49:45 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 578B963CA; Thu, 28 Dec 2023 09:49:40 +0000 (UTC) X-Original-To: linux-kernel@vger.kernel.org Received: from abb.hmeau.com (abb.hmeau.com [144.6.53.87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 170D663C9 for ; Thu, 28 Dec 2023 09:49:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=gondor.apana.org.au Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gondor.apana.org.au Received: from loth.rohan.me.apana.org.au ([192.168.167.2]) by formenos.hmeau.com with smtp (Exim 4.94.2 #2 (Debian)) id 1rIn0j-00F5cs-9p; Thu, 28 Dec 2023 17:49:06 +0800 Received: by loth.rohan.me.apana.org.au (sSMTP sendmail emulation); Thu, 28 Dec 2023 17:49:16 +0800 Date: Thu, 28 Dec 2023 17:49:16 +0800 From: Herbert Xu To: Barry Song <21cnbao@gmail.com> Cc: Chengming Zhou , Andrew Morton , Seth Jennings , Johannes Weiner , Vitaly Wool , Nhat Pham , Chris Li , Yosry Ahmed , Dan Streetman , linux-kernel@vger.kernel.org, linux-mm@kvack.org, Chris Li Subject: Re: [PATCH v4 2/6] mm/zswap: reuse dstmem when decompress Message-ID: References: <20231213-zswap-dstmem-v4-0-f228b059dd89@bytedance.com> <20231213-zswap-dstmem-v4-2-f228b059dd89@bytedance.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Thu, Dec 28, 2023 at 09:03:32PM +1300, Barry Song wrote: > > for CPU-based alg, we have completed the compr/decompr within > crypto_acomp_decompress() > synchronously. they won't return EINPROGRESS, EBUSY. > > The problem is that crypto_acomp won't expose this information to its > users. if it does, > we can use this info, we will totally avoid the code of copying > zsmalloc's data to a tmp > buffer for the most majority users of zswap. > > But I am not sure if we can find a way to convince Herbert(+To) :-) What would you like to expose? The async status of the underlying algorithm? We could certainly do that. But I wonder if it might actually be better for you to allocate a second sync-only algorithm for such cases. I'd like to see some real numbers. Cheers, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt