linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Matthew Wilcox <willy@infradead.org>
To: David Howells <dhowells@redhat.com>
Cc: Jeff Layton <jlayton@kernel.org>,
	netfs@lists.linux.dev, linux-fsdevel@vger.kernel.org,
	Xu Yang <xu.yang_2@nxp.com>
Subject: Re: [PATCH] netfs: Fault in smaller chunks for non-large folio mappings
Date: Fri, 26 Jul 2024 18:03:00 +0100	[thread overview]
Message-ID: <ZqPWxFYBPWcDjPMq@casper.infradead.org> (raw)
In-Reply-To: <20240527201735.1898381-1-willy@infradead.org>

On Mon, May 27, 2024 at 09:17:32PM +0100, Matthew Wilcox (Oracle) wrote:
> As in commit 4e527d5841e2 ("iomap: fault in smaller chunks for non-large
> folio mappings"), we can see a performance loss for filesystems
> which have not yet been converted to large folios.

Did this patch get lost?

> Fixes: c38f4e96e605 ("netfs: Provide func to copy data to pagecache for buffered write")
> Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
> ---
>  fs/netfs/buffered_write.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/fs/netfs/buffered_write.c b/fs/netfs/buffered_write.c
> index 07bc1fd43530..3288561e98dd 100644
> --- a/fs/netfs/buffered_write.c
> +++ b/fs/netfs/buffered_write.c
> @@ -184,7 +184,7 @@ ssize_t netfs_perform_write(struct kiocb *iocb, struct iov_iter *iter,
>  	unsigned int bdp_flags = (iocb->ki_flags & IOCB_NOWAIT) ? BDP_ASYNC : 0;
>  	ssize_t written = 0, ret, ret2;
>  	loff_t i_size, pos = iocb->ki_pos, from, to;
> -	size_t max_chunk = PAGE_SIZE << MAX_PAGECACHE_ORDER;
> +	size_t max_chunk = mapping_max_folio_size(mapping);
>  	bool maybe_trouble = false;
>  
>  	if (unlikely(test_bit(NETFS_ICTX_WRITETHROUGH, &ctx->flags) ||
> -- 
> 2.43.0
> 

  reply	other threads:[~2024-07-26 17:03 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-27 20:17 [PATCH] netfs: Fault in smaller chunks for non-large folio mappings Matthew Wilcox (Oracle)
2024-07-26 17:03 ` Matthew Wilcox [this message]
2024-07-26 17:56 ` Jeff Layton
2024-07-29  7:27 ` Christian Brauner

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=ZqPWxFYBPWcDjPMq@casper.infradead.org \
    --to=willy@infradead.org \
    --cc=dhowells@redhat.com \
    --cc=jlayton@kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=netfs@lists.linux.dev \
    --cc=xu.yang_2@nxp.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).