All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bart Van Assche <bvanassche@acm.org>
To: Bean Huo <huobean@gmail.com>, Avri Altman <Avri.Altman@wdc.com>,
	"Martin K . Petersen" <martin.petersen@oracle.com>,
	quic_cang@quicinc.com
Cc: Jaegeuk Kim <jaegeuk@kernel.org>,
	Adrian Hunter <adrian.hunter@intel.com>,
	"linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>
Subject: Re: [PATCH 00/29] UFS patches for kernel v5.19
Date: Tue, 5 Apr 2022 07:22:41 -0700	[thread overview]
Message-ID: <ca7dff5d-ad32-fafe-d522-f455be04e2ef@acm.org> (raw)
In-Reply-To: <2eea6ffcd83233a93a8a7ebfc24a58516cd6e79a.camel@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1574 bytes --]

On 4/5/22 02:33, Bean Huo wrote:
> For performance improvement, according to my test, if we abandon SCSI
> command parsing, we can get 3%~5% performance improvement. Maybe this
> is little or no improvement? Yes, reliability issues outweigh this
> performance improvement. Error handling and UFS probes should also be
> rebuilt. But most importantly, it makes UFS more scalable. How do you
> think about adding an immature development driver to drever/staging
> first? name it driver/staging/lightweight-ufs?

I do not understand the interest in bypassing the SCSI core. The 
scsi_debug driver supports more than a million IOPS on a single CPU core 
(see also the attached script). I think this shows that the SCSI core is 
not a performance bottleneck. Additionally, I think it will take a while 
until UFS devices scale from the current performance level (100K IOPS?) 
to more than a million IOPS.

Please note that bypassing the SCSI core would make it much harder than 
necessary to introduce zoned storage support and also that this would 
lead to plenty of duplicated code.

>> For other SCSI LLDs the cost of
>> atomic operations and memory barriers in the LLD outweighs the cost
>> of
>> the operations in the SCSI core and sd drivers. I'm not sure whether
>> that's also the case for the UFS driver.
> 
> I didn't take this into account, maybe it's not a big deal, since the
> UFS driver might use its own lock/serialization lock.

Every single atomic operation in the hot path has a measurable 
performance impact. That includes locking operations.

Thanks,

Bart.

[-- Attachment #2: scsi_debug-iops --]
[-- Type: text/plain, Size: 947 bytes --]

#!/bin/bash

set -e

iodepth=${1:-1}
runtime=30
blocksize=512
numcpus=$(nproc)

modprobe -r scsi_debug
modprobe scsi_debug max_queue=128 submit_queues="$numcpus" delay=0 fake_rw=1 &&
    udevadm settle

DEVICE=$(find /sys/bus/pseudo/drivers/scsi_debug/adapter*/host*/target*/*/block/ -maxdepth 1 -type d | grep -v 'block/$' | head -1 | xargs basename) || exit $?
[ -n "$DEVICE" ] || exit $?

args=()
if [ "$iodepth" = 1 ]; then
	args+=(--ioengine=psync)
else
	args+=(--ioengine=io_uring --iodepth_batch=$((iodepth/2)) --hipri=1)
fi
args+=(
    --bs="${blocksize}"
    --direct=1
    --filename=/dev/"$DEVICE"
    --group_reporting=1
    --gtod_reduce=1
    --invalidate=1
    --iodepth="$iodepth"
    --ioscheduler=none
    --name=scsi_debug
    --numjobs=1
    --runtime="$runtime"
    --rw=read
    --thread
    --time_based=1
)
set -x
if numactl -m 0 -N 0 echo >&/dev/null; then
	numactl -m 0 -N 0 -- fio "${args[@]}"
else
	fio "${args[@]}"
fi

      reply	other threads:[~2022-04-06  1:05 UTC|newest]

Thread overview: 101+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-31 22:33 [PATCH 00/29] UFS patches for kernel v5.19 Bart Van Assche
2022-03-31 22:33 ` [PATCH 01/29] scsi: ufs: Declare ufshcd_wait_for_register() static Bart Van Assche
2022-04-01 18:33   ` Avri Altman
2022-04-03  9:45   ` Bean Huo
2022-03-31 22:33 ` [PATCH 02/29] scsi: ufs: Remove superfluous boolean conversions Bart Van Assche
2022-03-31 23:44   ` Bjorn Andersson
2022-04-03  3:20     ` Bart Van Assche
2022-04-01 18:35   ` Avri Altman
2022-03-31 22:33 ` [PATCH 03/29] scsi: ufs: Simplify statements that return a boolean Bart Van Assche
2022-03-31 23:45   ` Bjorn Andersson
2022-04-01 18:49   ` Avri Altman
2022-04-03  3:30     ` Bart Van Assche
2022-03-31 22:33 ` [PATCH 04/29] scsi: ufs: Remove ufshcd_lrb.sense_bufflen Bart Van Assche
2022-04-01 18:56   ` Avri Altman
2022-03-31 22:34 ` [PATCH 05/29] scsi: ufs: Remove ufshcd_lrb.sense_buffer Bart Van Assche
2022-04-01 19:21   ` Avri Altman
2022-04-03  4:26     ` Bart Van Assche
2022-03-31 22:34 ` [PATCH 06/29] scsi: ufs: Use get_unaligned_be16() instead of be16_to_cpup() Bart Van Assche
2022-04-03 11:20   ` Bean Huo
2022-03-31 22:34 ` [PATCH 07/29] scsi: ufs: Remove the UFS_FIX() and END_FIX() macros Bart Van Assche
2022-04-01 19:43   ` Avri Altman
2022-03-31 22:34 ` [PATCH 08/29] scsi: ufs: Rename struct ufs_dev_fix into ufs_dev_quirk Bart Van Assche
2022-04-01 19:47   ` Avri Altman
2022-04-04 21:15     ` Bart Van Assche
2022-03-31 22:34 ` [PATCH 09/29] scsi: ufs: Declare the quirks array const Bart Van Assche
2022-04-01 19:56   ` Avri Altman
2022-04-04 21:14     ` Bart Van Assche
2022-04-08 14:41       ` Krzysztof Kozlowski
2022-04-05  6:14   ` Avri Altman
2022-03-31 22:34 ` [PATCH 10/29] scsi: ufs: Invert the return value of ufshcd_is_hba_active() Bart Van Assche
2022-04-02  6:32   ` Avri Altman
2022-03-31 22:34 ` [PATCH 11/29] scsi: ufs: Remove unused constants and code Bart Van Assche
2022-04-02  6:59   ` Avri Altman
2022-04-04  2:07     ` Bart Van Assche
2022-04-05  6:55       ` Avri Altman
2022-04-07  2:33         ` Stanley Chu
2022-03-31 22:34 ` [PATCH 12/29] scsi: ufs: Switch to aggregate initialization Bart Van Assche
2022-04-02  7:07   ` Avri Altman
2022-03-31 22:34 ` [PATCH 13/29] scsi: ufs: Remove the LUN quiescing code from ufshcd_wl_shutdown() Bart Van Assche
2022-04-01  6:20   ` Adrian Hunter
2022-04-01 13:52     ` Bart Van Assche
2022-04-01 14:35       ` Adrian Hunter
2022-04-05 19:11         ` Bart Van Assche
2022-03-31 22:34 ` [PATCH 14/29] scsi: ufs: Make the config_scaling_param calls type safe Bart Van Assche
2022-03-31 23:48   ` Bjorn Andersson
2022-04-01  4:08     ` Bart Van Assche
2022-04-03  3:51       ` Bjorn Andersson
2022-03-31 22:34 ` [PATCH 15/29] scsi: ufs: Remove the driver version Bart Van Assche
2022-04-03  7:10   ` Avri Altman
2022-04-03 21:51     ` Bart Van Assche
2022-04-03 15:52   ` Bean Huo
2022-04-04  6:25   ` Avri Altman
2022-03-31 22:34 ` [PATCH 16/29] scsi: ufs: Rename sdev_ufs_device into ufs_device_wlun Bart Van Assche
2022-04-03  7:25   ` Avri Altman
2022-03-31 22:34 ` [PATCH 17/29] scsi: ufs: Use an SPDX license identifier in the Kconfig file Bart Van Assche
2022-03-31 22:34 ` [PATCH 18/29] scsi: ufs: Remove paths from source code comments Bart Van Assche
2022-04-03  7:33   ` Avri Altman
2022-03-31 22:34 ` [PATCH 19/29] scsi: ufs: Remove the TRUE and FALSE definitions Bart Van Assche
2022-04-01  2:19   ` Chanho Park
2022-04-04  2:39     ` Bart Van Assche
2022-03-31 22:34 ` [PATCH 20/29] scsi: ufs: Remove locking from around single register writes Bart Van Assche
2022-04-05  6:19   ` Avri Altman
2022-03-31 22:34 ` [PATCH 21/29] scsi: ufs: Introduce ufshcd_clkgate_delay_set() Bart Van Assche
2022-04-05  6:20   ` Avri Altman
2022-03-31 22:34 ` [PATCH 22/29] scsi: ufs: qcom: Fix ufs_qcom_resume() Bart Van Assche
2022-03-31 23:50   ` Bjorn Andersson
2022-03-31 22:34 ` [PATCH 23/29] scsi: ufs: Remove unnecessary ufshcd-crypto.h include directives Bart Van Assche
2022-03-31 22:34 ` [PATCH 24/29] scsi: ufs: Fix kernel-doc syntax in ufshcd.h Bart Van Assche
2022-04-05  6:27   ` Avri Altman
2022-03-31 22:34 ` [PATCH 25/29] scsi: ufs: Minimize #include directives Bart Van Assche
2022-04-01  6:53   ` Adrian Hunter
2022-04-01 13:52     ` Bart Van Assche
2022-03-31 22:34 ` [PATCH 26/29] scsi: ufs: Split the ufshcd.h header file Bart Van Assche
2022-04-01  0:21   ` Chanho Park
2022-04-01  4:14     ` Bart Van Assche
2022-04-01  4:30       ` Chanho Park
2022-04-05  6:39   ` Avri Altman
2022-04-05 14:10     ` Bart Van Assche
2022-03-31 22:34 ` [PATCH 27/29] scsi: ufs: Move the struct ufs_ref_clk definition Bart Van Assche
2022-04-05  6:50   ` Avri Altman
2022-03-31 22:34 ` [PATCH 28/29] scsi: ufs: Move the ufs_is_valid_unit_desc_lun() definition Bart Van Assche
2022-04-05  6:53   ` Avri Altman
2022-04-05 14:13     ` Bart Van Assche
2022-03-31 22:34 ` [PATCH 29/29] scsi: ufs: Split the drivers/scsi/ufs directory Bart Van Assche
2022-04-01  5:12   ` Christoph Hellwig
2022-04-01 13:56     ` Bart Van Assche
2022-04-01  6:38   ` Adrian Hunter
2022-04-01 13:58     ` Bart Van Assche
2022-04-01 17:03       ` Alim Akhtar
2022-04-02  3:21         ` Bart Van Assche
     [not found] ` <CGME20220331223522epcas2p4f8f20c2ec00dbc6d5a7bf855a1dd7395@epcms2p5>
2022-04-01  6:14   ` [PATCH 04/29] scsi: ufs: Remove ufshcd_lrb.sense_bufflen Keoseong Park
2022-04-01  9:28 ` [PATCH 00/29] UFS patches for kernel v5.19 Bean Huo
2022-04-01  9:32 ` Bean Huo
2022-04-01 14:12   ` Bart Van Assche
2022-04-03  5:59     ` Avri Altman
2022-04-03 21:36       ` Bean Huo
2022-04-03 21:54         ` Bart Van Assche
2022-04-04  8:12           ` Bean Huo
2022-04-04 21:13             ` Bart Van Assche
2022-04-05  9:33               ` Bean Huo
2022-04-05 14:22                 ` Bart Van Assche [this message]

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=ca7dff5d-ad32-fafe-d522-f455be04e2ef@acm.org \
    --to=bvanassche@acm.org \
    --cc=Avri.Altman@wdc.com \
    --cc=adrian.hunter@intel.com \
    --cc=huobean@gmail.com \
    --cc=jaegeuk@kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=quic_cang@quicinc.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.