Re: [RFC PATCH 2/3] mm: provide rmap_wrprotect_file_page() function

2025-01-08 Thread Lorenzo Stoakes
On Wed, Jan 08, 2025 at 05:25:01PM +, Matthew Wilcox wrote: > On Wed, Jan 08, 2025 at 04:18:41PM +, Lorenzo Stoakes wrote: > > +++ b/include/linux/rmap.h > > @@ -754,6 +754,26 @@ unsigned long page_address_in_vma(const struct folio > > *folio, > > */ > > int folio_mkclean(struct folio *

Re: [RFC PATCH 2/3] mm: provide rmap_wrprotect_file_page() function

2025-01-08 Thread Matthew Wilcox
On Wed, Jan 08, 2025 at 04:18:41PM +, Lorenzo Stoakes wrote: > +++ b/include/linux/rmap.h > @@ -754,6 +754,26 @@ unsigned long page_address_in_vma(const struct folio > *folio, > */ > int folio_mkclean(struct folio *); > > +/** The kerneldoc comment should be with the implementation, not

[RFC PATCH 2/3] mm: provide rmap_wrprotect_file_page() function

2025-01-08 Thread Lorenzo Stoakes
in the fb_defio video driver, page dirty state is used to determine when frame buffer pages have been changed, allowing for batched, deferred I/O to be performed for efficiency. This implementation had only one means of doing so effectively - the use of the folio_mkclean() function. However, this