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 0F2F9C27C4F for ; Sun, 30 Jun 2024 22:35:15 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 6403E6B0085; Sun, 30 Jun 2024 18:35:15 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 5F0A36B0088; Sun, 30 Jun 2024 18:35:15 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 490A26B0089; Sun, 30 Jun 2024 18:35:15 -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 2AB6B6B0085 for ; Sun, 30 Jun 2024 18:35:15 -0400 (EDT) Received: from smtpin28.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id B8594A23E3 for ; Sun, 30 Jun 2024 22:35:14 +0000 (UTC) X-FDA: 82289012148.28.9F0261D Received: from mail-pg1-f173.google.com (mail-pg1-f173.google.com [209.85.215.173]) by imf27.hostedemail.com (Postfix) with ESMTP id BAEFA4000F for ; Sun, 30 Jun 2024 22:35:12 +0000 (UTC) Authentication-Results: imf27.hostedemail.com; dkim=pass header.d=fromorbit-com.20230601.gappssmtp.com header.s=20230601 header.b=vNHoKcaM; spf=pass (imf27.hostedemail.com: domain of david@fromorbit.com designates 209.85.215.173 as permitted sender) smtp.mailfrom=david@fromorbit.com; dmarc=pass (policy=quarantine) header.from=fromorbit.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1719786901; 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=tFdvTA2jm9AOGMhPq5Jodplbz8dr8Q0emY1A+Sy4FJc=; b=Kxvyu7D4foeT15Ir9BOlepz+wOhsKxE9jFlVT7UbhR5tvMP0JW7bwc/PtD4aQUg6/6eNMi 2ysqZbYIczEVbgv4QThUq3uCjXwqDmy1fKifmLdT2IzpoKv5BQNMAlyGrg0gfKmQCu79qn zGMIU77fFeV1iw03fksq+fIOyOA8db8= ARC-Authentication-Results: i=1; imf27.hostedemail.com; dkim=pass header.d=fromorbit-com.20230601.gappssmtp.com header.s=20230601 header.b=vNHoKcaM; spf=pass (imf27.hostedemail.com: domain of david@fromorbit.com designates 209.85.215.173 as permitted sender) smtp.mailfrom=david@fromorbit.com; dmarc=pass (policy=quarantine) header.from=fromorbit.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1719786901; a=rsa-sha256; cv=none; b=oUUVs6bzCezvinXyzHtkyN3KkHXvJeuAKyhUJR9acR6e7NqQgPbJ59Dn7A8mwcRaIO5VNo jhAajpMVy95JjsU9vSEnq2+wpsYuPedHXTGE/4Csd5D/7brsQdgK9XHdXQstfCkpJUSIb6 N2xtTZruO5m/dzfdb5WbS1A+CEKaDQ0= Received: by mail-pg1-f173.google.com with SMTP id 41be03b00d2f7-71816f36d4dso1637270a12.2 for ; Sun, 30 Jun 2024 15:35:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fromorbit-com.20230601.gappssmtp.com; s=20230601; t=1719786911; x=1720391711; darn=kvack.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=tFdvTA2jm9AOGMhPq5Jodplbz8dr8Q0emY1A+Sy4FJc=; b=vNHoKcaM24Um/SzgLG2mTnNSxB8kgrjB9mIPHXx/DHiUl/tJRgZidjGT1fjjvMHa9L +pfqnYuuh/ooGfGTKlnk85XifNOVvzom8x5wVlh5M1h+4J17pzpGegIPTNtVrigIV5QP yMQfXAN7zxDmJsPGWExBY52M8ueziKq2DkiR9MykhWuVsuiQZw93JuB5a+l+8QtdgcuZ x3jXx2TnEhHUaaHsvtts8otD0nCNE0BwC3sr/agRJexFUa4z8I9PZSIJE67betvnx1Iw w1y0oGRbm2ncVHt9WLlC30Oriiq7vQFnVH09gdsNs5MqxFq7Rv/2VREn4tVZO4+m9Sch fstw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719786911; x=1720391711; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=tFdvTA2jm9AOGMhPq5Jodplbz8dr8Q0emY1A+Sy4FJc=; b=C0wGOIw6HExYasI452Ua4yvpTCrj/rf08DkkPTqCbrtu3Ihqz9a3IdS5mgheBrqYRX N+xOjdP872gGQhOazS4Am0OKbponuN3czE7N3PBvjbkPulPyHtIIITRIh3hyoyuw+UQq NNycDQok1MurAOcV6GWZrJkVlrpoAdgVgawAOGdmBjMUPcE5m/+4hYKaO5kzCTWbAWcU MIhst+qtYE01/NfN4GzYNRIC6LemroRQmWeYwWy4cG6XL3i4AezY376CbHFKLzE6Y4TT xnLqRhJq8sfeiHAdPfn0M22p5vimAppSu6+MuyJoUcydzlCmLFsc/w3PQxxp+s+HPcpQ 1p/g== X-Forwarded-Encrypted: i=1; AJvYcCWITTXc07mOU9ZJqc6L1bTfQZeh/9wCgb1f46xG3/bAJoOrYN+EAWLBkaqMf6PmLTXd1x43HrNFgTM8eLl2+/3sedk= X-Gm-Message-State: AOJu0YylVcbL5NW8ITuHt5Z/P3WlAMSlprpB/9n6UfgL54exVketDaYc bR4H8ZrCIhOoHIcRC6DJTLv8t7izLpWHFfQ58G7c4nEai81Z9DyoN+sWUREfgrU= X-Google-Smtp-Source: AGHT+IFhV6inGmU7og/3AUkaqs9u1n6LF9SGxpoTNxGW+Hih2rv0JBQ0f/5vD+1wQ4Kj9hRINXUQNQ== X-Received: by 2002:a05:6a20:9145:b0:1bd:2710:de5c with SMTP id adf61e73a8af0-1bef610a250mr8119019637.22.1719786911318; Sun, 30 Jun 2024 15:35:11 -0700 (PDT) Received: from dread.disaster.area (pa49-179-32-121.pa.nsw.optusnet.com.au. [49.179.32.121]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-708043b710fsm5112841b3a.156.2024.06.30.15.35.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 30 Jun 2024 15:35:10 -0700 (PDT) Received: from dave by dread.disaster.area with local (Exim 4.96) (envelope-from ) id 1sO38W-00HExi-0c; Mon, 01 Jul 2024 08:35:08 +1000 Date: Mon, 1 Jul 2024 08:35:08 +1000 From: Dave Chinner To: Luis Chamberlain Cc: Christoph Hellwig , martin.petersen@oracle.com, ebiggers@google.com, p.raghav@samsung.com, hare@suse.de, kbusch@kernel.org, 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-Server: rspam11 X-Rspamd-Queue-Id: BAEFA4000F X-Stat-Signature: xawjopu1ckmff5js34ripckcuffrfjjk X-Rspam-User: X-HE-Tag: 1719786912-648165 X-HE-Meta: U2FsdGVkX19lpuYQSWgP98M69C/6at75WFMyqE2wkuaGUWiWqqhfvumAj5uMOcSW6VidvnTlJHBes8eZzVGnp/In2WvOJ0OexXM4jk2Y3g39doY3h13ugB7h0dDxDX8lC3mSzzRlTLEFh3enkiX4d+wjjJFJSSnPDB/jCmq2V9LgGRkSapet0S67LbAEXAV9sdC4Nlu4R61svlvDsd5hXcqg223HsXuCmcA7HhVhcPX5796jI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eB/RGaum9XJ3DIiLXCg/bGNNakIEj43CUesModvdv+qi6zE/UZpzPy2pfytImM3vqwV0a+M7UTvAu1fAidgnzolwrQvumvZ81sBw== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000054, 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 Sun, Jun 30, 2024 at 01:42:45PM -0700, Luis Chamberlain wrote: > On Sat, Jun 29, 2024 at 10:54:19PM -0700, Christoph Hellwig wrote: > > On Sat, Jun 29, 2024 at 08:24:00PM -0700, Luis Chamberlain wrote: > > > > 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? > > > > queue_limits.min_io is corretly described and a performance hint. > > OK, great! > > > The statx dio_offset_align is actual minimum I/O size and alignment and > > not in any way related to the performance hint in minimum_io_size. > > Oh, darn, I just read again 825cf206ed510 ("statx: add direct I/O > alignment information") and the block layer change through commit > 2d985f8c6b91b ("vfs: support STATX_DIOALIGN on block devices") and > no where do I see any mention of it being a min. Should we clarify > that? dio_offset_align is an _alignment_ parameter, not a "size" parameter. In no way does it define either the absolute or "best performance" minimum IO size - it just defines the minimum valid alignment for the file offset that the filesystem/device supports. It is implied that an IO of dio_offset_align bytes in length will be supported, because that is the minimum length IO that meets the offset alignment requirements defined by dio_offset_align. > And should we add a respective value for performance? We could, but we already have: __u32 stx_blksize; /* Block size for filesystem I/O */ which is defined as: stx_blksize The "preferred" block size for efficient filesystem I/O. (Writing to a file in smaller chunks may cause an inefficient read-modify-rewrite.) > I suspect > userspace will want to work with optimal values, not ones which > could for instance incur read-modify-write. Yup, that's the very definition of what stx_blksize should contain. -Dave. -- Dave Chinner david@fromorbit.com