From: Bart Van Assche <bvanassche@acm.org>
To: Jens Axboe <axboe@kernel.dk>
Cc: linux-block@vger.kernel.org, Christoph Hellwig <hch@lst.de>,
Damien Le Moal <dlemoal@kernel.org>,
Bart Van Assche <bvanassche@acm.org>,
Ming Lei <ming.lei@redhat.com>
Subject: [PATCH 1/2] block: Reduce BLK_MIN_SEGMENT_SIZE
Date: Mon, 23 Mar 2026 13:29:01 -0700 [thread overview]
Message-ID: <20260323202904.1248169-2-bvanassche@acm.org> (raw)
In-Reply-To: <20260323202904.1248169-1-bvanassche@acm.org>
The current value of BLK_MIN_SEGMENT_SIZE, 4096 bytes, makes it
impossible to test small DMA segment size support on systems with a
virtual memory page size of 4096 bytes. Hence reduce
BLK_MIN_SEGMENT_SIZE to 512. There is nothing special about this value -
any other value that is a divisor of 4096 and that doesn't cause
lim->max_segments to be exceeded would also work.
Cc: Ming Lei <ming.lei@redhat.com>
Cc: Christoph Hellwig <hch@lst.de>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
---
block/blk.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/block/blk.h b/block/blk.h
index 7082dd5a87f9..7c792c012b0d 100644
--- a/block/blk.h
+++ b/block/blk.h
@@ -23,7 +23,7 @@ struct elv_change_ctx;
#define BLK_DEF_MAX_SECTORS_CAP (SZ_4M >> SECTOR_SHIFT)
#define BLK_DEV_MAX_SECTORS (LLONG_MAX >> 9)
-#define BLK_MIN_SEGMENT_SIZE 4096
+#define BLK_MIN_SEGMENT_SIZE 512
/* Max future timer expiry for timeouts */
#define BLK_MAX_TIMEOUT (5 * HZ)
next prev parent reply other threads:[~2026-03-23 20:29 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-23 20:29 [PATCH 0/2] Enable testing small DMA segment sizes Bart Van Assche
2026-03-23 20:29 ` Bart Van Assche [this message]
2026-03-23 20:29 ` [PATCH 2/2] null_blk: Support configuring the maximum segment size Bart Van Assche
2026-03-24 20:10 ` Damien Le Moal
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=20260323202904.1248169-2-bvanassche@acm.org \
--to=bvanassche@acm.org \
--cc=axboe@kernel.dk \
--cc=dlemoal@kernel.org \
--cc=hch@lst.de \
--cc=linux-block@vger.kernel.org \
--cc=ming.lei@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox