swiotlb: use the atomic counter of total used slabs if available
authorPetr Tesarik <petr.tesarik.ext@huawei.com>
Wed, 7 Jun 2023 09:04:18 +0000 (11:04 +0200)
committerChristoph Hellwig <hch@lst.de>
Wed, 7 Jun 2023 13:06:40 +0000 (15:06 +0200)
commit693405cf11357017ea29764e3bd9488a2d292d8f
tree92e8af68663f2ae5f32e36cdba73cc679873168c
parentefa76afdde16f195f8faff0e8dbe58ec18aad70c
swiotlb: use the atomic counter of total used slabs if available

If DEBUG_FS is enabled, the cost of keeping an exact number of total
used slabs is already paid. In this case, there is no reason to use an
inexact number for statistics and kernel messages.

Signed-off-by: Petr Tesarik <petr.tesarik.ext@huawei.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
kernel/dma/swiotlb.c