[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20231222150827.1329938-1-hch@lst.de>
Date: Fri, 22 Dec 2023 16:08:10 +0100
From: Christoph Hellwig <hch@....de>
To: linux-mm@...ck.org
Cc: "Matthew Wilcox (Oracle)" <willy@...radead.org>,
Jan Kara <jack@...e.com>,
David Howells <dhowells@...hat.com>,
Brian Foster <bfoster@...hat.com>,
linux-fsdevel@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Convert write_cache_pages() to an iterator v4
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(-)
Powered by blists - more mailing lists