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 04/13] mm/readahead: add readahead_control->uncached member
Date: Fri, 8 Nov 2024 12:22:59 -0700 [thread overview]
Message-ID: <ca1f78bb-47e2-424b-a57e-f3272b1450cf@kernel.dk> (raw)
In-Reply-To: <Zy5Wl84aHADMe8MQ@casper.infradead.org>
On 11/8/24 11:21 AM, Matthew Wilcox wrote:
> On Fri, Nov 08, 2024 at 10:43:27AM -0700, Jens Axboe wrote:
>> +++ b/mm/readahead.c
>> @@ -191,7 +191,13 @@ static void read_pages(struct readahead_control *rac)
>> static struct folio *ractl_alloc_folio(struct readahead_control *ractl,
>> gfp_t gfp_mask, unsigned int order)
>> {
>> - return filemap_alloc_folio(gfp_mask, order);
>> + struct folio *folio;
>> +
>> + folio = filemap_alloc_folio(gfp_mask, order);
>> + if (folio && ractl->uncached)
>> + folio_set_uncached(folio);
>
> If we've just allocated it, it should be safe to use
> __folio_set_uncached() here, no?
Indeed, we can use __folio_set_uncached() here. I'll make that change.
> Not that I'm keen on using a folio flag here, but I'm reserving judgement
> on that unti I've got further through this series and see how it's used.
> I can see that it might be necessary.
I knew that'd be one of the more contentious items here... On the read
side, we can get by without the flag. But for writeback we do need it.
I just kept it consistent and used folio_*_uncached() throughout
because of that.
--
Jens Axboe
next prev parent reply other threads:[~2024-11-08 19:23 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 [this message]
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
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=ca1f78bb-47e2-424b-a57e-f3272b1450cf@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