Re: [RFC PATCH 7/7] mm: zswap: Use acomp virtual address interface

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Mar 01, 2025 at 03:03:48PM +0800, Herbert Xu wrote:
> On Sat, Mar 01, 2025 at 02:36:50PM +0800, Herbert Xu wrote:
> >
> > I thought this was a lot more complicated and you had some weird
> > arbtirary pointer from an unknown source.  But if it's just highmem
> > I can get rid of the memcpy for you right now.
> 
> So it appears that your highmem usage is coming from zsmalloc.  In
> that case you don't want virtual addresses at all, you want an SG
> list.
> 
> In fact you've already gone through a totally unnecessary copy
> in _zs_map_object.  Had it simply given us a 2-entry SG list,
> the Crypto API can process the data directly with no copies at
> all.
> 
> The whole point of SG lists is to deal with memory fragmentation.
> When your object is too big to fit in a single page, you need an
> SG list to describe it.  Forcing virtual addresses just leads to
> an unnecessary copy.

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?

Will this patch series be dropped?

> 
> Chers,
> -- 
> Email: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
> Home Page: http://gondor.apana.org.au/~herbert/
> PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt




[Index of Archives]     [Kernel]     [Gnu Classpath]     [Gnu Crypto]     [DM Crypt]     [Netfilter]     [Bugtraq]
  Powered by Linux