From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 14D57C369C2 for ; Tue, 22 Apr 2025 11:26:01 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 6B8ED6B0024; Tue, 22 Apr 2025 07:26:00 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 6656F6B0025; Tue, 22 Apr 2025 07:26:00 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 5065C6B0026; Tue, 22 Apr 2025 07:26:00 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id 3408F6B0024 for ; Tue, 22 Apr 2025 07:26:00 -0400 (EDT) Received: from smtpin04.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id DBC50B6B56 for ; Tue, 22 Apr 2025 11:25:59 +0000 (UTC) X-FDA: 83361450438.04.13D5AE2 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) by imf02.hostedemail.com (Postfix) with ESMTP id 939D580003 for ; Tue, 22 Apr 2025 11:25:57 +0000 (UTC) Authentication-Results: imf02.hostedemail.com; dkim=pass header.d=suse.cz header.s=susede2_rsa header.b=EEUSmd9Z; dkim=pass header.d=suse.cz header.s=susede2_ed25519 header.b=IBdSlQ01; dkim=pass header.d=suse.cz header.s=susede2_rsa header.b=EEUSmd9Z; dkim=pass header.d=suse.cz header.s=susede2_ed25519 header.b=IBdSlQ01; dmarc=none; spf=pass (imf02.hostedemail.com: domain of jack@suse.cz designates 195.135.223.130 as permitted sender) smtp.mailfrom=jack@suse.cz ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1745321158; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=iO6vzueM4CxUgcbkft4Y4vPzSVxQmwKdoliK2EKUjiQ=; b=TR72OvQ9LOMDaaDYjEZxs88GnWLcNWoR/wUjP0SbncRQaH4Tb2AqxauIEAqLjlRuN0xqHy lr+TaCNell7ey/1dbp2qfYDTBVtLFsaR3xgSgNsBBRgnM6ZB/nveOUAEkWpfdSWc7gOEln xnrpL2VDqrQxAaNxESbhLqOMsDCpwcs= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1745321158; a=rsa-sha256; cv=none; b=roWXql8pVvX8rLzWqCoLIra3Vr2OsSDblTBnWK927M3kp+VHiNJj9ZJ2akZ0WJljL585x1 hlhkeOz0fvXwKgXagFHLlNhYe9/J6nKv6b68cY/32A4Hlap7Dh4VIm2MZP85xxhElzrKLZ 2upzyf1UxC45dr64+DFNwsNHwjVnrgQ= ARC-Authentication-Results: i=1; imf02.hostedemail.com; dkim=pass header.d=suse.cz header.s=susede2_rsa header.b=EEUSmd9Z; dkim=pass header.d=suse.cz header.s=susede2_ed25519 header.b=IBdSlQ01; dkim=pass header.d=suse.cz header.s=susede2_rsa header.b=EEUSmd9Z; dkim=pass header.d=suse.cz header.s=susede2_ed25519 header.b=IBdSlQ01; dmarc=none; spf=pass (imf02.hostedemail.com: domain of jack@suse.cz designates 195.135.223.130 as permitted sender) smtp.mailfrom=jack@suse.cz Received: from imap1.dmz-prg2.suse.org (unknown [10.150.64.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id C78A321187; Tue, 22 Apr 2025 11:25:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1745321155; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=iO6vzueM4CxUgcbkft4Y4vPzSVxQmwKdoliK2EKUjiQ=; b=EEUSmd9ZXncONRT13T3UzRXYGC+hvbX92t9/Fgj7M9Eev+PbyfHP6gkcRi6F3lgDHDsiYc ODuzVnK5e3aEBzJvu/lfzlqb04F/JjEfg9QOkuv5BtJeUH2jjg19381+zCYhjHkoXQR4Nn CKrFj6Imtf0pZtFO1lUZ7V8mdYy1Kzs= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1745321155; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=iO6vzueM4CxUgcbkft4Y4vPzSVxQmwKdoliK2EKUjiQ=; b=IBdSlQ01m3XklXTdLALO8NRVSSvfWU13y2aoIbwF4rCkgrojv/0oDSCw/7wpjAoYbwSB7/ 9n2gvnKpezPsdeCw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1745321155; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=iO6vzueM4CxUgcbkft4Y4vPzSVxQmwKdoliK2EKUjiQ=; b=EEUSmd9ZXncONRT13T3UzRXYGC+hvbX92t9/Fgj7M9Eev+PbyfHP6gkcRi6F3lgDHDsiYc ODuzVnK5e3aEBzJvu/lfzlqb04F/JjEfg9QOkuv5BtJeUH2jjg19381+zCYhjHkoXQR4Nn CKrFj6Imtf0pZtFO1lUZ7V8mdYy1Kzs= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1745321155; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=iO6vzueM4CxUgcbkft4Y4vPzSVxQmwKdoliK2EKUjiQ=; b=IBdSlQ01m3XklXTdLALO8NRVSSvfWU13y2aoIbwF4rCkgrojv/0oDSCw/7wpjAoYbwSB7/ 9n2gvnKpezPsdeCw== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id B7EE2139D5; Tue, 22 Apr 2025 11:25:55 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id bcDjLMN8B2hsCwAAD6G6ig (envelope-from ); Tue, 22 Apr 2025 11:25:55 +0000 Received: by quack3.suse.cz (Postfix, from userid 1000) id 66ABEA0A56; Tue, 22 Apr 2025 13:25:55 +0200 (CEST) Date: Tue, 22 Apr 2025 13:25:55 +0200 From: Jan Kara To: Luis Chamberlain Cc: Davidlohr Bueso , Linus Torvalds , 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 Message-ID: References: <20250415231635.83960-1-dave@stgolabs.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Rspamd-Server: rspam12 X-Rspamd-Queue-Id: 939D580003 X-Rspam-User: X-Stat-Signature: 6wfmznga78bq7w1tgbtygz8j154tuwzg X-HE-Tag: 1745321157-165417 X-HE-Meta: U2FsdGVkX19yYAR1cj8pP4opkAGHxz64PjC7JxASHF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mHYORxTNw2TQJ+iXmAWOHgduCrWXhFaVeE9DIPIJjH8KrtShf10vXSxMWHDO+I2MoJfePYkYqd69Ho+SuMtAyGoHdTcQHevJpwkGXI3MX4fh6/Z9gwt+s0VsInoI29etRDfVCLRyLsEzXpsIkv70BRBaKW+m9RvxFYiPaU/5PzEKikQrJxEsJVgcqDpUtkSOrhageV3yi9iqQ== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: 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 SUSE Labs, CR