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 0080FC021B8 for ; Tue, 4 Mar 2025 03:30:08 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 6B6016B0083; Mon, 3 Mar 2025 22:30:08 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 666556B0089; Mon, 3 Mar 2025 22:30:08 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 554AD6B008A; Mon, 3 Mar 2025 22:30:08 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id 3798B6B0083 for ; Mon, 3 Mar 2025 22:30:08 -0500 (EST) Received: from smtpin27.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id 1FC5B1CA64E for ; Tue, 4 Mar 2025 03:30:06 +0000 (UTC) X-FDA: 83182440012.27.E0FA913 Received: from abb.hmeau.com (abb.hmeau.com [144.6.53.87]) by imf28.hostedemail.com (Postfix) with ESMTP id 7AEFEC0006 for ; Tue, 4 Mar 2025 03:30:02 +0000 (UTC) Authentication-Results: imf28.hostedemail.com; dkim=pass header.d=hmeau.com header.s=formenos header.b=g+DS0Bp7; spf=pass (imf28.hostedemail.com: domain of herbert@gondor.apana.org.au designates 144.6.53.87 as permitted sender) smtp.mailfrom=herbert@gondor.apana.org.au; dmarc=pass (policy=quarantine) header.from=apana.org.au ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1741059004; 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: in-reply-to:in-reply-to:references:references:dkim-signature; bh=rFsTboUj7sEp6BL834xzymGgVd/XeRc58hzpRPIhZ0w=; b=aF+PTSSr51yEEv9D19SFclZlOgMaGalpzxnbvXQtwttMh6GGVXDDCFAWo+aWPGjml4r26q k/k96HCIxuAaZZlUswzWC0G/yNPMsWnSC/jDVOLGNxSrX/G3PXEIk6OktYJj0nf4Md+xv0 N3+SoKH+rIhNdpNQM9bbRHn38SZcCJs= ARC-Authentication-Results: i=1; imf28.hostedemail.com; dkim=pass header.d=hmeau.com header.s=formenos header.b=g+DS0Bp7; spf=pass (imf28.hostedemail.com: domain of herbert@gondor.apana.org.au designates 144.6.53.87 as permitted sender) smtp.mailfrom=herbert@gondor.apana.org.au; dmarc=pass (policy=quarantine) header.from=apana.org.au ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1741059004; a=rsa-sha256; cv=none; b=0xUJvJsQytiga3ssog0oQGauMCm291uMZWX68O7Y1TBNoKyJLD3vvno/KcrefthoDhBtQ0 S3i/5iahxzA7sN/3X56ZSWnQwb3JeYwUgDjnustgNEkhC8n+8/kZ3aYznTNueTYPApT9zQ v+tPDWNGXUJ/QD54d36BPi8IJuwlMfY= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=hmeau.com; s=formenos; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=rFsTboUj7sEp6BL834xzymGgVd/XeRc58hzpRPIhZ0w=; b=g+DS0Bp7LvVDaRN0qQhnkYFANZ twrjf7sKijWCRHuAlHW8q9y3kGIdflwU9/qUr7+NEXfFkdyY0lL2iEysanhOPJEar3Pepd0Nv1ouv er0nZAwA+9gSpf8ERjqgUfHryaoNsjDTqE4VoXhWc4RKcq+PUZTWFeOI+spKK7V96aYN9OdtOGY7Y RRaFFi5ULsVG5xnz+IkSITRJkiBt+pn0dCHMzV8ybNxi80KEqCS7TW6jiEyxvWJertxtxdw2Fuq7A C16j4nkz4ZdxmVEq4NVRT4fMyDoQ/c10r0x/eB2Dh0Li/E3AfHpmfWVxb21KSnb8R2Ak5161Uv++w wao38rSA==; Received: from loth.rohan.me.apana.org.au ([192.168.167.2]) by formenos.hmeau.com with smtp (Exim 4.96 #2 (Debian)) id 1tpIyW-003USb-0o; Tue, 04 Mar 2025 11:29:45 +0800 Received: by loth.rohan.me.apana.org.au (sSMTP sendmail emulation); Tue, 04 Mar 2025 11:29:44 +0800 Date: Tue, 4 Mar 2025 11:29:44 +0800 From: Herbert Xu To: Yosry Ahmed Cc: Eric Biggers , Sergey Senozhatsky , Linux Crypto Mailing List , linux-mm@kvack.org Subject: Re: [RFC PATCH 7/7] mm: zswap: Use acomp virtual address interface Message-ID: References: <153c340a52090f2ff82f8f066203186a932d3f99.1740651138.git.herbert@gondor.apana.org.au> <20250227183847.GB1613@sol.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Stat-Signature: uzt3bdj1copzhkd9ewttsx7pt8gj5n9u X-Rspamd-Server: rspam11 X-Rspamd-Queue-Id: 7AEFEC0006 X-Rspam-User: X-HE-Tag: 1741059002-591109 X-HE-Meta: U2FsdGVkX1/726fCS50V/2dWPmcKY/H9/LeNdwDFw5OaAPv2llu+YwQl+ppxr+EwoW167SymXVqxuvIZXfCePkIg/l4VDpqRkKzs6sAGmBWLoNoesCxAO7nysMARETkjJjq4gKdrkwa8xFe4LM741O6B9l/K4ZCaXneJMyFupMiX5RBqenZuA5OryoeYUBraA/s3EDYopm8g8c7WbXPEQfd4goF3Y2jnF5ztF6bOaeNDWnHCOteDjBDvaZ1y1lemyLl/PGM6MGDd4szumUMyHmPWPUejQITTnskb7Ae7cs1xuUQRKp9osJ1pUP7S8cupKNApEIwI9ur4nm+WohqKA+YGiZamx11F33deMmu6kGwp15P5Wwo0/RshKscRPaKffG9ZJiJDQtgiCHofOCaKtvBNipNOMsyIoa3MOJd9lWznD6+paJuRnDsGkGsB74L9XGnOEYcztAWv5gPkWyttMMHlvPgI3z/L+peMFOrROzl1iIWsx4V3KZo2mFnRcc1McyIXFSjrdSgUnrMeTpawRKwu7tyy2NQU0nHU1T9LVxh7Emef5VsnppVOT1QtSibfRanKCXZZoHYh8uKuyuy0di/qW64dMTqTnwN5aKWLxsbCJramPZXiWbxGnkUZrKqAlCIzZrOJx+huaWm7OIPDx2ZodFdPYvK+ECuEVJLaI6gKBCCgV/xK637LtcYPgMpG5Mh3WjUSHgc//pRw6zLqChjqKK3V32MSTKlDTKcMQwmXOmaQkT1skYszuHb4itvGsoLH3mWXM+xMjgIH8MCjhRQi1ymlyzO3WbmNOt6HMh241txmJHEptphOXxwPGZp3lBoRnlAhlGi3uQ6NMMoGsFzRhsX4WbcUlpLg5X8vtwHbdbmp2HZHRJYUL1BZDYy9NU1C+8cu7TH6nnb/RHohbDm+mpuc4aB7tHMMHH0TTXRxQgxev4knGdbra1jHpyfpqulNkAKmgb/MhUxJDCR 6D88XR8f jJwwTXwycaJC2PMPxafqh6zaWMaCi8dSVhlpGUYiwXHlgBO2FONTwOpDYg4l09avbbyMshFetD//gAJBUkDbG8Tho8C88PSA/d3TIW+PDeS7x5XvpLUPbU/CVRlIo01jOu9HFhwfBlrBRUbJ99tMLvWpHwas3hOzvKVkFf2TebZLp7qls9r4Pu7ETqnWnZuAI/stMaLaCJ103+b1cRsUDzxoSMgk/KVP+u0cckM084qax64/7gbXnm7wQb1yZnaqJmTShe8YXpAF7zM8= 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 Mon, Mar 03, 2025 at 08:17:27PM +0000, Yosry Ahmed wrote: > > I have seen the other thread with Sergey, I believe the conclusion is > that zsmalloc will be updated to use SG lists, at which point zswap can > just pass this as-is to the crypto API, and we don't need any copies in > either zsmalloc or zswap. > > Is this correct? That is my hope yes. So there are two reasons why zswap should be using SG lists: 1) Non-linear memory because compressed object spans two pages; 2) Highmem. > Will this patch series be dropped? Not comletely, I rather liked the simplification of the scomp scratch code. And the chaining functionality is still needed for the batching work. The virtual address support will disappear for now but could always come back if someone wants to do that. However, I will reinstate the scomp scratch buffer in a more limited form just to cater for the need to linearise things if the algorithm does not support non-linear input (I hope to modify the algorithms we care about to support non-linear input but that's going to be a long-term project apart from LZO which I've already completed). Right now there is a proliferation of per-cpu buffers throughout the zswap/acomp call-stack. I'm going to consolidate them so that there is a single per-cpu buffer for everything (the stream memory, and the linearisation buffer), and that it only comes into play when needed (so hopefully LZO decompression will become completely preemptible and not use any per-cpu buffers at all). Once that is done I will repost this. Thanks, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt