From: Hugh Dickins <hughd@google.com>
To: Mark Hemment <markhemm@googlemail.com>
Cc: Hugh Dickins <hughd@google.com>,
Chuck Lever III <chuck.lever@oracle.com>,
Andrew Morton <akpm@linux-foundation.org>,
Patrice CHOTARD <patrice.chotard@foss.st.com>,
Mikulas Patocka <mpatocka@redhat.com>,
Lukas Czerner <lczerner@redhat.com>,
Christoph Hellwig <hch@lst.de>,
"Darrick J. Wong" <djwong@kernel.org>,
Linux-MM <linux-mm@kvack.org>,
Linux NFS Mailing List <linux-nfs@vger.kernel.org>,
linux-fsdevel@vger.kernel.org
Subject: Re: Regression in xfstests on tmpfs-backed NFS exports
Date: Thu, 7 Apr 2022 15:04:17 -0700 (PDT) [thread overview]
Message-ID: <5256a357-213e-84e9-a07f-f695cbb68272@google.com> (raw)
In-Reply-To: <CANe_+UhOQzGcz9hsKdc1N2=r-gALN6RK-fkBdBkoxD+cv1ZFnA@mail.gmail.com>
On Thu, 7 Apr 2022, Mark Hemment wrote:
> On Thu, 7 Apr 2022 at 01:19, Hugh Dickins <hughd@google.com> wrote:
> >
> > What could be going wrong there? I've thought of two possibilities.
> > A minor, hopefully easily fixed, issue would be if fs/nfsd has
> > trouble with seeing the same page twice in a row: since tmpfs is
> > now using the ZERO_PAGE(0) for all pages of a hole, and I think I
> > caught sight of code which looks to see if the latest page is the
> > same as the one before. It's easy to imagine that might go wrong.
>
> When I worked at Veritas, data corruption over NFS was hit when
> sending the same page in succession. This was triggered via VxFS's
> shared page cache, after a file had been dedup'ed.
> I can't remember all the details (~15yrs ago), but the core issue was
> skb_can_coalesce() returning a false-positive for the 'same page' case
> (no check for crossing a page boundary).
Very useful input: thank you Mark.
That tells me that, even if we spot a "bug" in fs/nfsd, there could
be various other places which get confused if given the ZERO_PAGE(0)
twice in a row. I won't be able to find them all, I cannot go on
risking that.
At first I thought of using ZERO_PAGE(0) for even pgoffs, alternating
with a tmpfs-specific zeroed page for odd pgoffs. But I was forgetting
that copying ZERO_PAGE(0) is itself just a workaround to avoid the 28%
slower iov_iter_zero().
I think I have a reasonable hybrid: will reply to Chuck now with that.
Hugh
I've rewr
next prev parent reply other threads:[~2022-04-07 22:04 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-06 17:18 Regression in xfstests on tmpfs-backed NFS exports Chuck Lever III
2022-04-07 0:18 ` Hugh Dickins
2022-04-07 4:25 ` Mark Hemment
2022-04-07 22:04 ` Hugh Dickins [this message]
2022-04-07 19:24 ` Chuck Lever III
2022-04-07 22:26 ` Hugh Dickins
2022-04-07 23:45 ` Chuck Lever III
2022-04-08 14:38 ` Mark Hemment
2022-04-08 16:10 ` Chuck Lever III
2022-04-08 19:09 ` Hugh Dickins
2022-04-08 19:52 ` Chuck Lever III
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=5256a357-213e-84e9-a07f-f695cbb68272@google.com \
--to=hughd@google.com \
--cc=akpm@linux-foundation.org \
--cc=chuck.lever@oracle.com \
--cc=djwong@kernel.org \
--cc=hch@lst.de \
--cc=lczerner@redhat.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux-nfs@vger.kernel.org \
--cc=markhemm@googlemail.com \
--cc=mpatocka@redhat.com \
--cc=patrice.chotard@foss.st.com \
/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).