linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Jan Kara <jack@suse.cz>
To: Luis Chamberlain <mcgrof@kernel.org>
Cc: Davidlohr Bueso <dave@stgolabs.net>,
	 Linus Torvalds <torvalds@linux-foundation.org>,
	jack@suse.cz, tytso@mit.edu, adilger.kernel@dilger.ca,
	 brauner@kernel.org, willy@infradead.org, hare@suse.de,
	djwong@kernel.org,  linux-ext4@vger.kernel.org,
	linux-fsdevel@vger.kernel.org, linux-mm@kvack.org
Subject: Re: [PATCH -next 0/7] fs/buffer: split pagecache lookups into atomic or blocking
Date: Tue, 22 Apr 2025 13:25:55 +0200	[thread overview]
Message-ID: <defginw6pm72k5obplzmgzjo2bw4yonaahpbnockb2akqv4qbr@f7egm23q5ozi> (raw)
In-Reply-To: <aAAEvcrmREWa1SKF@bombadil.infradead.org>

On Wed 16-04-25 12:27:57, Luis Chamberlain wrote:
> On Tue, Apr 15, 2025 at 04:16:28PM -0700, Davidlohr Bueso wrote:
> > Hello,
> > 
> > This is a respin of the series[0] to address the sleep in atomic scenarios for
> > noref migration with large folios, introduced in:
> > 
> >       3c20917120ce61 ("block/bdev: enable large folio support for large logical block sizes")
> > 
> > The main difference is that it removes the first patch and moves the fix (reducing
> > the i_private_lock critical region in the migration path) to the final patch, which
> > also introduces the new BH_Migrate flag. It also simplifies the locking scheme in
> > patch 1 to avoid folio trylocking in the atomic lookup cases. So essentially blocking
> > users will take the folio lock and hence wait for migration, and otherwise nonblocking
> > callers will bail the lookup if a noref migration is on-going. Blocking callers
> > will also benefit from potential performance gains by reducing contention on the
> > spinlock for bdev mappings.
> > 
> > It is noteworthy that this series is probably too big for Linus' tree, so there are
> > two options:
> > 
> >  1. Revert 3c20917120ce61, add this series + 3c20917120ce61 for next. Or,
> 
> Reverting due to a fix series is odd, I'd advocate this series as a set
> of fixes to Linus' tree because clearly folio migration was not complete
> for buffer_migrate_folio_norefs() and this is part of the loose bits to help
> it for large folios. This issue was just hard to reproduce. The enabler
> of large folios on the block device cache is actually commit
> 47dd67532303 ("block/bdev: lift block size restrictions to 64k") which
> goes later after 3c20917120ce61.

I fully agree reverting anything upstream when there's fix series available
is just pointless.
 
> Jan Kara, since you've already added your Reviewed-by for all patches
> do you have any preference how this trickles to Linus?

I think pushing it normally through VFS tree is fine.

> >  2. Cherry pick patch 7 as a fix for Linus' tree, and leave the rest for next.
> >     But that could break lookup callers that have been deemed unfit to bail.
> > 
> > Patch 1: carves a path for callers that can block to take the folio lock.
> > Patch 2: adds sleeping flavors to pagecache lookups, no users.
> > Patches 3-6: converts to the new call, where possible.
> > Patch 7: does the actual sleep in atomic fix.
> > 
> > Thanks!
> 
> kdevops has tested this patch series and compared it to the baseline [0]
> and has found no regressions on ext4.
> 
> Tested-by: kdevops@lists.linux.dev

Cool, thanks for testing.

								Honza
-- 
Jan Kara <jack@suse.com>
SUSE Labs, CR


  parent reply	other threads:[~2025-04-22 11:26 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-15 23:16 Davidlohr Bueso
2025-04-15 23:16 ` [PATCH 1/7] fs/buffer: split locking for pagecache lookups Davidlohr Bueso
2025-04-16  9:32   ` Jan Kara
2025-04-15 23:16 ` [PATCH 2/7] fs/buffer: introduce sleeping flavors " Davidlohr Bueso
2025-04-16  9:33   ` Jan Kara
2025-04-15 23:16 ` [PATCH 3/7] fs/buffer: use sleeping version of __find_get_block() Davidlohr Bueso
2025-04-16  9:33   ` Jan Kara
2025-04-15 23:16 ` [PATCH 4/7] fs/ocfs2: " Davidlohr Bueso
2025-04-16  9:35   ` Jan Kara
2025-04-15 23:16 ` [PATCH 5/7] fs/jbd2: " Davidlohr Bueso
2025-04-16  9:38   ` Jan Kara
2025-04-15 23:16 ` [PATCH 6/7] fs/ext4: use sleeping version of sb_find_get_block() Davidlohr Bueso
2025-04-16  9:39   ` Jan Kara
2025-04-15 23:16 ` [PATCH 7/7] mm/migrate: fix sleep in atomic for large folios and buffer heads Davidlohr Bueso
2025-04-16  9:43   ` Jan Kara
2025-04-16 19:27 ` [PATCH -next 0/7] fs/buffer: split pagecache lookups into atomic or blocking Luis Chamberlain
2025-04-17  9:57   ` Christian Brauner
2025-04-22 11:25   ` Jan Kara [this message]
2025-04-17  9:58 ` Christian Brauner

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=defginw6pm72k5obplzmgzjo2bw4yonaahpbnockb2akqv4qbr@f7egm23q5ozi \
    --to=jack@suse.cz \
    --cc=adilger.kernel@dilger.ca \
    --cc=brauner@kernel.org \
    --cc=dave@stgolabs.net \
    --cc=djwong@kernel.org \
    --cc=hare@suse.de \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mcgrof@kernel.org \
    --cc=torvalds@linux-foundation.org \
    --cc=tytso@mit.edu \
    --cc=willy@infradead.org \
    /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