[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZlnweWTV4Y5STK-q@bfoster>
Date: Fri, 31 May 2024 11:44:57 -0400
From: Brian Foster <bfoster@...hat.com>
To: Christoph Hellwig <hch@...radead.org>
Cc: "Darrick J. Wong" <djwong@...nel.org>,
Zhang Yi <yi.zhang@...weicloud.com>, linux-xfs@...r.kernel.org,
linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org,
brauner@...nel.org, david@...morbit.com, chandanbabu@...nel.org,
jack@...e.cz, willy@...radead.org, yi.zhang@...wei.com,
chengzhihao1@...wei.com, yukuai3@...wei.com
Subject: Re: [RFC PATCH v4 1/8] iomap: zeroing needs to be pagecache aware
On Fri, May 31, 2024 at 07:05:38AM -0700, Christoph Hellwig wrote:
> On Fri, May 31, 2024 at 07:03:58AM -0700, Darrick J. Wong wrote:
> > > + /*
> > > + * XXX: It would be nice if we could get the offset of
> > > + * the next entry in the pagecache so that we don't have
> > > + * to iterate one page at a time here.
> > > + */
> > > + offset = offset_in_page(pos);
> > > + if (bytes > PAGE_SIZE - offset)
> > > + bytes = PAGE_SIZE - offset;
> >
> > Why is it PAGE_SIZE here and not folio_size() like below?
> >
> > (I know you're just copying the existing code; I'm merely wondering if
> > this is some minor bug.)
>
> See the comment just above :)
>
>
FWIW, something like the following is pretty slow with the current
implementation on a quick test:
xfs_io -fc "falloc -k 0 1t" -c "pwrite 1000g 4k" <file>
.. so I'd think you'd want some kind of data seek or something to more
efficiently process the range.
Brian
Powered by blists - more mailing lists