Re: [PATCH 1/3] mm: Print head flags in dump_page

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2020-06-29 15:51, Matthew Wilcox wrote:
On Mon, Jun 29, 2020 at 03:38:13PM -0700, John Hubbard wrote:
On 2020-06-29 08:19, Matthew Wilcox (Oracle) wrote:
Tail page flags contain very little useful information.  Print the head
page's flags instead (even though PageHead is a little misleading).

You are right about the tail page. And the raw output provides the tail
page flags, in case someone *really* needs to dig into tail page problems,
so that's all good.

However, I just gave this a spin, and seeing the "|head" in the list for
my "tail page: dump_page test" is also slightly misleading for me, too.

We could also do ...

@@ -48,6 +48,8 @@ void __dump_page(struct page *page, const char *reason)
         struct address_space *mapping;
         bool page_poisoned = PagePoisoned(page);
         bool compound = PageCompound(page);
+       unsigned long flags = page->flags;
+
         /*
          * Accessing the pageblock without the zone lock. It could change to
          * "isolate" again in the meantime, but since we are just dumping the
@@ -165,7 +162,9 @@ void __dump_page(struct page *page, const char *reason)
  out_mapping:
         BUILD_BUG_ON(ARRAY_SIZE(pageflag_names) != __NR_PAGEFLAGS + 1);
- pr_warn("%sflags: %#lx(%pGp)%s\n", type, head->flags, &head->flags,
+       if (head != page)
+               flags = head->flags & ~PG_head;
+       pr_warn("%sflags: %#lx(%pGp)%s\n", type, flags, &flags,
                 page_cma ? " CMA" : "");

OK, I'll give this a spin, along with your line break approach...

thanks,
--
John Hubbard
NVIDIA




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux