]> www.infradead.org Git - users/jedix/linux-maple.git/commit
dma-direct: optimize page freeing when it is not addressable
authorChen Yu <yu.c.chen@intel.com>
Sat, 31 Aug 2024 11:01:19 +0000 (19:01 +0800)
committerChristoph Hellwig <hch@lst.de>
Wed, 4 Sep 2024 04:08:51 +0000 (07:08 +0300)
commitf689a3ab7b8ece9e5787ff058b96b8630e4931ad
tree2b43efba199ad12f3b52db8263dfa22ec807f724
parentde6c85bf918ea52d5c680f0d130b37ee2ff152d6
dma-direct: optimize page freeing when it is not addressable

When the CMA allocation succeeds but isn't addressable, its buffer has
already been released and the page is set to NULL.  So later when the
normal page allocation succeeds but isn't addressable, __free_pages()
can be used to free that normal page rather than using
dma_free_contiguous that does extra checks that are not needed.

Signed-off-by: Chen Yu <yu.c.chen@intel.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
kernel/dma/direct.c