linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Matthew Wilcox <willy@infradead.org>
To: "Darrick J. Wong" <djwong@kernel.org>
Cc: Roman Gushchin <guro@fb.com>,
	Murphy Zhou <jencce.kernel@gmail.com>,
	Linux-Fsdevel <linux-fsdevel@vger.kernel.org>,
	Linux MM <linux-mm@kvack.org>
Subject: Re: [fsdax xfs] Regression panic at inode_switch_wbs_work_fn
Date: Sat, 17 Jul 2021 18:40:13 +0100	[thread overview]
Message-ID: <YPMV/Vo8lX7dzeP1@casper.infradead.org> (raw)
In-Reply-To: <20210717171713.GB22357@magnolia>

On Sat, Jul 17, 2021 at 10:17:13AM -0700, Darrick J. Wong wrote:
> I experience the same problem that Murphy does, and I tracked it down
> to this chunk of inode_do_switch_wbs:
> 
> 	/*
> 	 * Count and transfer stats.  Note that PAGECACHE_TAG_DIRTY points
> 	 * to possibly dirty pages while PAGECACHE_TAG_WRITEBACK points to
> 	 * pages actually under writeback.
> 	 */
> 	xas_for_each_marked(&xas, page, ULONG_MAX, PAGECACHE_TAG_DIRTY) {
> here >>>>>>>>>> if (PageDirty(page)) {
> 			dec_wb_stat(old_wb, WB_RECLAIMABLE);
> 			inc_wb_stat(new_wb, WB_RECLAIMABLE);
> 		}
> 	}
> 
> I suspect that "page" is really a pfn to a pmem mapping and not a real
> struct page.

I think you're right.

Running scripts/decodecode on the original report, that's:

   0:	48 8b 50 08          	mov    0x8(%rax),%rdx

RAX: 0000000005b0f661

so rax is not a struct page, it's a PFN (/DAX) entry.

We shouldn't even be calling inode_do_switch_wbs() for DAX inodes because
we don't do writeback for DAX inodes (at least as far as the kernel's
writeback infrastructure is concerned; obviously the CPU does writeback
from its caches to PMEM).

Maybe some check at a higher level would be appropriate?  I don't know
much about this part of the kernel.

  reply	other threads:[~2021-07-17 17:40 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-15 10:10 [fsdax xfs] Regression panic at inode_switch_wbs_work_fn Murphy Zhou
2021-07-15 16:06 ` Roman Gushchin
2021-07-16  5:57   ` Murphy Zhou
2021-07-16 20:13     ` Roman Gushchin
2021-07-17 17:17       ` Darrick J. Wong
2021-07-17 17:40         ` Matthew Wilcox [this message]
2021-07-17 22:08         ` Roman Gushchin
2021-07-17 23:26           ` Matthew Wilcox
2021-07-18 16:07             ` Roman Gushchin
2021-07-19  5:56           ` Murphy Zhou

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YPMV/Vo8lX7dzeP1@casper.infradead.org \
    --to=willy@infradead.org \
    --cc=djwong@kernel.org \
    --cc=guro@fb.com \
    --cc=jencce.kernel@gmail.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).