summaryrefslogtreecommitdiff
path: root/drivers/dma-buf/dma-buf-sysfs-stats.h
diff options
context:
space:
mode:
authorHridya Valsaraju <hridya@google.com>2021-07-13 07:07:38 +0300
committerChristian König <christian.koenig@amd.com>2021-07-20 12:06:59 +0300
commitc715def51591a874a9fcfdc9a05d543e8797e697 (patch)
tree393cf502f7578c1e848de6471b50dc23a68d7469 /drivers/dma-buf/dma-buf-sysfs-stats.h
parent613ba71619cfe0e0a4b855aa1a2e337fab2dd416 (diff)
downloadlinux-c715def51591a874a9fcfdc9a05d543e8797e697.tar.xz
dma-buf: Delete the DMA-BUF attachment sysfs statistics
The DMA-BUF attachment statistics form a subset of the DMA-BUF sysfs statistics that recently merged to the drm-misc tree. They are not UABI yet since they have not merged to the upstream Linux kernel. Since there has been a reported a performance regression due to the overhead of sysfs directory creation/teardown during dma_buf_attach()/dma_buf_detach(), this patch deletes the DMA-BUF attachment statistics from sysfs. Fixes: bdb8d06dfefd ("dmabuf: Add the capability to expose DMA-BUF stats in sysfs") Signed-off-by: Hridya Valsaraju <hridya@google.com> Reviewed-by: Christian König <christian.koenig@amd.com> Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Link: https://patchwork.freedesktop.org/patch/msgid/20210713040742.2680135-1-hridya@google.com Signed-off-by: Christian König <christian.koenig@amd.com>
Diffstat (limited to 'drivers/dma-buf/dma-buf-sysfs-stats.h')
-rw-r--r--drivers/dma-buf/dma-buf-sysfs-stats.h27
1 files changed, 0 insertions, 27 deletions
diff --git a/drivers/dma-buf/dma-buf-sysfs-stats.h b/drivers/dma-buf/dma-buf-sysfs-stats.h
index 5f4703249117..a49c6e2650cc 100644
--- a/drivers/dma-buf/dma-buf-sysfs-stats.h
+++ b/drivers/dma-buf/dma-buf-sysfs-stats.h
@@ -14,23 +14,8 @@ int dma_buf_init_sysfs_statistics(void);
void dma_buf_uninit_sysfs_statistics(void);
int dma_buf_stats_setup(struct dma_buf *dmabuf);
-int dma_buf_attach_stats_setup(struct dma_buf_attachment *attach,
- unsigned int uid);
-static inline void dma_buf_update_attachment_map_count(struct dma_buf_attachment *attach,
- int delta)
-{
- struct dma_buf_attach_sysfs_entry *entry = attach->sysfs_entry;
- entry->map_counter += delta;
-}
void dma_buf_stats_teardown(struct dma_buf *dmabuf);
-void dma_buf_attach_stats_teardown(struct dma_buf_attachment *attach);
-static inline unsigned int dma_buf_update_attach_uid(struct dma_buf *dmabuf)
-{
- struct dma_buf_sysfs_entry *entry = dmabuf->sysfs_entry;
-
- return entry->attachment_uid++;
-}
#else
static inline int dma_buf_init_sysfs_statistics(void)
@@ -44,19 +29,7 @@ static inline int dma_buf_stats_setup(struct dma_buf *dmabuf)
{
return 0;
}
-static inline int dma_buf_attach_stats_setup(struct dma_buf_attachment *attach,
- unsigned int uid)
-{
- return 0;
-}
static inline void dma_buf_stats_teardown(struct dma_buf *dmabuf) {}
-static inline void dma_buf_attach_stats_teardown(struct dma_buf_attachment *attach) {}
-static inline void dma_buf_update_attachment_map_count(struct dma_buf_attachment *attach,
- int delta) {}
-static inline unsigned int dma_buf_update_attach_uid(struct dma_buf *dmabuf)
-{
- return 0;
-}
#endif
#endif // _DMA_BUF_SYSFS_STATS_H