* + mm-cma-warn-if-the-cma-area-could-not-be-activated.patch added to -mm tree
@ 2017-06-05 22:26 akpm
0 siblings, 0 replies; only message in thread
From: akpm @ 2017-06-05 22:26 UTC (permalink / raw)
To: khandual, aneesh.kumar, iamjoonsoo.kim, mm-commits
The patch titled
Subject: mm/cma.c: warn if the CMA area could not be activated
has been added to the -mm tree. Its filename is
mm-cma-warn-if-the-cma-area-could-not-be-activated.patch
This patch should soon appear at
http://ozlabs.org/~akpm/mmots/broken-out/mm-cma-warn-if-the-cma-area-could-not-be-activated.patch
and later at
http://ozlabs.org/~akpm/mmotm/broken-out/mm-cma-warn-if-the-cma-area-could-not-be-activated.patch
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a
reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/SubmitChecklist when testing your code ***
The -mm tree is included into linux-next and is updated
there every 3-4 working days
------------------------------------------------------
From: Anshuman Khandual <khandual@linux.vnet.ibm.com>
Subject: mm/cma.c: warn if the CMA area could not be activated
While activating a CMA area we check to make sure that all the PFNs in the
range are inside the same zone. This is a requirement for
alloc_contig_range() to work. Any CMA area failing the check is disabled
for good. This happens silently right now making all future cma_alloc()
allocations failure inevitable.
Here we add an error message stating that the CMA area could not be
activated which makes it easier to explain any future cma_alloc() failures
on it. While in there, change the bail out goto label from 'err' to
'not_in_zone' which makes more sense.
Link: http://lkml.kernel.org/r/20170605023729.26303-1-khandual@linux.vnet.ibm.com
Signed-off-by: Anshuman Khandual <khandual@linux.vnet.ibm.com>
Cc: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
mm/cma.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff -puN mm/cma.c~mm-cma-warn-if-the-cma-area-could-not-be-activated mm/cma.c
--- a/mm/cma.c~mm-cma-warn-if-the-cma-area-could-not-be-activated
+++ a/mm/cma.c
@@ -127,7 +127,7 @@ static int __init cma_activate_area(stru
* to be in the same zone.
*/
if (page_zone(pfn_to_page(pfn)) != zone)
- goto err;
+ goto not_in_zone;
}
init_cma_reserved_pageblock(pfn_to_page(base_pfn));
} while (--i);
@@ -141,7 +141,8 @@ static int __init cma_activate_area(stru
return 0;
-err:
+not_in_zone:
+ pr_err("CMA area %s could not be activated\n", cma->name);
kfree(cma->bitmap);
cma->count = 0;
return -EINVAL;
_
Patches currently in -mm which might be from khandual@linux.vnet.ibm.com are
mm-vmstat-standardize-file-operations-variable-names.patch
mm-madvise-enable-softhard-offline-of-hugetlb-pages-at-pgd-level.patch
mm-follow_page_mask-add-support-for-hugetlb-pgd-entries.patch
mm-hugetlb-soft-offline-dissolve-source-hugepage-after-successful-migration.patch
mm-cma-warn-if-the-cma-area-could-not-be-activated.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2017-06-05 22:26 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-05 22:26 + mm-cma-warn-if-the-cma-area-could-not-be-activated.patch added to -mm tree akpm
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.