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