From: Lei Huang <lei.huang@linux.intel.com>
To: Bernd Schubert <bschubert@ddn.com>,
Bernd Schubert <bernd.schubert@fastmail.fm>,
linux-kernel@vger.kernel.org
Cc: miklos@szeredi.hu, linux-fsdevel@vger.kernel.org,
David Howells <dhowells@redhat.com>
Subject: Re: [PATCH v1] fs/fuse: Fix missing FOLL_PIN for direct-io
Date: Fri, 1 Sep 2023 18:02:03 -0400 [thread overview]
Message-ID: <ec4c69a4-c1fb-d18f-d467-316161c51ac4@linux.intel.com> (raw)
In-Reply-To: <0ffc15ea-6803-acf3-d840-378a15c7c073@ddn.com>
Hi Bernd,
Actually, we do not have a simple code to reproduce this issue yet. We
observed the issues in a suite of tests. There are up to 8 tests
scheduled to run concurrently with many small tests. I could observe
about 5~10 cases with wrong data in one day. I tried repeating a single
test for very long time and did not observe the issue. I guess it would
help to run simultaneously multiple processes causing bad memory
fragmentation. Please let me know if you need more information. Thank
you very much for looking into this issue. Have a great weekend!
Best Regards,
-lei
On 9/1/23 14:05, Bernd Schubert wrote:
> Hi Lei,
>
> On 8/30/23 03:03, Lei Huang wrote:
>> Hi Bernd,
>>
>> Thank you very much for your reply!
>>
>> > Hmm, iov_iter_extract_pages does not exists for a long time and the
>> code
>> > in fuse_get_user_pages didn't change much. So if you are right, there
>> > would be a long term data corruption for page migrations? And a back
>> > port to old kernels would not be obvious?
>>
>> Right. The issue has been reproduced under various versions of
>> kernels, ranging from 3.10.0 to 6.3.6 in my tests. It would be
>> different to make a patch under older kernels like 3.10.0. One way I
>> tested, one can query
>> the physical pages associated with read buffer after data is ready
>> (right before writing the data into read buffer). This seems resolving
>> the issue in my tests.
>>
>>
>> > What confuses me further is that
>> > commit 85dd2c8ff368 does not mention migration or corruption, although
>> > lists several other advantages for iov_iter_extract_pages. Other
>> commits
>> > using iov_iter_extract_pages point to fork - i.e. would your data
>> > corruption be possibly related that?
>>
>> As I mentioned above, the issue seems resolved if we query the
>> physical pages as late as right before writing data into read buffer.
>> I think the root cause is page migration.
>>
>
> out of interest, what is your exact reproducer and how much time does i
> take? I'm just trying passthrough_hp(*) and ql-fstest (**) and don't get
> and issue after about 1h run time. I let it continue over the weekend.
> The system is an older dual socket xeon.
>
> (*) with slight modification for passthrough_hp to disable O_DIRECT for
> the underlying file system. It is running on xfs on an nvme.
>
> (**) https://github.com/bsbernd/ql-fstest
>
>
> Pinning the pages is certainly a good idea, I would just like to
> understand how severe the issue is. And would like to test
> backports/different patch on older kernels.
>
>
> Thanks,
> Bernd
>
>
next prev parent reply other threads:[~2023-09-01 22:16 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-29 18:36 [PATCH v1] fs/fuse: Fix missing FOLL_PIN for direct-io Lei Huang
2023-08-29 21:57 ` Bernd Schubert
2023-08-30 1:03 ` Lei Huang
2023-09-01 17:56 ` Bernd Schubert
2023-09-01 18:05 ` Bernd Schubert
2023-09-01 22:02 ` Lei Huang [this message]
2023-09-01 22:18 ` Lei Huang
2024-03-06 10:01 ` Miklos Szeredi
2024-03-06 11:16 ` Bernd Schubert
2024-03-06 12:05 ` Miklos Szeredi
2024-03-10 2:59 ` Lei Huang
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=ec4c69a4-c1fb-d18f-d467-316161c51ac4@linux.intel.com \
--to=lei.huang@linux.intel.com \
--cc=bernd.schubert@fastmail.fm \
--cc=bschubert@ddn.com \
--cc=dhowells@redhat.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=miklos@szeredi.hu \
/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).