Re: [PATCH 20/21] xfs: convert xfarray_pagesort to deal with large folios

Kent Overstreet
2024-01-27T01:10:02Z

On Fri, Jan 26, 2024 at 02:29:02PM +0100, Christoph Hellwig wrote:
> From: "Darrick J. Wong" <djwong@kernel.org>
>
> Convert xfarray_pagesort to handle large folios by introducing a new
> xfile_get_folio routine that can return a folio of arbitrary size, and
> using heapsort on the full folio. This also corrects an off-by-one bug
> in the calculation of len in xfarray_pagesort that was papered over by
> xfarray_want_pagesort.
>
> Signed-off-by: Darrick J. Wong <djwong@kernel.org>
> Signed-off-by: Christoph Hellwig <hch@lst.de>

not the fastest way this could be done - but it was performance tested
and according to Darrick was only 2x slower than the "use a normal sort
routine on a contiguously mapped buffer" version, which really isn't
that bad. So -

Reviewed-by: Kent Overstreet <kent.overstreet@linux.dev>