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

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.

Matthew Wilcox (Oracle) (12):
  writeback: Factor out writeback_finish()
  writeback: Factor writeback_get_batch() out of write_cache_pages()
  writeback: Factor should_writeback_folio() out of write_cache_pages()
  writeback: Simplify the loops in write_cache_pages()
  pagevec: Add ability to iterate a queue
  writeback: Use the folio_batch queue iterator
  writeback: Factor writeback_iter_init() out of write_cache_pages()
  writeback: Factor writeback_get_folio() out of write_cache_pages()
  writeback: Factor writeback_iter_next() out of write_cache_pages()
  writeback: Add for_each_writeback_folio()
  iomap: Convert iomap_writepages() to use for_each_writeback_folio()
  writeback: Remove a use of write_cache_pages() from do_writepages()

 fs/iomap/buffered-io.c    |  14 +-
 include/linux/pagevec.h   |  18 +++
 include/linux/writeback.h |  22 ++-
 mm/page-writeback.c       | 310 +++++++++++++++++++++-----------------
 4 files changed, 216 insertions(+), 148 deletions(-)

-- 
2.39.2


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

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

Thread overview: 35+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-26 17:35 [PATCH 00/12] Convert write_cache_pages() to an iterator Matthew Wilcox (Oracle)
2023-06-26 17:35 ` [PATCH 01/12] writeback: Factor out writeback_finish() Matthew Wilcox (Oracle)
2023-06-27  4:05   ` Christoph Hellwig
2023-06-26 17:35 ` [PATCH 02/12] writeback: Factor writeback_get_batch() out of write_cache_pages() Matthew Wilcox (Oracle)
2023-06-26 17:35 ` [PATCH 03/12] writeback: Factor should_writeback_folio() " Matthew Wilcox (Oracle)
2023-06-27  4:12   ` Christoph Hellwig
2023-06-27 11:16     ` Matthew Wilcox
2023-06-27 14:48       ` Matthew Wilcox
2023-06-26 17:35 ` [PATCH 04/12] writeback: Simplify the loops in write_cache_pages() Matthew Wilcox (Oracle)
2023-06-27  4:16   ` Christoph Hellwig
2023-06-26 17:35 ` [PATCH 05/12] pagevec: Add ability to iterate a queue Matthew Wilcox (Oracle)
2023-06-26 17:35 ` [PATCH 06/12] writeback: Use the folio_batch queue iterator Matthew Wilcox (Oracle)
2023-06-27  4:25   ` Christoph Hellwig
2023-06-26 17:35 ` [PATCH 07/12] writeback: Factor writeback_iter_init() out of write_cache_pages() Matthew Wilcox (Oracle)
2023-06-27  4:30   ` Christoph Hellwig
2023-06-27  4:31     ` Christoph Hellwig
2023-06-27 11:08       ` Matthew Wilcox
2023-06-26 17:35 ` [PATCH 08/12] writeback: Factor writeback_get_folio() " Matthew Wilcox (Oracle)
2023-06-27  4:34   ` Christoph Hellwig
2023-06-27 15:25     ` Matthew Wilcox
2023-06-26 17:35 ` [PATCH 09/12] writeback: Factor writeback_iter_next() " Matthew Wilcox (Oracle)
2023-06-27  4:39   ` Christoph Hellwig
2023-06-27 15:31     ` Matthew Wilcox
2023-06-27 16:28       ` Christoph Hellwig
2023-06-28  9:10       ` Jan Kara
2023-06-26 17:35 ` [PATCH 10/12] writeback: Add for_each_writeback_folio() Matthew Wilcox (Oracle)
2023-06-26 17:35 ` [PATCH 11/12] iomap: Convert iomap_writepages() to use for_each_writeback_folio() Matthew Wilcox (Oracle)
2023-06-26 17:35 ` [PATCH 12/12] writeback: Remove a use of write_cache_pages() from do_writepages() Matthew Wilcox (Oracle)
2023-06-27  4:03 ` [PATCH 00/12] Convert write_cache_pages() to an iterator Christoph Hellwig
2023-06-27 10:53 ` David Howells
2023-06-28 19:31   ` Matthew Wilcox
2023-12-12  7:46     ` Christoph Hellwig
2023-06-28 20:03   ` David Howells
2023-07-04 18:08     ` Matthew Wilcox
2023-11-21  5:18 ` 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).