Re: [PATCH -next v2] mm/hotplug: silence a lockdep splat with printk()

From: Michal Hocko
Date: Wed Jan 15 2020 - 04:24:22 EST


On Wed 15-01-20 10:22:24, Michal Hocko wrote:
[...]
> > @@ -74,9 +75,9 @@ void __dump_page(struct page *page, const char *reason)
> > page->mapping, page_to_pgoff(page),
> > compound_mapcount(page));
> > else
> > - pr_warn("page:%px refcount:%d mapcount:%d mapping:%px index:%#lx\n",
> > + pr_warn("page:%px refcount:%d mapcount:%d mapping:%px index:%#lx cma:%d\n",
> > page, page_ref_count(page), mapcount,
> > - page->mapping, page_to_pgoff(page));
> > + page->mapping, page_to_pgoff(page), page_cma);
>
> Is this correct? CMA pages cannot be comound? Btw. I would simply do
>
> pr_warn("page:%px refcount:%d mapcount:%d mapping:%px index:%#lx%s\n",
> ...., page_cmap ? "CMA": "");

Btw. if you rebased on top of http://lkml.kernel.org/r/9f884d5c-ca60-dc7b-219c-c081c755fab6@xxxxxxx
then the whole thing would be easier AFAICS.
--
Michal Hocko
SUSE Labs