[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YNTM3P/lem6P8ie/@casper.infradead.org>
Date: Thu, 24 Jun 2021 19:20:12 +0100
From: Matthew Wilcox <willy@...radead.org>
To: Christoph Hellwig <hch@...radead.org>
Cc: akpm@...ux-foundation.org, linux-fsdevel@...r.kernel.org,
linux-mm@...ck.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 24/46] mm/writeback: Add __folio_end_writeback()
On Wed, Jun 23, 2021 at 11:15:55AM +0200, Christoph Hellwig wrote:
> On Tue, Jun 22, 2021 at 01:15:29PM +0100, Matthew Wilcox (Oracle) wrote:
> > test_clear_page_writeback() is actually an mm-internal function, although
> > it's named as if it's a pagecache function. Move it to mm/internal.h,
> > rename it to __folio_end_writeback() and change the return type to bool.
> >
> > The conversion from page to folio is mostly about accounting the number
> > of pages being written back, although it does eliminate a couple of
> > calls to compound_head().
>
> While this looks good, I think the whole abstraction is wrong. I think
> test_clear_page_writeback should just be merged into it's only caller.
I'm not opposed to doing that, but something else has to get
un-static'ed in order to make that happen.
folio_end_writeback (exported, filemap.c)
-> folio_wake (static, filemap.c)
-> folio_wake_bit (static, filemap.c)
-> __folio_end_writeback (non-static, page-writeback.c)
-> __wb_writeout_add (static, page-writeback.c)
I'm not sure there's an obviously better split than where it is right
now.
> But if that is somehow not on the table this change looks ok:
>
> Reviewed-by: Christoph Hellwig <hch@....de>
Powered by blists - more mailing lists