Re: mm: BUG in pgtable_pmd_page_dtor

From: Vlastimil Babka
Date: Fri Nov 25 2016 - 08:00:49 EST


On 11/25/2016 12:41 PM, Andrey Ryabinin wrote:
>
>
> On 11/25/2016 11:42 AM, Vlastimil Babka wrote:
>
>> pr_emerg("page:%p count:%d mapcount:%d mapping:%p index:%#lx",
>> page, page_ref_count(page), mapcount,
>> @@ -59,6 +61,21 @@ void __dump_page(struct page *page, const char *reason)
>>
>> pr_emerg("flags: %#lx(%pGp)\n", page->flags, &page->flags);
>>
>> + pr_alert("raw struct page data:");
>> + for (i = 0; i < sizeof(struct page) / sizeof(unsigned long); i++) {
>> + unsigned long *word_ptr;
>> +
>> + word_ptr = ((unsigned long *) page) + i;
>> +
>> + if ((i % words_per_line) == 0) {
>> + pr_cont("\n");
>> + pr_alert(" %016lx", *word_ptr);
>> + } else {
>> + pr_cont(" %016lx", *word_ptr);
>> + }
>> + }
>> + pr_cont("\n");
>> +
>
> Single call to print_hex_dump() could replace this loop.

Ah, didn't know about that one, thanks!

This also addresses Kirill's comment:

-----8<-----