linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Convert write_cache_pages() to an iterator v4
@ 2023-12-22 15:08 Christoph Hellwig
  2023-12-22 15:08 ` [PATCH 01/17] writeback: fix done_index when hitting the wbc->nr_to_write Christoph Hellwig
                   ` (16 more replies)
  0 siblings, 17 replies; 18+ messages in thread
From: Christoph Hellwig @ 2023-12-22 15:08 UTC (permalink / raw)
  To: linux-mm
  Cc: Matthew Wilcox (Oracle), Jan Kara, David Howells, Brian Foster,
	linux-fsdevel, linux-kernel

Hi all,

this is basically a evolution of the series Matthew Wilcox originally
set in June.  Based on comments from Jan a Brian this now actually
untangles some of the more confusing conditional in the writeback code
before refactoring it into the iterator.  Because of that all the
later patches need a fair amount of rebasing and I've not carried any
reviewed-by over.

The original cover letter is below:

Dave Howells doesn't like the indirect function call imposed by
write_cache_pages(), so refactor it into an iterator.  I took the
opportunity to add the ability to iterate a folio_batch without having
an external variable.

This is against next-20230623.  If you try to apply it on top of a tree
which doesn't include the pagevec removal series, IT WILL CRASH because
it won't reinitialise folio_batch->i and the iteration will index out
of bounds.

I have a feeling the 'done' parameter could have a better name, but I
can't think what it might be.

Changes since v3:
 - various commit log spelling fixes
 - remove a statement from a commit log that isn't true any more with the
   changes in v3
 - rename a function
 - merge two helpers

Diffstat:
 include/linux/pagevec.h   |   18 ++
 include/linux/writeback.h |   19 ++
 mm/page-writeback.c       |  328 +++++++++++++++++++++++++---------------------
 3 files changed, 215 insertions(+), 150 deletions(-)

^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2023-12-22 15:09 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-22 15:08 Convert write_cache_pages() to an iterator v4 Christoph Hellwig
2023-12-22 15:08 ` [PATCH 01/17] writeback: fix done_index when hitting the wbc->nr_to_write Christoph Hellwig
2023-12-22 15:08 ` [PATCH 02/17] writeback: also update wbc->nr_to_write on writeback failure Christoph Hellwig
2023-12-22 15:08 ` [PATCH 03/17] writeback: rework the loop termination condition in write_cache_pages Christoph Hellwig
2023-12-22 15:08 ` [PATCH 04/17] writeback: only update ->writeback_index for range_cyclic writeback Christoph Hellwig
2023-12-22 15:08 ` [PATCH 05/17] writeback: remove a duplicate prototype for tag_pages_for_writeback Christoph Hellwig
2023-12-22 15:08 ` [PATCH 06/17] writeback: Factor out writeback_finish() Christoph Hellwig
2023-12-22 15:08 ` [PATCH 07/17] writeback: Factor writeback_get_batch() out of write_cache_pages() Christoph Hellwig
2023-12-22 15:08 ` [PATCH 08/17] writeback: Factor folio_prepare_writeback() " Christoph Hellwig
2023-12-22 15:08 ` [PATCH 09/17] writeback: Simplify the loops in write_cache_pages() Christoph Hellwig
2023-12-22 15:08 ` [PATCH 10/17] pagevec: Add ability to iterate a queue Christoph Hellwig
2023-12-22 15:08 ` [PATCH 11/17] writeback: Use the folio_batch queue iterator Christoph Hellwig
2023-12-22 15:08 ` [PATCH 12/17] writeback: Factor writeback_iter_init() out of write_cache_pages() Christoph Hellwig
2023-12-22 15:08 ` [PATCH 13/17] writeback: Move the folio_prepare_writeback loop " Christoph Hellwig
2023-12-22 15:08 ` [PATCH 14/17] writeback: Factor writeback_iter_next() " Christoph Hellwig
2023-12-22 15:08 ` [PATCH 15/17] writeback: Add for_each_writeback_folio() Christoph Hellwig
2023-12-22 15:08 ` [PATCH 16/17] writeback: Remove a use of write_cache_pages() from do_writepages() Christoph Hellwig
2023-12-22 15:08 ` [PATCH 17/17] writeback: update the kerneldoc comment for tag_pages_for_writeback Christoph Hellwig

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).