Re: [PATCH 02/12] block: take io_opt and io_min into account for max_sectors
- To: Christoph Hellwig <hch@lst.de>
- Cc: Jens Axboe <axboe@kernel.dk>, "Martin K. Petersen" <martin.petersen@oracle.com>, Richard Weinberger <richard@nod.at>, Anton Ivanov <anton.ivanov@cambridgegreys.com>, Johannes Berg <johannes@sipsolutions.net>, Josef Bacik <josef@toxicpanda.com>, Dongsheng Yang <dongsheng.yang@easystack.cn>, "Roger Pau Monn??" <roger.pau@citrix.com>, linux-um@lists.infradead.org, linux-block@vger.kernel.org, nbd@other.debian.org, ceph-devel@vger.kernel.org, xen-devel@lists.xenproject.org, linux-scsi@vger.kernel.org
- Subject: Re: [PATCH 02/12] block: take io_opt and io_min into account for max_sectors
- From: Ilya Dryomov <idryomov@gmail.com>
- Date: Fri, 31 May 2024 08:48:12 +0200
- Message-id: <[🔎] CAOi1vP-VXeOH-kShRKv-b=id1zN9tLiqOo8EKpOWoJuQp_Pm1g@mail.gmail.com>
- In-reply-to: <[🔎] 20240531055456.GC17396@lst.de>
- References: <[🔎] 20240529050507.1392041-1-hch@lst.de> <[🔎] 20240529050507.1392041-3-hch@lst.de> <[🔎] CAOi1vP-F0FO4WTnrEt7FC-uu2C8NTbejvJQQGdZqT475c2G1jA@mail.gmail.com> <[🔎] 20240531055456.GC17396@lst.de>
On Fri, May 31, 2024 at 7:54 AM Christoph Hellwig <hch@lst.de> wrote:
>
> On Thu, May 30, 2024 at 09:48:06PM +0200, Ilya Dryomov wrote:
> > For rbd, this change effectively lowers max_sectors from 4M to 64K or
> > less and that is definitely not desirable. From previous interactions
> > with users we want max_sectors to match max_hw_sectors -- this has come
> > up a quite a few times over the years. Some people just aren't aware
> > of the soft cap and the fact that it's adjustable and get frustrated
> > over the time poured into debugging their iostat numbers for workloads
> > that can send object (set) size I/Os.
> >
> > Looking at the git history, we lowered io_opt from objset_bytes to
> > opts->alloc_size in commit [1], but I guess io_opt was lowered just
> > along for the ride. What that commit was concerned with is really
> > discard_granularity and to a smaller extent io_min.
> >
> > How much difference does io_opt make in the real world? If what rbd
> > does stands in the way of a tree-wide cleanup, I would much rather bump
> > io_opt back to objset_bytes (i.e. what max_user_sectors is currently
> > set to).
>
> The only existing in-kernel usage is to set the readahead size.
> Based on your comments I seems like we should revert io_opt to
> objset to ->alloc_size in a prep patch?
We should revert io_opt from opts->alloc_size to objset_bytes (I think
it's what you meant to say but typoed).
How do you want to handle it? I can put together a patch, send it to
ceph-devel and it will be picked by linux-next sometime next week. Then
this patch would grow a contextual conflict and the description would
need to be updated to not mention a behavior change for rbd anymore.
Thanks,
Ilya
Reply to: