From patchwork Tue Feb 4 23:12:01 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luis Chamberlain X-Patchwork-Id: 13960280 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 95645C02193 for ; Wed, 5 Feb 2025 01:03:02 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 0DFB428000B; Tue, 4 Feb 2025 20:03:02 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 08FE0280001; Tue, 4 Feb 2025 20:03:02 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id EC07528000B; Tue, 4 Feb 2025 20:03:01 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id CCBF5280001 for ; Tue, 4 Feb 2025 20:03:01 -0500 (EST) Received: from smtpin14.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id 5BE291403D5 for ; Wed, 5 Feb 2025 01:03:01 +0000 (UTC) X-FDA: 83084091762.14.CB3F323 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) by imf02.hostedemail.com (Postfix) with ESMTP id 7A6E380006 for ; Wed, 5 Feb 2025 01:02:59 +0000 (UTC) Authentication-Results: imf02.hostedemail.com; dkim=pass header.d=infradead.org header.s=bombadil.20210309 header.b=rijrXj+y; spf=none (imf02.hostedemail.com: domain of mcgrof@infradead.org has no SPF policy when checking 198.137.202.133) smtp.mailfrom=mcgrof@infradead.org; dmarc=fail reason="No valid SPF, DKIM not aligned (relaxed)" header.from=kernel.org (policy=quarantine) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1738717379; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:references:dkim-signature; bh=kWF3U2LkOxTN8T3vmFQjS9eJjcQiGfH8Tr90xVOXrSQ=; b=rJLJ/8Nc6IW2FLIwO3IIMiFvjjksDVvHWewhzbWZo6vCZnR+4apz9Goud3jErJZULRnAKM KGlAyDIIB+vExrIEhuXYuVx3XFDWzLtfkPYpjHpu8FaVPK9O6yldlstTcqRORZD8QpLdQY Xeldq3ZjZpY0Ir4FYKm6RVpIqwbehA8= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1738717379; a=rsa-sha256; cv=none; b=1AUqyY12oVblZmRQe0VgDSjR/QLxdinPY4bLW1bKj2GDPIMyagtYpdodnV3KsdgP+KcrVt sDvRE46H2E7sj6Y9+qfrSBiIfiHks34bKFKsF/OtUo0aTv5sD4uQK6WW/7h8JyQ4cIqtWB 7DttssLIJRe6kAwK/zFqJU51/58s5t4= ARC-Authentication-Results: i=1; imf02.hostedemail.com; dkim=pass header.d=infradead.org header.s=bombadil.20210309 header.b=rijrXj+y; spf=none (imf02.hostedemail.com: domain of mcgrof@infradead.org has no SPF policy when checking 198.137.202.133) smtp.mailfrom=mcgrof@infradead.org; dmarc=fail reason="No valid SPF, DKIM not aligned (relaxed)" header.from=kernel.org (policy=quarantine) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Sender:Content-Transfer-Encoding: MIME-Version:Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-Type: Content-ID:Content-Description:In-Reply-To:References; bh=kWF3U2LkOxTN8T3vmFQjS9eJjcQiGfH8Tr90xVOXrSQ=; b=rijrXj+yJ+nz0RrF14z8QejonG FcZPUXqnRhOO/8Yc+wXkDRt55ZCULLTT96RwOVqheHS2h40N0Me6/L5+Ca0MGifYuCdUWcCAtb52K IF+jWLscCxlkNQV6+0N8I4Gwdpsu+uQFcIFwsdHP1uwf1oTLoSy0bPXqGmcmxLp3kwsIWDfNySFlu suQWP4HgutVMmg4anHWTlM8HblHs+CogEX50QOsPXnoVO777kbKZ4MmMap2lLqSuSv8dBEby5kzeN /qrcA5FFtDeAz+vJoI8bkA/EUtVABdcNHRWMShHSwmBPEcWIuqR2nQLpBZ8exqNvol9iv7magNTwu Clebuseg==; Received: from mcgrof by bombadil.infradead.org with local (Exim 4.98 #2 (Red Hat Linux)) id 1tfS5T-00000001nhK-0tRb; Tue, 04 Feb 2025 23:12:11 +0000 From: Luis Chamberlain To: hare@suse.de, willy@infradead.org, dave@stgolabs.net, david@fromorbit.com, djwong@kernel.org, kbusch@kernel.org Cc: john.g.garry@oracle.com, hch@lst.de, ritesh.list@gmail.com, linux-fsdevel@vger.kernel.org, linux-xfs@vger.kernel.org, linux-mm@kvack.org, linux-block@vger.kernel.org, gost.dev@samsung.com, p.raghav@samsung.com, da.gomez@samsung.com, kernel@pankajraghav.com, mcgrof@kernel.org Subject: [PATCH v2 0/8] enable bs > ps for block devices Date: Tue, 4 Feb 2025 15:12:01 -0800 Message-ID: <20250204231209.429356-1-mcgrof@kernel.org> X-Mailer: git-send-email 2.48.1 MIME-Version: 1.0 X-Stat-Signature: rerzyozcy8ircfwg8kft56bwhhfaj77e X-Rspamd-Pre-Result: action=add header; module=dmarc; Action set by DMARC X-Rspamd-Queue-Id: 7A6E380006 X-Rspam-User: X-Rspamd-Server: rspam06 X-Rspam: Yes X-HE-Tag: 1738717379-291034 X-HE-Meta: U2FsdGVkX18onZpfJcl+wk1iJs0aLhXETIxxg8RGqg3WxTWv3IFtr5u9Soy7vqW+D8W9e9WtlhrwwACDiVj4TgYIulFoCCBc+BJ4lqBUOXiy61grN2ektEqBz4a5L6BBVTNfQfqRgHPsIzy/u1N35tpk0JlJLVZ4AZ80NCjvvlfglQuNrmKQQqGh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yMLimWmwKTobFyo80ua82g4t0yUMT1KykEa6X0RlnCLxDZTgzD56a3wE14dudDMq6do0h/8duGxfm4sQ1R+QAmztuiUfaxJm4Otj2SX1CtG8tgC/7/Dc6kzoLyeZ0QtTPy8gYnjSckpphDWHcHZkGSLp54/Eh7Gk+Fdkg+mJ68TMAw5bTQ6+NwxnkRpXdFGTbzsvRYRPfpx+4VPdBAzAahSvtnq0sL8z+psYgjimQ8UaYvdyiDeOJ1KVbaJesAWysvoHf2KkeUVMQQs= X-Bogosity: Ham, tests=bogofilter, spamicity=0.002332, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: This v2 addresses feedback from the first RFC on enabling bs > ps for block devices [0] after which I split the async read buffer-head work into its own series [1]. This unifies the series now that this the buffer-head work is greatly simplified, and generalizing a block size check is now merged upstream on v6.14-rc1. Changes in this series: - Simplify block_read_full_folio() with bh_offset() and moves this as a first patch - Re-orders the negative shift patch to go first as otherwise the blocks_per_folio changes don't make any sense - Simplifies the amount of changes in the patch "enable large folio support for large logical block sizes" as most of the required changes are now upstream - Drops the NVMe patch as its no longer needed - Keeps the nrpages to 1 for readahead for folio for buffer-heads as suggested by Matthew - Takes the suggested approach by Matthew Wilcox on async read by replacing the batched read with a straight forward iteration - Tons of cosmetic updates as requested by folks - Rebases on top of v6.14-rc1 - Tested with both fstests on ext4 and blktests using the latest changes posted to support bs > ps for block devices just now [2] - Updates the rationale for why we use 64k as the current limit: test and validation If you want this on a tree, this is available on the kdevops linux large-block-buffer-heads-for-next branch [3]. [0] https://lkml.kernel.org/r/20241113094727.1497722-1-mcgrof@kernel.org [1] https://lkml.kernel.org/r/20241218022626.3668119-1-mcgrof@kernel.org [2] https://lkml.kernel.org/r/20250204225729.422949-1-mcgrof@kernel.org [3] https://github.com/linux-kdevops/linux/tree/large-block-buffer-heads-for-next Hannes Reinecke (3): fs/mpage: avoid negative shift for large blocksize fs/mpage: use blocks_per_folio instead of blocks_per_page block/bdev: enable large folio support for large logical block sizes Luis Chamberlain (4): fs/buffer: simplify block_read_full_folio() with bh_offset() fs/buffer fs/mpage: remove large folio restriction block/bdev: lift block size restrictions to 64k bdev: use bdev_io_min() for statx block size Matthew Wilcox (1): fs/buffer: remove batching from async read block/bdev.c | 11 ++++---- fs/buffer.c | 58 +++++++++++++++++------------------------- fs/mpage.c | 45 +++++++++++++++----------------- include/linux/blkdev.h | 9 ++++++- 4 files changed, 58 insertions(+), 65 deletions(-)