]> www.infradead.org Git - users/jedix/linux-maple.git/commit
swiotlb: add debugfs to track swiotlb buffer usage
authorDongli Zhang <dongli.zhang@oracle.com>
Mon, 1 Apr 2019 06:28:59 +0000 (14:28 +0800)
committerBrian Maly <brian.maly@oracle.com>
Tue, 9 Apr 2019 21:23:13 +0000 (17:23 -0400)
commit042d245165d98cdffb0c2ace6cbf332f9d9b691a
treee5a0295cc129b1975d449c35bb0aea58b6270d7b
parent6efeeb26ed0272733bb89df3d8d7741d47fefadc
swiotlb: add debugfs to track swiotlb buffer usage

The device driver will not be able to do dma operations once swiotlb buffer
is full, either because the driver is using so many IO TLB blocks inflight,
or because there is memory leak issue in device driver. To export the
swiotlb buffer usage via debugfs would help the user estimate the size of
swiotlb buffer to pre-allocate or analyze device driver memory leak issue.

Signed-off-by: Dongli Zhang <dongli.zhang@oracle.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Orabug: 29582587
(cherry picked from commit 71602fe6d4e9291af105adfef8e893b57c735906)
Signed-off-by: Brian Maly <brian.maly@oracle.com>
Conflicts:
  debugfs_create_ulong() is not available. debugfs_create_file() is used instead.

Signed-off-by: Dongli Zhang <dongli.zhang@oracle.com>
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Brian Maly <brian.maly@oracle.com>
lib/swiotlb.c