Merge "mm: cma: add trace events for CMA alloc perf testing"

This commit is contained in:
qctecmdr 2019-10-24 22:12:28 -07:00 • committed by Gerrit - the friendly Code Review server
commit 95c1375460
4 changed files with 93 additions and 1 deletions

View file

@ -438,6 +438,8 @@ struct page *cma_alloc(struct cma *cma, size_t count, unsigned int align,
if (!count)
return NULL;
trace_cma_alloc_start(count, align);
mask = cma_bitmap_aligned_mask(cma, align);
offset = cma_bitmap_aligned_offset(cma, align);
bitmap_maxno = cma_bitmap_maxno(cma);
@ -495,6 +497,8 @@ struct page *cma_alloc(struct cma *cma, size_t count, unsigned int align,
pr_debug("%s(): memory range at %p is busy, retrying\n",
__func__, pfn_to_page(pfn));
trace_cma_alloc_busy_retry(pfn, pfn_to_page(pfn), count, align);
/* try again with a bit different memory target */
start = bitmap_no + mask + 1;
}