linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Matthew Wilcox <willy@infradead.org>
To: "Vishal Moola (Oracle)" <vishal.moola@gmail.com>
Cc: linux-mm@kvack.org, tytso@mit.edu, linux-ext4@vger.kernel.org,
	linux-kernel@vger.kernel.org, akpm@linux-foundation.org
Subject: Re: [PATCH mm-unstable] ext4: Convert mext_page_double_lock() to mext_folio_double_lock()
Date: Tue, 6 Dec 2022 20:53:45 +0000	[thread overview]
Message-ID: <Y4+r2c+d+gWi93og@casper.infradead.org> (raw)
In-Reply-To: <Y4+q+vYuqqM0RKOT@casper.infradead.org>

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.


  reply	other threads:[~2022-12-06 20:53 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-06 20:41 Vishal Moola (Oracle)
2022-12-06 20:50 ` Matthew Wilcox
2022-12-06 20:53   ` Matthew Wilcox [this message]
2022-12-07  2:22   ` Vishal Moola

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Y4+r2c+d+gWi93og@casper.infradead.org \
    --to=willy@infradead.org \
    --cc=akpm@linux-foundation.org \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=tytso@mit.edu \
    --cc=vishal.moola@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox