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 6D1FEC369AB for ; Mon, 21 Apr 2025 21:06:42 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 11FE66B0005; Mon, 21 Apr 2025 17:06:40 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 0CF526B0007; Mon, 21 Apr 2025 17:06:40 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id EFFB56B0008; Mon, 21 Apr 2025 17:06:39 -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 D317C6B0005 for ; Mon, 21 Apr 2025 17:06:39 -0400 (EDT) Received: from smtpin27.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id 35C821C9CD4 for ; Mon, 21 Apr 2025 21:06:41 +0000 (UTC) X-FDA: 83359285002.27.F8D1A33 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf21.hostedemail.com (Postfix) with ESMTP id 97C4A1C0010 for ; Mon, 21 Apr 2025 21:06:39 +0000 (UTC) Authentication-Results: imf21.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=KGMiVEen; dmarc=pass (policy=quarantine) header.from=kernel.org; spf=pass (imf21.hostedemail.com: domain of mcgrof@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=mcgrof@kernel.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1745269599; a=rsa-sha256; cv=none; b=6B8omhFBhMRvZqLNzBPvOjcmoqsIjJMW3Tiy2C4M1lS72PAzmy2iwQiKfcIhWPyoe0Sht8 fs+usKL2ruD0lh/+eSR60nwlC5NhjWd7CuxtGpw9D8CEdH7Stot12KN1eIEBnZ2gLp9KXg +RqPXPf4FI6QRhoPU6HxhLxlVV5sG1g= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1745269599; 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=ja2IPynz6iMo3HuB1TA8SlPo/Bzs9VEf3MpTDOkg8wg=; b=aRyA5vkQsvu7FJO3o89Gyq9FKJyUElA47CPgu1ke+CzAlFZYIejhvJVNzOhfiX5RtSxnCU Mnzx0yWwpc+tohyrYc8X/0L+9IHSvaQRxkuik+KWiKjRMZSkRBvsNpjwMcGCh+FcV4kOFQ 4LzjP8chq6pRIpkshzKAsy/V5H6fw2M= ARC-Authentication-Results: i=1; imf21.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=KGMiVEen; dmarc=pass (policy=quarantine) header.from=kernel.org; spf=pass (imf21.hostedemail.com: domain of mcgrof@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=mcgrof@kernel.org Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 6CD565C59AE; Mon, 21 Apr 2025 21:04:21 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D8563C4CEEA; Mon, 21 Apr 2025 21:06:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1745269598; bh=6kF4qcAhccbS6K+ytOmRgQrJi0iPWLQ6dCBhdYPzjiQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=KGMiVEeny0NKQvICXmbZI1stATJNujaWqFdomyXi233hPuOqtNHsjHbesNzMwlDp/ Aq6eOQCc08niPiRxa4bnJ06eJqrG7CNDN1fpcTSQ2q/31/JvNWmbOPk+o8/3tQpTYG OSsNbPEtJUaHKBOxkhtb5SO1wXiOFxPkL6Kb63RlHWRXb7f+pZ2tZ/q+00HwboG7AW hVmNAhmBMegEXwG2hb+l/SH4+qpFse44gM7t2xCln/zQ6xrcYt1i2e85wJEYJGuihJ mgZeD5dn515KiDSEWsI4pb4IXoIixhb4Q1hW2LEo5mMsEt4bDxZH1Sb+Bp7AlZfmQM EtSCAEU2ptBWw== Date: Mon, 21 Apr 2025 14:06:36 -0700 From: Luis Chamberlain To: Davidlohr Bueso Cc: 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 v2 0/7] fs/buffer: split pagecache lookups into atomic or blocking Message-ID: References: <20250418015921.132400-1-dave@stgolabs.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20250418015921.132400-1-dave@stgolabs.net> X-Rspamd-Server: rspam06 X-Rspamd-Queue-Id: 97C4A1C0010 X-Stat-Signature: r1pqitujre5cqpsrd9huiebxf5zqjosk X-Rspam-User: X-HE-Tag: 1745269599-33829 X-HE-Meta: U2FsdGVkX1/yC4H89EVl4RM09dH19Htw5DvW1xf88n7wH4fOpYTHla6iOht4+j6LRxke5AFFbCgPhO+SpYkzxLpESwFWiLc7QlMmt9wBpd7caSsPMJk5n6MLpMj63rEnJPUWIAYbKoAGAV7YgqAIb/a2vh0x/2R0oMWuehhj+bUUr/jciaToE2TpOkOFu6ZEjgfW9j23yEv8uSaOPDcrr3k8+tGCQZI4ADyGHFQipl40/Pv+O88OrAuPNz1wwcYqxdIojCYgj91yZDCd+IofrFpG12MGLy4gpkClY5/nZek6O/yssZlAwBr3wkFiovLDUiJb4gb+P1pVkcHIDenq4i9r+Wn4LnTRST2+Ec2+n+yB9OyuWxAPzyaMzhyP/8syZufw5B+GMPoIcjKosUbCzJ4aHHzqpHrFfot2NTACP5wQyhtx3rXkXngG74eApgT64+K6G4tZ9QhDIdvzy92ER2flEULyKnA44bh1ctTsnAJjD4woS0TTXNp5H9Nn5mm5byFvD3MMeuPFPBVRCCeFkX8nceqf7wpO9Kj2R005hGDKijlEJqk329XAOVqLkXnwTnA/OqwkNTKgEFBGcvAqAgY/xKdXBVl7clNZ2UbOASzukWXoAmTiJkU6s42xNk8pFEDib4GenAYjAMe/STkcuKWwFPcSs9RBrRih3ftazXJibKKiRfl2n7QoSFaKcV1d5GNp8wqevat57TxaB3PDdWa3d2hYAWu8VVDImrbZ/P2fHQyPp6nA9u4PfHBZ3Ry8xziNa4KaeJ6WA9duNKK6eZqJqojM/MRvA0ZTu1OUYatuHa9WnPSTqendSeBVOrtxMdcocEu2FC4rtIRhh03108hoYGRg6RLPZ73Tfmo/5IiQDvYbLBQOMGs4Ki97H1uSUN7PK28fQthdJOqrVtEAnPFN0y6qIfcau0sR+vMDraU/7TRt/AvX7qUsjoCbesbZtvwiLSh80hyCuzGXHRH 5b14Ygjb VDJLCqTWDejxxM+BpbqhcBpvTvtwiAwLLBBYlC54l0ciOnF17jjbaC3kgUljFlqtOIjBWAhk9z/rkWvBvYuF1hLHUzu4KKK9WHrdBAdMz1CmsXp4PW09txAICxSapUGzry7POykcknhdv7/UIYFbrHnblL13kDdwoPrJ9vBc+GNcEuuIsw/18gLpA7jEuxSVURiRVMQB1C20dgVcTbMRLRCDuu341sF6zDn/NM4tUuayHNc2YRek83pSzgMm67cchxWqBTAa052FpChl43P8alK0Dc6Jkm5CK9V6ApiUrDxZroRfjaTFqvU+Z7mulo4A/3KnfgLDHunM0ONDRrSNtarJcl6FTTHMU6zBRqavt0cIUA+Uye5kQ2tIS3C0/ksx5Xqg5 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 Thu, Apr 17, 2025 at 06:59:14PM -0700, Davidlohr Bueso wrote: > Hello, > > Changes from v1: rebased on top of vfs.fixes (Christian). > > 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. > > Applies against latest vfs.fixes. Please consider for Linus' tree. > > 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! Reviewed-by: Luis Chamberlain Tested-by: kdevops@lists.linux.dev # [0] [1] Link: https://kdevops.org/ext4/v6.15-rc2.html # [0] Link: https://lore.kernel.org/all/aAAEvcrmREWa1SKF@bombadil.infradead.org/ # [1] Luis