lkml.org 
[lkml]   [2021]   [Apr]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] dma-buf: Add DmaBufTotal counter in meminfo
On Fri, Apr 16, 2021 at 11:37:19AM +0200, Peter Enderborg wrote:
> diff --git a/fs/proc/meminfo.c b/fs/proc/meminfo.c
> index 6fa761c9cc78..3c1a82b51a6f 100644
> --- a/fs/proc/meminfo.c
> +++ b/fs/proc/meminfo.c
> @@ -16,6 +16,7 @@
> #ifdef CONFIG_CMA
> #include <linux/cma.h>
> #endif
> +#include <linux/dma-buf.h>
> #include <asm/page.h>
> #include "internal.h"
>
> @@ -145,6 +146,7 @@ static int meminfo_proc_show(struct seq_file *m, void *v)
> show_val_kb(m, "CmaFree: ",
> global_zone_page_state(NR_FREE_CMA_PAGES));
> #endif
> + show_val_kb(m, "DmaBufTotal: ", dma_buf_get_size());
>
> hugetlb_report_meminfo(m);
>

... and if CONFIG_DMA_SHARED_BUFFER is not set ...?

\
 
 \ /
  Last update: 2021-04-16 13:09    [W:0.077 / U:0.048 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site