From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
To: Damien Le Moal <dlemoal@kernel.org>
Cc: Christoph Hellwig <hch@lst.de>, Jens Axboe <axboe@kernel.dk>,
linux-block@vger.kernel.org,
"Martin K . Petersen" <martin.petersen@oracle.com>
Subject: Re: [PATCH v2] block: Increase BLK_DEF_MAX_SECTORS_CAP
Date: Wed, 27 Aug 2025 10:42:48 +0200 [thread overview]
Message-ID: <20250827084248.tLS5-C5i@linutronix.de> (raw)
In-Reply-To: <39ac5089-794c-4e50-a090-6dabf4a60575@kernel.org>
On 2025-08-27 17:01:49 [+0900], Damien Le Moal wrote:
> Don't read a file. Read the disk directly. So please use "if=/dev/sdX".
> Also, there is no way that a 1GiB I/O will be done as a single large command.
> That is not going to happen.
>
> With 345c5091ffec reverted, what does:
>
> cat /sys/block/sdX/queue/max_sectors_kb
> cat /sys/block/sdX/queue/max_hw_sectors_kb
>
> say ?
| # cat /sys/block/sda/queue/max_sectors_kb
| 1280
| # cat /sys/block/sda/queue/max_hw_sectors_kb
| 32767
> Likely, the first one is "1280". So before running dd, you need to do:
>
> echo 4096 > /sys/block/sdX/queue/max_sectors_kb
>
> and then
>
> dd if=/dev/sdX of=/dev/null bs=4M count=1 iflag=direct
| # echo 4096 > /sys/block/sda/queue/max_sectors_kb
| # cat /sys/block/sda/queue/max_sectors_kb
| 4096
| # dd if=/dev/sda of=/dev/null bs=4M count=1 iflag=direct
| 1+0 records in
| 1+0 records out
| 4194304 bytes (4.2 MB, 4.0 MiB) copied, 0.00966543 s, 434 MB/s
It passed.
After a reboot I issued the same dd command five times and all came
back. Then I increased the sector size and issued it again. The first
two came back and then
| root@zen3:~# dd if=/dev/sda of=/dev/null bs=4M count=1 iflag=direct
| 1+0 records in
| 1+0 records out
| 4194304 bytes (4.2 MB, 4.0 MiB) copied, 33.1699 s, 126 kB/s
| root@zen3:~# dd if=/dev/sda of=/dev/null bs=4M count=1 iflag=direct
| 1+0 records in
| 1+0 records out
| 4194304 bytes (4.2 MB, 4.0 MiB) copied, 57.3711 s, 73.1 kB/s
| root@zen3:~# dd if=/dev/sda of=/dev/null bs=4M count=1 iflag=direct
| 1+0 records in
| 1+0 records out
| 4194304 bytes (4.2 MB, 4.0 MiB) copied, 0.0264171 s, 159 MB/s
They all came back but as you see on the speed side, it took while. And
I see
| [ 191.641315] ata1.00: exception Emask 0x0 SAct 0x800000 SErr 0x0 action 0x6 frozen
| [ 191.648839] ata1.00: failed command: READ FPDMA QUEUED
| [ 191.653995] ata1.00: cmd 60/00:b8:00:00:00/20:00:00:00:00/40 tag 23 ncq dma 4194304 in
| res 40/00:00:00:00:00/00:00:00:00:00/00 Emask 0x4 (timeout)
| [ 191.669306] ata1.00: status: { DRDY }
| [ 191.672981] ata1: hard resetting link
| [ 192.702763] ata1: SATA link up 6.0 Gbps (SStatus 133 SControl 300)
| [ 192.702964] ata1.00: Security Log not supported
| [ 192.703207] ata1.00: Security Log not supported
| [ 192.703215] ata1.00: configured for UDMA/133
| [ 192.703282] ata1: EH complete
| [ 248.985303] ata1.00: exception Emask 0x0 SAct 0x10001 SErr 0x0 action 0x6 frozen
| [ 248.992733] ata1.00: failed command: READ FPDMA QUEUED
| [ 248.997889] ata1.00: cmd 60/00:00:00:00:00/20:00:00:00:00/40 tag 0 ncq dma 4194304 in
| res 40/00:00:00:00:00/00:00:00:00:00/00 Emask 0x4 (timeout)
| [ 249.013107] ata1.00: status: { DRDY }
| [ 249.016775] ata1.00: failed command: WRITE FPDMA QUEUED
| [ 249.022011] ata1.00: cmd 61/08:80:40:d1:18/00:00:00:00:00/40 tag 16 ncq dma 4096 out
| res 40/00:00:00:00:00/00:00:00:00:00/00 Emask 0x4 (timeout)
| [ 249.037135] ata1.00: status: { DRDY }
| [ 249.040802] ata1: hard resetting link
| [ 250.076059] ata1: SATA link up 6.0 Gbps (SStatus 133 SControl 300)
| [ 250.076258] ata1.00: Security Log not supported
| [ 250.076471] ata1.00: Security Log not supported
| [ 250.076478] ata1.00: configured for UDMA/133
| [ 250.076537] ata1: EH complete
> And you will likely trigger the issue, even with 345c5091ffec reverted.
> The issue is likely caused by a FW bug handling large commands.
> Please try.
Done. It seems the firmware is not always dedicated to fulfill larger
requests.
Sebastian
next prev parent reply other threads:[~2025-08-27 8:42 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-18 6:00 [PATCH v2] block: Increase BLK_DEF_MAX_SECTORS_CAP Damien Le Moal
2025-06-18 6:17 ` Hannes Reinecke
2025-06-18 8:51 ` Johannes Thumshirn
2025-06-18 9:06 ` John Garry
2025-06-18 9:47 ` Damien Le Moal
2025-06-18 10:19 ` Martin K. Petersen
2025-06-23 13:40 ` Christoph Hellwig
2025-06-24 16:49 ` Jens Axboe
2025-08-27 7:07 ` Sebastian Andrzej Siewior
2025-08-27 7:38 ` Christoph Hellwig
2025-08-27 7:52 ` Sebastian Andrzej Siewior
2025-08-27 8:00 ` Christoph Hellwig
2025-08-27 8:03 ` Damien Le Moal
2025-08-27 8:01 ` Damien Le Moal
2025-08-27 8:42 ` Sebastian Andrzej Siewior [this message]
2025-08-27 9:01 ` Damien Le Moal
2025-08-27 10:16 ` Sebastian Andrzej Siewior
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=20250827084248.tLS5-C5i@linutronix.de \
--to=bigeasy@linutronix.de \
--cc=axboe@kernel.dk \
--cc=dlemoal@kernel.org \
--cc=hch@lst.de \
--cc=linux-block@vger.kernel.org \
--cc=martin.petersen@oracle.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