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 B498EC27C4F for ; Sun, 30 Jun 2024 03:24:10 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id EC7326B0082; Sat, 29 Jun 2024 23:24:09 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id E4F786B0083; Sat, 29 Jun 2024 23:24:09 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id CC9566B0085; Sat, 29 Jun 2024 23:24:09 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id AB7C86B0082 for ; Sat, 29 Jun 2024 23:24:09 -0400 (EDT) Received: from smtpin20.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id 2E5D81C2127 for ; Sun, 30 Jun 2024 03:24:09 +0000 (UTC) X-FDA: 82286111418.20.070B7AD Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) by imf19.hostedemail.com (Postfix) with ESMTP id DED511A0003 for ; Sun, 30 Jun 2024 03:24:06 +0000 (UTC) Authentication-Results: imf19.hostedemail.com; dkim=pass header.d=infradead.org header.s=bombadil.20210309 header.b=ERUYqH4B; spf=none (imf19.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=none) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1719717828; 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-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=ylz6vqCuJzZf1PIz6xhbAzUrEmmlhojw5Hi3FLPU+YI=; b=SjToFkkA5+ZLDZ2hzRW8Pf1jD6InJu6g10SW2ca+2Ipi58c9byuiKryNWkTT8Y7dptfrZ5 lUFE6Y/mzNuQ5+BdNAEMOeUVa0KtSF9KMr3sFBxBDi2ax37G6+2ID4h8kCFPW3R8L3oUxy GjzgdaA3JMDsw/0cYzOlKjQT+uml+E8= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1719717828; a=rsa-sha256; cv=none; b=MkLeeSsam0MK86OqMeTFDPKTidg7j6qqBMcs2SlGh7b+XsbWvRonLduFdAjfSH9RHSz52q tBNwZx/JJt2qGwRifdjZd5BoT8SKLLZ36llh6CSkwtZ0XidkzEudMMlygQj8SUHdB0xRHl NI9ORF3aAEvvTFaeuVnELii8D5EKjT8= ARC-Authentication-Results: i=1; imf19.hostedemail.com; dkim=pass header.d=infradead.org header.s=bombadil.20210309 header.b=ERUYqH4B; spf=none (imf19.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=none) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=ylz6vqCuJzZf1PIz6xhbAzUrEmmlhojw5Hi3FLPU+YI=; b=ERUYqH4BdWzr1zw6sPM/8JroWj havIqKNQ2lFdqbOSxHpyoGlFp6KQsPUaBTrdPKHvGNzdMqc7a9IZlSlKbkItyComMQZIBK/6t8QxT uBqsvGd3a7LaDW38k3NEOk+Ip5X8D3NqUAXQkBAyU0HURZdT4SRPwYuZ9fevhJlCYYJTQikJYuGkv ro7fgL1mkFPYQAUzBJzs8RkMAuJ3l9Fmvx2YqjyPdHrIP9KbFETIVDWyrkytOCDWJv1g9e45GX0tx Fuu1KrxjBOsWnk3PVLVfACszP+2kRyOAGBBsJQ8o9geDWtaYN1DOSQ0UldMGbKfrlHiTuxQtLcZb/ KSfZaQBw==; Received: from mcgrof by bombadil.infradead.org with local (Exim 4.97.1 #2 (Red Hat Linux)) id 1sNlAW-0000000HJS6-2N0N; Sun, 30 Jun 2024 03:24:00 +0000 Date: Sat, 29 Jun 2024 20:24:00 -0700 From: Luis Chamberlain To: Christoph Hellwig , martin.petersen@oracle.com, ebiggers@google.com Cc: p.raghav@samsung.com, hare@suse.de, kbusch@kernel.org, david@fromorbit.com, neilb@suse.de, gost.dev@samsung.com, linux-block@vger.kernel.org, linux-mm@kvack.org, patches@lists.linux.dev Subject: Re: [RFC] bdev: use bdev_io_min() for statx DIO min IO Message-ID: References: <20240628212350.3577766-1-mcgrof@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Rspamd-Queue-Id: DED511A0003 X-Stat-Signature: 3yytht9mg8nyf14sy9okspy8fhgkd1wr X-Rspamd-Server: rspam09 X-Rspam-User: X-HE-Tag: 1719717846-919589 X-HE-Meta: U2FsdGVkX1/8FsB6YYmWSTQGU3wEgsj8ouVWtYLJeUYwP9ejMAcGoDdBfsX6UaU+AnQ9p3r+uHROwjB8jMFPYdLWyjUgy02UqIXsIfnNU5GZ9Q8rn0rpT9ck27sipF74MpFuNmsIRCaTYtGDuezgvH8GgENbg3aRvMJIigPka8A11Tr0nJ6cIHjHkDNPEcz8ZIfSHbUCWQhzLD71k80AJxwyQDBe5f4hdUh9usg1P672lelhrmamwUmsp8FccINGE+TBagQlj/cQe/MtLrcLAM2cf4yxyVh/ZLCW007GOkLqXoPa+JE+2FD287ewZxDY2HefSROq6RdzQ/j+onrKKR4nKEyNKp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O1pKRs/ZmOBu8UT8ofRzFlOPQp7JuGW3+NbVghGZq0fS91Utzf+ 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 Fri, Jun 28, 2024 at 11:25:34PM -0700, Christoph Hellwig wrote: > On Fri, Jun 28, 2024 at 02:23:50PM -0700, Luis Chamberlain wrote: > > We currently rely on the block device logical block size for the > > offset alignment. While this *works* it doesn't work with performance > > in mind. That's exactly what the minimum_io_size attribute is for. > > > > This would for example enhance performance for DIO on 4k IU drives which > > have for example an LBA format of 512 bytes for both HDDs and NVMe. > > Another use case is to ensure that DIO will be used with 16k IOs on > > existing market 16k IU drives with an LBA format of 4k or 512 bytes. > > The minimum_io_size clearly is the minimum I/O size, not the minimal > nice to have one. I may have misread the below documentation then, because it seems to suggest this is a performance parameter, not a real minimum. Do we need to update it? What: /sys/block//queue/minimum_io_size Date: April 2009 Contact: Martin K. Petersen Description: [RO] Storage devices may report a granularity or preferred minimum I/O size which is the smallest request the device can perform without incurring a performance penalty. For disk drives this is often the physical block size. For RAID arrays it is often the stripe chunk size. A properly aligned multiple of minimum_io_size is the preferred request size for workloads where a high number of I/O operations is desired. If this is not the right place, do we need to use a new topology entry for the IU? Today the NVMe drive uses it for the NPWG which these days is the IU. > Changing this will break existing setups. My impression was that STATX_DIOALIGN was rather new, so any new enhancements due to the difficulties in getting DIO alignment right, this was the right place to do so. Let me know if you have other suggestions. Luis