]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
xen/swiotlb: remember having called xen_create_contiguous_region()
authorJuergen Gross <jgross@suse.com>
Fri, 14 Jun 2019 05:46:04 +0000 (07:46 +0200)
committerJuergen Gross <jgross@suse.com>
Thu, 1 Aug 2019 04:39:33 +0000 (06:39 +0200)
commitb877ac9815a8fe7e5f6d7fdde3dc34652408840a
tree0b1477601024cd45a16c092feffde094070cf6cd
parentbf70726668c6116aa4976e0cc87f470be6268a2f
xen/swiotlb: remember having called xen_create_contiguous_region()

Instead of always calling xen_destroy_contiguous_region() in case the
memory is DMA-able for the used device, do so only in case it has been
made DMA-able via xen_create_contiguous_region() before.

This will avoid a lot of xen_destroy_contiguous_region() calls for
64-bit capable devices.

As the memory in question is owned by swiotlb-xen the PG_owner_priv_1
flag of the first allocated page can be used for remembering.

Signed-off-by: Juergen Gross <jgross@suse.com>
Acked-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Juergen Gross <jgross@suse.com>
drivers/xen/swiotlb-xen.c
include/linux/page-flags.h