From: Jens Axboe <axboe@kernel.dk>
To: Matthew Wilcox <willy@infradead.org>
Cc: linux-mm@kvack.org, linux-fsdevel@vger.kernel.org,
hannes@cmpxchg.org, clm@meta.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 08/13] fs: add read support for RWF_UNCACHED
Date: Fri, 8 Nov 2024 12:25:35 -0700 [thread overview]
Message-ID: <07a6549a-6bbf-4e09-9e3b-128e779882a1@kernel.dk> (raw)
In-Reply-To: <Zy5Zb8Twe7QBkHMh@casper.infradead.org>
On 11/8/24 11:33 AM, Matthew Wilcox wrote:
> On Fri, Nov 08, 2024 at 10:43:31AM -0700, Jens Axboe wrote:
>> +++ b/mm/swap.c
>> @@ -472,6 +472,8 @@ static void folio_inc_refs(struct folio *folio)
>> */
>> void folio_mark_accessed(struct folio *folio)
>> {
>> + if (folio_test_uncached(folio))
>> + return;
>> if (lru_gen_enabled()) {
>
> This feels like it might be a problem. If, eg, process A is doing
> uncached IO and process B comes along and, say, mmap()s it, I think
> we'll need to clear the uncached flag in order to have things work
> correctly. It's a performance problem, not a correctness problem.
I'll take a look, should be fine to just unconditionally clear it
here. uncached is a hint after all. We'll try our best to honor it,
but there will be cases where inline reclaim will fail and you'll
get cached contents, particularly if you mix uncached and buffered,
or uncached and mmap.
--
Jens Axboe
next prev parent reply other threads:[~2024-11-08 19:25 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-08 17:43 [PATCHSET v4] Uncached buffered IO Jens Axboe
2024-11-08 17:43 ` [PATCH 01/13] mm/filemap: change filemap_create_folio() to take a struct kiocb Jens Axboe
2024-11-08 18:18 ` Matthew Wilcox
2024-11-08 19:22 ` Jens Axboe
2024-11-08 17:43 ` [PATCH 02/13] mm/readahead: add folio allocation helper Jens Axboe
2024-11-08 17:43 ` [PATCH 03/13] mm: add PG_uncached page flag Jens Axboe
2024-11-08 19:25 ` Kirill A. Shutemov
2024-11-08 19:39 ` Jens Axboe
2024-11-08 17:43 ` [PATCH 04/13] mm/readahead: add readahead_control->uncached member Jens Axboe
2024-11-08 18:21 ` Matthew Wilcox
2024-11-08 19:22 ` Jens Axboe
2024-11-08 17:43 ` [PATCH 05/13] mm/filemap: use page_cache_sync_ra() to kick off read-ahead Jens Axboe
2024-11-08 17:43 ` [PATCH 06/13] mm/truncate: make invalidate_complete_folio2() public Jens Axboe
2024-11-08 17:43 ` [PATCH 07/13] fs: add FOP_UNCACHED flag Jens Axboe
2024-11-08 18:27 ` Matthew Wilcox
2024-11-08 19:23 ` Jens Axboe
2024-11-08 17:43 ` [PATCH 08/13] fs: add read support for RWF_UNCACHED Jens Axboe
2024-11-08 18:33 ` Matthew Wilcox
2024-11-08 19:25 ` Jens Axboe [this message]
2024-11-11 13:04 ` Stefan Metzmacher
2024-11-11 14:10 ` Jens Axboe
2024-11-11 15:44 ` Jens Axboe
2024-11-08 17:43 ` [PATCH 09/13] mm: drop uncached pages when writeback completes Jens Axboe
2024-11-08 17:43 ` [PATCH 10/13] mm/filemap: make buffered writes work with RWF_UNCACHED Jens Axboe
2024-11-08 17:43 ` [PATCH 11/13] iomap: " Jens Axboe
2024-11-08 18:46 ` Matthew Wilcox
2024-11-08 19:26 ` Jens Axboe
2024-11-08 19:49 ` Jens Axboe
2024-11-08 20:07 ` Matthew Wilcox
2024-11-08 20:18 ` Jens Axboe
2024-11-08 17:43 ` [PATCH 12/13] ext4: flag as supporting FOP_UNCACHED Jens Axboe
2024-11-08 17:43 ` [PATCH 13/13] xfs: " Jens Axboe
2024-11-11 12:55 ` [PATCHSET v4] Uncached buffered IO Stefan Metzmacher
2024-11-11 14:08 ` Jens Axboe
2024-11-11 15:05 ` Jens Axboe
2024-11-11 23:54 ` Jens Axboe
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=07a6549a-6bbf-4e09-9e3b-128e779882a1@kernel.dk \
--to=axboe@kernel.dk \
--cc=clm@meta.com \
--cc=hannes@cmpxchg.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=willy@infradead.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