lkml.org 
[lkml]   [2015]   [Apr]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] mm: cma: add trace events for CMA allocations and freeings
Hello,

On Wed, Apr 01, 2015 at 04:31:43PM +0300, Stefan Strogin wrote:
> Add trace events for cma_alloc() and cma_release().
>
> The cma_alloc tracepoint is used both for successful and failed allocations,
> in case of allocation failure pfn=-1UL is stored and printed.
>
> Signed-off-by: Stefan Strogin <stefan.strogin@gmail.com>
> ---
>
> Took out from the patch set "mm: cma: add some debug information for CMA" v4
> (http://thread.gmane.org/gmane.linux.kernel.mm/129903) because of probable
> uselessness of the rest of the patches.

I think that patch 5/5 in previous submission is handy and
simple to merge. Although we can calculate it by using bitmap,
it would be good to get that information(used size and maxchunk size)
directly.


> @@ -414,6 +416,8 @@ struct page *cma_alloc(struct cma *cma, unsigned int count, unsigned int align)
> start = bitmap_no + mask + 1;
> }
>
> + trace_cma_alloc(page ? pfn : -1UL, page, count);
> +

I think that tracing align is also useful.
Is there any reason not to include it?

Thanks.



\
 
 \ /
  Last update: 2015-04-02 10:01    [W:0.044 / U:0.336 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site