From: John Garry <john.g.garry@oracle.com>
To: Amir Goldstein <amir73il@gmail.com>
Cc: Chi Zhiling <chizhiling@163.com>,
Dave Chinner <david@fromorbit.com>,
djwong@kernel.org, cem@kernel.org, linux-xfs@vger.kernel.org,
linux-kernel@vger.kernel.org, Chi Zhiling <chizhiling@kylinos.cn>
Subject: Re: [PATCH] xfs: Remove i_rwsem lock in buffered read
Date: Thu, 9 Jan 2025 12:40:42 +0000 [thread overview]
Message-ID: <7dd3e6e2-0f85-4db3-a10b-0ef910889e12@oracle.com> (raw)
In-Reply-To: <CAOQ4uxiMiLkie03QA9ca_3ARzwg7rm31UFBo6THdVUDvr0u6fw@mail.gmail.com>
On 09/01/2025 10:07, Amir Goldstein wrote:
>> Please note that IOCB_ATOMIC is not supported for buffered IO, so we
>> can't do this - we only support direct IO today.
> Oops. I see now.
>
>> And supporting buffered IO has its challenges; how to handle overlapping
>> atomic writes of differing sizes sitting in the page cache is the main
>> issue which comes to mind.
>>
> How about the combination of RWF_ATOMIC | RWF_UNCACHED [1]
> Would it be easier/possible to support this considering that the write of folio
> is started before the write system call returns?
I am not sure exactly what you are proposing. Is it that RWF_ATOMIC for
buffered IO auto-sets RWF_UNCACHED? Or that RWF_ATOMIC requires
RWF_UNCACHED to be set?
But that is not so important, as I just think that future users of
RWF_ATOMIC may not want the behavior of RWF_UNCACHED always (for
buffered IO).
And I don't think that RWF_UNCACHED even properly solves the issues of
RWF_ATOMIC for buffered IO in terms of handling overlapping atomic
writes in the page cache.
Thanks,
John
>
> Note that application that desires mutithreaded atomicity of writes vs. reads
> will only need to opt-in for RWF_ATOMIC | RWF_UNCACHED writes, so this
> is not expected to actually break its performance by killing the read caching.
>
> Thanks,
> Amir.
>
> [1]https://urldefense.com/v3/__https://lore.kernel.org/linux-
> fsdevel/20241220154831.1086649-1-axboe@kernel.dk/__;!!ACWV5N9M2RV99hQ!
> J7_5N_kSixl5iSy8IX37Cup3uKTHAaC5Oy-RlvsJeTE2kr3iJ2IXNww_rApK7TwI_ocCBSE-
> G2vZSKSRHqY$
next prev parent reply other threads:[~2025-01-09 12:41 UTC|newest]
Thread overview: 50+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-26 6:16 [PATCH] xfs: Remove i_rwsem lock in buffered read Chi Zhiling
2024-12-26 21:50 ` Dave Chinner
2024-12-28 7:37 ` Chi Zhiling
2024-12-28 22:17 ` Dave Chinner
2024-12-30 2:42 ` Chi Zhiling
2025-01-07 12:13 ` Amir Goldstein
2025-01-07 17:12 ` Christoph Hellwig
2025-01-08 7:43 ` Chi Zhiling
2025-01-08 11:33 ` Amir Goldstein
2025-01-08 11:45 ` Amir Goldstein
2025-01-08 12:15 ` John Garry
2025-01-09 10:07 ` Amir Goldstein
2025-01-09 12:40 ` John Garry [this message]
2025-01-09 8:37 ` Chi Zhiling
2025-01-09 10:25 ` Amir Goldstein
2025-01-09 12:10 ` Chi Zhiling
2025-01-09 12:25 ` John Garry
2025-01-08 17:35 ` Darrick J. Wong
2025-01-09 23:28 ` Dave Chinner
2025-01-10 1:31 ` Chi Zhiling
2025-01-10 17:07 ` Amir Goldstein
2025-01-12 10:05 ` Chi Zhiling
2025-01-13 2:44 ` Darrick J. Wong
2025-01-13 5:59 ` Chi Zhiling
2025-01-13 13:40 ` Brian Foster
2025-01-13 16:19 ` Darrick J. Wong
2025-01-15 5:55 ` Christoph Hellwig
2025-01-15 21:41 ` Dave Chinner
2025-01-16 4:36 ` Christoph Hellwig
2025-01-17 22:20 ` Dave Chinner
2025-01-16 14:23 ` Brian Foster
2025-01-17 13:27 ` Amir Goldstein
2025-01-17 22:19 ` Dave Chinner
2025-01-18 13:03 ` Amir Goldstein
2025-01-20 5:11 ` Dave Chinner
2025-01-22 6:08 ` Christoph Hellwig
2025-01-22 23:35 ` Dave Chinner
2025-01-17 16:12 ` Chi Zhiling
2025-01-24 7:57 ` Chi Zhiling
2025-01-27 20:49 ` Dave Chinner
2025-01-28 5:15 ` Christoph Hellwig
2025-01-28 21:23 ` David Laight
2025-01-29 0:59 ` Dave Chinner
2025-01-29 5:20 ` Christoph Hellwig
2025-02-10 1:44 ` Chi Zhiling
2025-01-14 0:09 ` Dave Chinner
2025-01-25 8:43 ` Jinliang Zheng
2025-01-25 14:14 ` Amir Goldstein
2025-06-20 14:03 ` Jinliang Zheng
-- strict thread matches above, loose matches on Subject: below --
2019-03-25 0:10 [QUESTION] Long read latencies on mixed rw buffered IO Dave Chinner
2025-06-20 13:46 ` [PATCH] xfs: Remove i_rwsem lock in buffered read Jinliang Zheng
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=7dd3e6e2-0f85-4db3-a10b-0ef910889e12@oracle.com \
--to=john.g.garry@oracle.com \
--cc=amir73il@gmail.com \
--cc=cem@kernel.org \
--cc=chizhiling@163.com \
--cc=chizhiling@kylinos.cn \
--cc=david@fromorbit.com \
--cc=djwong@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-xfs@vger.kernel.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).