c715def515
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>
36 lines
729 B
C
36 lines
729 B
C
/* SPDX-License-Identifier: GPL-2.0-only */
|
|
/*
|
|
* DMA-BUF sysfs statistics.
|
|
*
|
|
* Copyright (C) 2021 Google LLC.
|
|
*/
|
|
|
|
#ifndef _DMA_BUF_SYSFS_STATS_H
|
|
#define _DMA_BUF_SYSFS_STATS_H
|
|
|
|
#ifdef CONFIG_DMABUF_SYSFS_STATS
|
|
|
|
int dma_buf_init_sysfs_statistics(void);
|
|
void dma_buf_uninit_sysfs_statistics(void);
|
|
|
|
int dma_buf_stats_setup(struct dma_buf *dmabuf);
|
|
|
|
void dma_buf_stats_teardown(struct dma_buf *dmabuf);
|
|
#else
|
|
|
|
static inline int dma_buf_init_sysfs_statistics(void)
|
|
{
|
|
return 0;
|
|
}
|
|
|
|
static inline void dma_buf_uninit_sysfs_statistics(void) {}
|
|
|
|
static inline int dma_buf_stats_setup(struct dma_buf *dmabuf)
|
|
{
|
|
return 0;
|
|
}
|
|
|
|
static inline void dma_buf_stats_teardown(struct dma_buf *dmabuf) {}
|
|
#endif
|
|
#endif // _DMA_BUF_SYSFS_STATS_H
|