linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Convert write_cache_pages() to an iterator v2
@ 2023-12-14 13:25 Christoph Hellwig
  2023-12-14 13:25 ` [PATCH 01/11] writeback: Factor out writeback_finish() Christoph Hellwig
                   ` (10 more replies)
  0 siblings, 11 replies; 20+ messages in thread
From: Christoph Hellwig @ 2023-12-14 13:25 UTC (permalink / raw)
  To: linux-mm
  Cc: Matthew Wilcox (Oracle), linux-fsdevel, linux-kernel, Jan Kara,
	David Howells

Hi all,

this is basically a report of willy's series of the same name for June.
I picked the lastest version from his (now apparently defunct) git tree,
rebased it to mainline (no coflict, neither for linux-next), reordered
the new fields in struct writeback_control to document what is interface
vs internal, and temporarily dropped the iomap patch due to a conflict
in the VFS tree.

willy: let me know if me reposting it like this is fine, or if you
want me to stop.  I'd just really like to see it merged :)
Note that patch 4 is missing your signoff, so we'd need that before
proceeding anyway.

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.

Diffstat:
 include/linux/pagevec.h   |   18 ++
 include/linux/writeback.h |   24 +++
 mm/page-writeback.c       |  313 +++++++++++++++++++++++++---------------------
 3 files changed, 211 insertions(+), 144 deletions(-)

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

end of thread, other threads:[~2023-12-16  6:16 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-14 13:25 Convert write_cache_pages() to an iterator v2 Christoph Hellwig
2023-12-14 13:25 ` [PATCH 01/11] writeback: Factor out writeback_finish() Christoph Hellwig
2023-12-15 13:26   ` Jan Kara
2023-12-15 16:54     ` Christoph Hellwig
2023-12-14 13:25 ` [PATCH 02/11] writeback: Factor writeback_get_batch() out of write_cache_pages() Christoph Hellwig
2023-12-15 14:14   ` Jan Kara
2023-12-14 13:25 ` [PATCH 03/11] writeback: Factor should_writeback_folio() " Christoph Hellwig
2023-12-15 14:16   ` Jan Kara
2023-12-14 13:25 ` [PATCH 04/11] writeback: Simplify the loops in write_cache_pages() Christoph Hellwig
2023-12-15 14:25   ` Jan Kara
2023-12-16  6:16   ` Matthew Wilcox
2023-12-14 13:25 ` [PATCH 05/11] pagevec: Add ability to iterate a queue Christoph Hellwig
2023-12-14 13:25 ` [PATCH 06/11] writeback: Use the folio_batch queue iterator Christoph Hellwig
2023-12-14 13:25 ` [PATCH 07/11] writeback: Factor writeback_iter_init() out of write_cache_pages() Christoph Hellwig
2023-12-14 13:25 ` [PATCH 08/11] writeback: Factor writeback_get_folio() " Christoph Hellwig
2023-12-14 13:25 ` [PATCH 09/11] writeback: Factor writeback_iter_next() " Christoph Hellwig
2023-12-15 14:17   ` Brian Foster
2023-12-16  4:51     ` Christoph Hellwig
2023-12-14 13:25 ` [PATCH 10/11] writeback: Add for_each_writeback_folio() Christoph Hellwig
2023-12-14 13:25 ` [PATCH 11/11] writeback: Remove a use of write_cache_pages() from do_writepages() 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).