]> git.baikalelectronics.ru Git - kernel.git/commit
dma-debug: remove debug_dma_assert_idle() function
authorLinus Torvalds <torvalds@linux-foundation.org>
Fri, 14 Aug 2020 22:22:43 +0000 (15:22 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 14 Aug 2020 22:22:43 +0000 (15:22 -0700)
commit5e6b661908532549ac72dbdf3a14aa1278971c2e
tree740d7bd1ae3c67665ff0d602e1ccfea013609264
parent70565a5815002e158fe4bdab431bdc39b275a3b4
dma-debug: remove debug_dma_assert_idle() function

This remoes the code from the COW path to call debug_dma_assert_idle(),
which was added many years ago.

Google shows that it hasn't caught anything in the 6+ years we've had it
apart from a false positive, and Hugh just noticed how it had a very
unfortunate spinlock serialization in the COW path.

He fixed that issue the previous commit (70565a581500: "dma-debug: fix
debug_dma_assert_idle(), use rcu_read_lock()"), but let's see if anybody
even notices when we remove this function entirely.

NOTE! We keep the dma tracking infrastructure that was added by the
commit that introduced it.  Partly to make it easier to resurrect this
debug code if we ever deside to, and partly because that tracking by pfn
and offset looks quite reasonable.

The problem with this debug code was simply that it was expensive and
didn't seem worth it, not that it was wrong per se.

Acked-by: Dan Williams <dan.j.williams@intel.com>
Acked-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
include/linux/dma-debug.h
kernel/dma/Kconfig
kernel/dma/debug.c
mm/memory.c