lkml.org 
[lkml]   [2022]   [Dec]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH mm-unstable] ext4: Convert mext_page_double_lock() to mext_folio_double_lock()
On Tue, Dec 06, 2022 at 08:50:02PM +0000, Matthew Wilcox wrote:
> > flags = memalloc_nofs_save();
> > - page[0] = grab_cache_page_write_begin(mapping[0], index1);
> > - if (!page[0]) {
> > + folio[0] = __filemap_get_folio(mapping[0], index1, fgp_flags,
> > + mapping_gfp_mask(mapping[0]));
>
> one
>
> > + if (!folio[0]) {
> > memalloc_nofs_restore(flags);
> > return -ENOMEM;
> > }
> >
> > - page[1] = grab_cache_page_write_begin(mapping[1], index2);
> > + folio[1] = __filemap_get_folio(mapping[1], index2, fgp_flags,
> > + mapping_gfp_mask(mapping[1]));
>
> two

*facepalm*. Those don't contain calls to compound_head(), they contain
calls to folio_file_page(), which is still a moderately-expensive
unnecessary conversion, but a conversion in the other direction.

\
 
 \ /
  Last update: 2022-12-06 21:54    [W:0.047 / U:0.636 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site