author | tao zeng <tao.zeng@amlogic.com> | 2018-01-15 06:04:52 (GMT) |
---|---|---|
committer | jie.yuan <jie.yuan@amlogic.com> | 2018-03-20 03:07:00 (GMT) |
commit | cc266ea9ae3eaf2fed103af1e6f4029f8a3ea891 (patch) | |
tree | db3f4042dfb943d329299ec0903dec6010d55670 | |
parent | 7c90f2229dbfa587610ca779dc381c79a033ec22 (diff) | |
download | common-cc266ea9ae3eaf2fed103af1e6f4029f8a3ea891.zip common-cc266ea9ae3eaf2fed103af1e6f4029f8a3ea891.tar.gz common-cc266ea9ae3eaf2fed103af1e6f4029f8a3ea891.tar.bz2 |
memory: merge modification of tao.zeng [6/9]
mm: close debug print of cma alloc
PD#153120: mm: close debug print of cma alloc
These print message may print a lot when video playback
And cause it not smooth.
Change-Id: If1f18d5e8a0234f1daca2c6e803a23ba90354414
Signed-off-by: tao zeng <tao.zeng@amlogic.com>
-rw-r--r-- | mm/page_alloc.c | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/mm/page_alloc.c b/mm/page_alloc.c index dc0ff7e..4e620be 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -7502,6 +7502,10 @@ bool is_pageblock_removable_nolock(struct page *page) #if (defined(CONFIG_MEMORY_ISOLATION) && defined(CONFIG_COMPACTION)) || defined(CONFIG_CMA) +#ifdef CONFIG_AMLOGIC_MODIFY +#define cma_debug pr_debug +#endif /* CONFIG_AMLOGIC_MODIFY */ + static unsigned long pfn_max_align_down(unsigned long pfn) { return pfn & ~(max_t(unsigned long, MAX_ORDER_NR_PAGES, @@ -7530,7 +7534,8 @@ static int __alloc_contig_migrate_range(struct compact_control *cc, if (fatal_signal_pending(current)) { ret = -EINTR; #ifdef CONFIG_AMLOGIC_MODIFY /* for debug */ - pr_err("cma %s %d, ret:%d\n", __func__, __LINE__, ret); + cma_debug("cma %s %d, ret:%d\n", + __func__, __LINE__, ret); #endif /* CONFIG_AMLOGIC_MODIFY */ break; } @@ -7541,7 +7546,7 @@ static int __alloc_contig_migrate_range(struct compact_control *cc, if (!pfn) { ret = -EINTR; #ifdef CONFIG_AMLOGIC_MODIFY /* for debug */ - pr_err("cma %s %d, ret:%d\n", + cma_debug("cma %s %d, ret:%d\n", __func__, __LINE__, ret); #endif /* CONFIG_AMLOGIC_MODIFY */ break; @@ -7550,7 +7555,8 @@ static int __alloc_contig_migrate_range(struct compact_control *cc, } else if (++tries == 5) { ret = ret < 0 ? ret : -EBUSY; #ifdef CONFIG_AMLOGIC_MODIFY /* for debug */ - pr_err("cma %s %d, ret:%d\n", __func__, __LINE__, ret); + cma_debug("cma %s %d, ret:%d\n", + __func__, __LINE__, ret); #endif /* CONFIG_AMLOGIC_MODIFY */ break; } @@ -7565,7 +7571,7 @@ static int __alloc_contig_migrate_range(struct compact_control *cc, if (ret < 0) { putback_movable_pages(&cc->migratepages); #ifdef CONFIG_AMLOGIC_MODIFY /* for debug */ - pr_err("cma %s %d, ret:%d\n", __func__, __LINE__, ret); + cma_debug("cma %s %d, ret:%d\n", __func__, __LINE__, ret); #endif /* CONFIG_AMLOGIC_MODIFY */ return ret; } @@ -7613,7 +7619,7 @@ static void cma_boost_work_func(struct work_struct *work) atomic_add(BOOST_BUSY, ok); /* tell caller busy */ if (ret) { - pr_err("%s, failed, ret:%d, ok:%d\n", + cma_debug("%s, failed, ret:%d, ok:%d\n", __func__, ret, atomic_read(ok)); } } @@ -7659,7 +7665,7 @@ int alloc_contig_boost(unsigned long start_pfn, unsigned long count) ret = -EINVAL; if (ret) { - pr_err("%s, failed, ret:%d, ok:%d\n", + cma_debug("%s, failed, ret:%d, ok:%d\n", __func__, ret, atomic_read(&ok)); } @@ -7737,7 +7743,7 @@ int alloc_contig_range(unsigned long start, unsigned long end, false); #ifdef CONFIG_AMLOGIC_MODIFY if (ret) { /* for debug */ - pr_err("cma %s %d, ret:%d\n", __func__, __LINE__, ret); + cma_debug("cma %s %d, ret:%d\n", __func__, __LINE__, ret); return ret; } #else @@ -7819,7 +7825,7 @@ int alloc_contig_range(unsigned long start, unsigned long end, /* Make sure the range is really isolated. */ if (test_pages_isolated(outer_start, end, false)) { - pr_debug("%s: [%lx, %lx) PFNs busy\n", + cma_debug("%s: [%lx, %lx) PFNs busy\n", __func__, outer_start, end); ret = -EBUSY; goto done; @@ -7830,7 +7836,7 @@ int alloc_contig_range(unsigned long start, unsigned long end, if (!outer_end) { ret = -EBUSY; #ifdef CONFIG_AMLOGIC_MODIFY - pr_err("cma %s %d, ret:%d\n", __func__, __LINE__, ret); + cma_debug("cma %s %d, ret:%d\n", __func__, __LINE__, ret); #endif /* CONFIG_AMLOGIC_MODIFY */ goto done; } @@ -7861,7 +7867,7 @@ void free_contig_range(unsigned long pfn, unsigned nr_pages) page = pfn_to_page(pfn); batch = (1 << start_order); free_order = __free_pages_cma(page, start_order, &count); - pr_debug("pages:%4d, free:%2d, start:%2d, batch:%4d, pfn:%ld\n", + cma_debug("pages:%4d, free:%2d, start:%2d, batch:%4d, pfn:%ld\n", nr_pages, free_order, start_order, batch, pfn); nr_pages -= batch; |