All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ming Lei <ming.lei@redhat.com>
To: Hannes Reinecke <hare@suse.de>
Cc: Jens Axboe <axboe@kernel.dk>,
	linux-block@vger.kernel.org, Yi Zhang <yi.zhang@redhat.com>,
	Luis Chamberlain <mcgrof@kernel.org>,
	John Garry <john.g.garry@oracle.com>,
	Bart Van Assche <bvanassche@acm.org>,
	Keith Busch <kbusch@kernel.org>
Subject: Re: [PATCH V2] block: make segment size limit workable for > 4K PAGE_SIZE
Date: Mon, 10 Feb 2025 21:26:09 +0800	[thread overview]
Message-ID: <Z6n-cbpvEerzNlAr@fedora> (raw)
In-Reply-To: <51da6bf9-4226-467d-87c1-e6ec785b1c06@suse.de>

On Mon, Feb 10, 2025 at 01:14:00PM +0100, Hannes Reinecke wrote:
> On 2/10/25 10:03, Ming Lei wrote:
> > PAGE_SIZE is applied in some block device queue limits, this way is
> > very fragile and is wrong:
> > 
> > - queue limits are read from hardware, which is often one readonly
> > hardware property
> > 
> > - PAGE_SIZE is one config option which can be changed during build time.
> > 
> > In RH lab, it has been found that max segment size of some mmc card is
> > less than 64K, then this kind of card can't work in case of 64K PAGE_SIZE.
> > 
> So why isn't this reflected in the blk_min_segment settings?
> Or, rather, why isn't setting blk_min_segment not enough?

There isn't min_segment_size setting, at block layer takes PAGE_SIZE
as the actual min_segment_size.

> 
> > Fix this issue by using BLK_MIN_SEGMENT_SIZE in related code for dealing
> > with queue limits and checking if bio needn't split. Define BLK_MIN_SEGMENT_SIZE
> > as 4K(minimized PAGE_SIZE).
> > 
> But why 4k then? That is a value like anything else, and what is the
> rationale to use that instead of the more natural sector size?

The comment explains it already: 4K = min(PAGE_SIZE).


Thanks,
Ming


  reply	other threads:[~2025-02-10 13:26 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-10  9:03 [PATCH V2] block: make segment size limit workable for > 4K PAGE_SIZE Ming Lei
2025-02-10 12:14 ` Hannes Reinecke
2025-02-10 13:26   ` Ming Lei [this message]
2025-02-10 20:17 ` Luis Chamberlain
2025-02-11  2:10   ` Ming Lei
2025-02-13  7:34     ` Daniel Gomez
2025-02-13  8:02       ` Ming Lei
2025-02-13  8:30         ` Christoph Hellwig
2025-02-13  8:51           ` Ming Lei
2025-02-13 14:18             ` Daniel Gomez
2025-02-14  1:37               ` Ming Lei
2025-02-13  8:33 ` Christoph Hellwig
2025-02-13  8:45 ` John Garry
2025-02-13  9:58   ` Ming Lei
2025-02-13 10:23     ` John Garry
2025-02-13 10:35       ` Ming Lei
2025-02-13 11:12         ` John Garry
2025-02-13 11:33           ` Ming Lei
2025-02-13 11:41             ` John Garry
2025-02-14  9:38 ` Daniel Gomez
2025-02-14 11:19   ` Ming Lei
2025-02-14 12:28     ` Daniel Gomez
2025-02-14 12:51       ` Ming Lei

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Z6n-cbpvEerzNlAr@fedora \
    --to=ming.lei@redhat.com \
    --cc=axboe@kernel.dk \
    --cc=bvanassche@acm.org \
    --cc=hare@suse.de \
    --cc=john.g.garry@oracle.com \
    --cc=kbusch@kernel.org \
    --cc=linux-block@vger.kernel.org \
    --cc=mcgrof@kernel.org \
    --cc=yi.zhang@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.