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 Wed, Mar 05, 2025 at 03:46:18PM +0800, Herbert Xu wrote:
>
> > Also, please take a look at patch 2 in this series for another reason, I
> > want to make sure if your virtual address series can be used to remove
> > the !virt_addr_valid() memcpy() case completely.
> 
> Yes it should work provided that you specify the memory as nondma.

Actually you can do better than that, specify the memory as nondma
if IS_ENABLED(CONFIG_HIGHMEM), and otherwise as virt.

The idea is that we only have two hardware offload drivers, both
from Intel and they're probably not going to be used on platforms
with HIGHMEM.

So something like:

	if (IS_ENABLED(CONFIG_HIGHMEM))
		acomp_request_set_nondma(acomp_ctx->req, src, dst, entry->length, PAGE_SIZE);
	else
		acomp_request_set_virt(acomp_ctx->req, src, dst, entry->length, PAGE_SIZE);

Of course all this would disappear if we used SG lists properly.

Cheers,
-- 
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]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux