From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from abb.hmeau.com (abb.hmeau.com [180.181.231.80]) (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 F0FA325CC74 for ; Wed, 7 Jan 2026 05:43:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=180.181.231.80 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767764591; cv=none; b=XnrX9rXALGOJwGGLUoAYz5WSn+7KVSb2GRb36IBP5wRI6h6ounjParEPYRNCoJZHGORCpQtho4Pa686YV0zn5z3ZbTHHA1mPaAX3OXXoLPm/mtywb4I4rVqqqlFmyfbzZ/MM5Mk0DWD9ovAGZttRFt+cCBTMu2R9V4I6el4GkdA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767764591; c=relaxed/simple; bh=gsZRYa+sfxLwOV0PYECK2hHK4M3iAHERcrvP443bhQ8=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=cuOnUuZq4jPFpuAOcohamPv2KIjhbuywczwUpIreX6OrC6eIGnVLPu9T37CkohTU1ffheYet0vjsUq9eJHzLUJBOh9KtAzi1gW18iWu1Dnu3yfzwr4lFU7V6ceVxcYKjImVmxFziPzx4idstL9PdN9knNNEHYNG369V7PJETlO8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=gondor.apana.org.au; spf=pass smtp.mailfrom=gondor.apana.org.au; dkim=pass (2048-bit key) header.d=gondor.apana.org.au header.i=@gondor.apana.org.au header.b=Kw+G0TDb; arc=none smtp.client-ip=180.181.231.80 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=gondor.apana.org.au Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gondor.apana.org.au Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gondor.apana.org.au header.i=@gondor.apana.org.au header.b="Kw+G0TDb" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gondor.apana.org.au; s=h01; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:cc:to:subject:message-id:date: from:content-type:reply-to; bh=iitbgM450gN2Z/tpWVzbqWUN/OZbgIFpKN7OaANwQPc=; b=Kw+G0TDb9MizjeijBu17cyEUZmBMLGJ5eJDX8C1FvTXcnXBZleoqwZ5FGGWaplpDy1QZdeiaMBU Upa7Mp8TEAEWn3FCGauqurv1HXW0L6zXFJb3gCMtlUTRtJM+KZIxSioHyVQvRUlb+kpyx7Oq8YJ4F +EE5yMomnnXEDuYgspieDgKk3JKw0FfFcQVZLluYZgvlv1G4faJGf4GAqkMziCO2cEOKyBwYKpf8x nDakF0wFnCainV2v8qnD7YY9t/lZYdFXOU3JBG4VpGZBVDTIQowHPktq/7O1lJATUow87xjzLhwOO tf0n+0PEMZBwR0gQoBBPNuaQPpGubH7i2gkg==; Received: from loth.rohan.me.apana.org.au ([192.168.167.2]) by formenos.hmeau.com with smtp (Exim 4.96 #2 (Debian)) id 1vdMJj-00EqNT-1f; Wed, 07 Jan 2026 13:42:48 +0800 Received: by loth.rohan.me.apana.org.au (sSMTP sendmail emulation); Wed, 07 Jan 2026 13:42:47 +0800 Date: Wed, 7 Jan 2026 13:42:47 +0800 From: Herbert Xu To: Yosry Ahmed Cc: Sergey Senozhatsky , Andrew Morton , Nhat Pham , Minchan Kim , Johannes Weiner , Brian Geffon , linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [RFC PATCH 2/2] zsmalloc: chain-length configuration should consider other metrics Message-ID: References: <20260101013814.2312147-3-senozhatsky@chromium.org> <5p4iyah6zlrnxpbsis32c4m5lrjj3pq7xwcugq35d2entwfai2@n2r6y3ga2ie5> <7q5gqpfshnc3lfhzxughpks3fc2knw2delpm5io2oe54monydl@5isuxnjputjr> <9b7d6e6292c64f21b8d09def1b6723f02faffe88@linux.dev> 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: <9b7d6e6292c64f21b8d09def1b6723f02faffe88@linux.dev> On Wed, Jan 07, 2026 at 05:39:50AM +0000, Yosry Ahmed wrote: > > In this case I think we can just make zsmalloc return an SG list and use it in both zswap and zram. We will fallback to the memcpy() in scomp instead of the memcpy() in zsmalloc, and we'll drop the memcpy() logic in zswap as a bonus. > > Will this for acomp though? Yes it works for acomp too since scomp sits underneath acomp. > Yeah the effort to add native support to compressors can be done separately. For zswap, I think the most common compressors are actually zstd and LZ4. OK once you start using it then I could add the native SG support to LZO and it should become a little bit faster (and eliminate the need for the scomp bounce page). Cheers, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt