From: Wang Jianchao <jianchao.wan9@gmail.com>
To: martin.petersen@oracle.com
Cc: jejb@linux.ibm.com, linux-scsi@vger.kernel.org
Subject: Discard performance regression after "scsi: sd: Remove LBPRZ dependency for discards"
Date: Tue, 6 Jul 2021 11:11:25 +0800 [thread overview]
Message-ID: <279cb008-4c92-0535-efdd-6e877bea7349@gmail.com> (raw)
Hi Martin
We have a sata ssd with following parameters,
max_ws_blocks = 0
max_unmap_blocks = 262143
lbprz = 1
lbpu = 1
unmap_limit_for_ws = 0
But the discard performance is very different on 3.10 and 4.18 series,
On 3.10 series, the bw of discard is ~60G/s, but on 4.18, it is only ~2.7G/s
The reason is the discard_max_bytes,
3.10 series : 4294966784
4.18 series : 134217216
This difference happen after commit
commit bcd069bb250acf6088b60d189ab3ec3ae8dd11a5 (scsi: sd: Remove LBPRZ dependency for discards)
@@ -2842,7 +2829,7 @@ static void sd_read_block_limits(struct scsi_disk *sdkp)
sd_config_discard(sdkp, SD_LBP_WS16);
} else { /* LBP VPD page tells us what to use */
- if (sdkp->lbpu && sdkp->max_unmap_blocks && !sdkp->lbprz)
+ if (sdkp->lbpu && sdkp->max_unmap_blocks)
sd_config_discard(sdkp, SD_LBP_UNMAP);
else if (sdkp->lbpws)
sd_config_discard(sdkp, SD_LBP_WS16);
Before this commit, it enters SD_LBP_WS16 case, but after the patch, it enters SD_LBP_UNMAP.
Which should be the correct case ?
Thanks and Best regards
Jianchao
next reply other threads:[~2021-07-06 3:11 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-06 3:11 Wang Jianchao [this message]
2021-07-08 3:23 ` Discard performance regression after "scsi: sd: Remove LBPRZ dependency for discards" Martin K. Petersen
2021-07-08 6:05 ` Wang Jianchao
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=279cb008-4c92-0535-efdd-6e877bea7349@gmail.com \
--to=jianchao.wan9@gmail.com \
--cc=jejb@linux.ibm.com \
--cc=linux-scsi@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