All of lore.kernel.org
 help / color / mirror / Atom feed
From: Avri Altman <Avri.Altman@wdc.com>
To: "Asutosh Das (asd)" <asutoshd@codeaurora.org>,
	Bart Van Assche <bvanassche@acm.org>,
	Can Guo <cang@codeaurora.org>,
	"nguyenb@codeaurora.org" <nguyenb@codeaurora.org>,
	"hongwus@codeaurora.org" <hongwus@codeaurora.org>,
	"linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
	"kernel-team@android.com" <kernel-team@android.com>
Cc: Stanley Chu <stanley.chu@mediatek.com>,
	Alim Akhtar <alim.akhtar@samsung.com>,
	"James E.J. Bottomley" <jejb@linux.ibm.com>,
	"Martin K. Petersen" <martin.petersen@oracle.com>,
	Matthias Brugger <matthias.bgg@gmail.com>,
	Bean Huo <beanhuo@micron.com>, Jaegeuk Kim <jaegeuk@kernel.org>,
	Adrian Hunter <adrian.hunter@intel.com>,
	Kiwoong Kim <kwmad.kim@samsung.com>,
	Satya Tangirala <satyat@google.com>,
	open list <linux-kernel@vger.kernel.org>,
	"moderated list:ARM/Mediatek SoC support" 
	<linux-arm-kernel@lists.infradead.org>,
	"moderated list:ARM/Mediatek SoC support" 
	<linux-mediatek@lists.infradead.org>
Subject: RE: [PATCH v1 2/3] scsi: ufs: Optimize host lock on transfer requests send/compl paths
Date: Tue, 25 May 2021 08:24:30 +0000	[thread overview]
Message-ID: <DM6PR04MB65752DD2F442C178B2D0233AFC259@DM6PR04MB6575.namprd04.prod.outlook.com> (raw)
In-Reply-To: <d4ff8e1a-f368-6720-798a-a2a31a4d41fb@codeaurora.org>

> On 5/24/2021 1:10 PM, Bart Van Assche wrote:
> > On 5/24/21 1:36 AM, Can Guo wrote:
> >> Current UFS IRQ handler is completely wrapped by host lock, and because
> >> ufshcd_send_command() is also protected by host lock, when IRQ handler
> >> fires, not only the CPU running the IRQ handler cannot send new
> requests,
> >> the rest CPUs can neither. Move the host lock wrapping the IRQ handler
> into
> >> specific branches, i.e., ufshcd_uic_cmd_compl(), ufshcd_check_errors(),
> >> ufshcd_tmc_handler() and ufshcd_transfer_req_compl(). Meanwhile, to
> further
> >> reduce occpuation of host lock in ufshcd_transfer_req_compl(), host lock
> is
> >> no longer required to call __ufshcd_transfer_req_compl(). As per test, the
> >> optimization can bring considerable gain to random read/write
> performance.
> >
> 
> > An additional question is whether it is necessary for v3.0 UFS devices
> > to serialize the submission path against the completion path? Multiple
> > high-performance SCSI LLDs support hardware with separate submission
> and
> > completion queues and hence do not need any serialization between the
> > submission and the completion path. I'm asking this because it is likely
> > that sooner or later multiqueue support will be added in the UFS
> > specification. Benefiting from multiqueue support will require to rework
> > locking in the UFS driver anyway.
> >
> Hi Bart,
> No it's not necessary to serialize both the paths. I think this series
> attempts to remove this serialization to a certain degree, which is
> what's giving the performance improvement.
> 
> Even if multiqueue support would be available in the future, I think
> this change is apt now for the current available specification.
I agree - this looks like the harbinger of a major change,
And going further with respect of hw queues,
will need the spec support - e.g. doorbell per lane, etc.

Thanks,
Avri
 
> > Thanks,
> >
> > Bart.
> >
> 
> 
> Thanks,
> -asd
> 
> --
> The Qualcomm Innovation Center, Inc. is a member of the Code Aurora
> Forum,
> Linux Foundation Collaborative Project

WARNING: multiple messages have this Message-ID (diff)
From: Avri Altman <Avri.Altman@wdc.com>
To: "Asutosh Das (asd)" <asutoshd@codeaurora.org>,
	Bart Van Assche <bvanassche@acm.org>,
	Can Guo <cang@codeaurora.org>,
	"nguyenb@codeaurora.org" <nguyenb@codeaurora.org>,
	"hongwus@codeaurora.org" <hongwus@codeaurora.org>,
	"linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
	"kernel-team@android.com" <kernel-team@android.com>
Cc: Stanley Chu <stanley.chu@mediatek.com>,
	Alim Akhtar <alim.akhtar@samsung.com>,
	"James E.J. Bottomley" <jejb@linux.ibm.com>,
	"Martin K. Petersen" <martin.petersen@oracle.com>,
	Matthias Brugger <matthias.bgg@gmail.com>,
	Bean Huo <beanhuo@micron.com>, Jaegeuk Kim <jaegeuk@kernel.org>,
	Adrian Hunter <adrian.hunter@intel.com>,
	Kiwoong Kim <kwmad.kim@samsung.com>,
	Satya Tangirala <satyat@google.com>,
	open list <linux-kernel@vger.kernel.org>,
	"moderated list:ARM/Mediatek SoC support"
	<linux-arm-kernel@lists.infradead.org>,
	"moderated list:ARM/Mediatek SoC support"
	<linux-mediatek@lists.infradead.org>
Subject: RE: [PATCH v1 2/3] scsi: ufs: Optimize host lock on transfer requests send/compl paths
Date: Tue, 25 May 2021 08:24:30 +0000	[thread overview]
Message-ID: <DM6PR04MB65752DD2F442C178B2D0233AFC259@DM6PR04MB6575.namprd04.prod.outlook.com> (raw)
In-Reply-To: <d4ff8e1a-f368-6720-798a-a2a31a4d41fb@codeaurora.org>

> On 5/24/2021 1:10 PM, Bart Van Assche wrote:
> > On 5/24/21 1:36 AM, Can Guo wrote:
> >> Current UFS IRQ handler is completely wrapped by host lock, and because
> >> ufshcd_send_command() is also protected by host lock, when IRQ handler
> >> fires, not only the CPU running the IRQ handler cannot send new
> requests,
> >> the rest CPUs can neither. Move the host lock wrapping the IRQ handler
> into
> >> specific branches, i.e., ufshcd_uic_cmd_compl(), ufshcd_check_errors(),
> >> ufshcd_tmc_handler() and ufshcd_transfer_req_compl(). Meanwhile, to
> further
> >> reduce occpuation of host lock in ufshcd_transfer_req_compl(), host lock
> is
> >> no longer required to call __ufshcd_transfer_req_compl(). As per test, the
> >> optimization can bring considerable gain to random read/write
> performance.
> >
> 
> > An additional question is whether it is necessary for v3.0 UFS devices
> > to serialize the submission path against the completion path? Multiple
> > high-performance SCSI LLDs support hardware with separate submission
> and
> > completion queues and hence do not need any serialization between the
> > submission and the completion path. I'm asking this because it is likely
> > that sooner or later multiqueue support will be added in the UFS
> > specification. Benefiting from multiqueue support will require to rework
> > locking in the UFS driver anyway.
> >
> Hi Bart,
> No it's not necessary to serialize both the paths. I think this series
> attempts to remove this serialization to a certain degree, which is
> what's giving the performance improvement.
> 
> Even if multiqueue support would be available in the future, I think
> this change is apt now for the current available specification.
I agree - this looks like the harbinger of a major change,
And going further with respect of hw queues,
will need the spec support - e.g. doorbell per lane, etc.

Thanks,
Avri
 
> > Thanks,
> >
> > Bart.
> >
> 
> 
> Thanks,
> -asd
> 
> --
> The Qualcomm Innovation Center, Inc. is a member of the Code Aurora
> Forum,
> Linux Foundation Collaborative Project
_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

WARNING: multiple messages have this Message-ID (diff)
From: Avri Altman <Avri.Altman@wdc.com>
To: "Asutosh Das (asd)" <asutoshd@codeaurora.org>,
	Bart Van Assche <bvanassche@acm.org>,
	Can Guo <cang@codeaurora.org>,
	"nguyenb@codeaurora.org" <nguyenb@codeaurora.org>,
	"hongwus@codeaurora.org" <hongwus@codeaurora.org>,
	"linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
	"kernel-team@android.com" <kernel-team@android.com>
Cc: Stanley Chu <stanley.chu@mediatek.com>,
	Alim Akhtar <alim.akhtar@samsung.com>,
	"James E.J. Bottomley" <jejb@linux.ibm.com>,
	"Martin K. Petersen" <martin.petersen@oracle.com>,
	Matthias Brugger <matthias.bgg@gmail.com>,
	Bean Huo <beanhuo@micron.com>, Jaegeuk Kim <jaegeuk@kernel.org>,
	Adrian Hunter <adrian.hunter@intel.com>,
	Kiwoong Kim <kwmad.kim@samsung.com>,
	Satya Tangirala <satyat@google.com>,
	open list <linux-kernel@vger.kernel.org>,
	"moderated list:ARM/Mediatek SoC support"
	<linux-arm-kernel@lists.infradead.org>,
	"moderated list:ARM/Mediatek SoC support"
	<linux-mediatek@lists.infradead.org>
Subject: RE: [PATCH v1 2/3] scsi: ufs: Optimize host lock on transfer requests send/compl paths
Date: Tue, 25 May 2021 08:24:30 +0000	[thread overview]
Message-ID: <DM6PR04MB65752DD2F442C178B2D0233AFC259@DM6PR04MB6575.namprd04.prod.outlook.com> (raw)
In-Reply-To: <d4ff8e1a-f368-6720-798a-a2a31a4d41fb@codeaurora.org>

> On 5/24/2021 1:10 PM, Bart Van Assche wrote:
> > On 5/24/21 1:36 AM, Can Guo wrote:
> >> Current UFS IRQ handler is completely wrapped by host lock, and because
> >> ufshcd_send_command() is also protected by host lock, when IRQ handler
> >> fires, not only the CPU running the IRQ handler cannot send new
> requests,
> >> the rest CPUs can neither. Move the host lock wrapping the IRQ handler
> into
> >> specific branches, i.e., ufshcd_uic_cmd_compl(), ufshcd_check_errors(),
> >> ufshcd_tmc_handler() and ufshcd_transfer_req_compl(). Meanwhile, to
> further
> >> reduce occpuation of host lock in ufshcd_transfer_req_compl(), host lock
> is
> >> no longer required to call __ufshcd_transfer_req_compl(). As per test, the
> >> optimization can bring considerable gain to random read/write
> performance.
> >
> 
> > An additional question is whether it is necessary for v3.0 UFS devices
> > to serialize the submission path against the completion path? Multiple
> > high-performance SCSI LLDs support hardware with separate submission
> and
> > completion queues and hence do not need any serialization between the
> > submission and the completion path. I'm asking this because it is likely
> > that sooner or later multiqueue support will be added in the UFS
> > specification. Benefiting from multiqueue support will require to rework
> > locking in the UFS driver anyway.
> >
> Hi Bart,
> No it's not necessary to serialize both the paths. I think this series
> attempts to remove this serialization to a certain degree, which is
> what's giving the performance improvement.
> 
> Even if multiqueue support would be available in the future, I think
> this change is apt now for the current available specification.
I agree - this looks like the harbinger of a major change,
And going further with respect of hw queues,
will need the spec support - e.g. doorbell per lane, etc.

Thanks,
Avri
 
> > Thanks,
> >
> > Bart.
> >
> 
> 
> Thanks,
> -asd
> 
> --
> The Qualcomm Innovation Center, Inc. is a member of the Code Aurora
> Forum,
> Linux Foundation Collaborative Project
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2021-05-25  8:25 UTC|newest]

Thread overview: 68+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-24  8:36 [PATCH v1 0/3] Optimize host lock on TR send/compl paths and utilize UTRLCNR Can Guo
2021-05-24  8:36 ` [PATCH v1 1/3] scsi: ufs: Remove a redundant command completion logic in error handler Can Guo
2021-05-24 16:43   ` Bart Van Assche
2021-05-25  4:15   ` Stanley Chu
2021-05-31  7:14   ` Bean Huo
2021-05-24  8:36 ` [PATCH v1 2/3] scsi: ufs: Optimize host lock on transfer requests send/compl paths Can Guo
2021-05-24  8:36   ` Can Guo
2021-05-24  8:36   ` Can Guo
2021-05-24 11:25   ` kernel test robot
2021-05-24 11:25     ` kernel test robot
2021-06-08 17:53     ` Nathan Chancellor
2021-06-08 17:53       ` Nathan Chancellor
2021-06-09  1:01       ` Can Guo
2021-06-09  1:01         ` Can Guo
2021-05-24 20:10   ` Bart Van Assche
2021-05-24 20:10     ` Bart Van Assche
2021-05-24 20:10     ` Bart Van Assche
2021-05-25  1:34     ` Asutosh Das (asd)
2021-05-25  1:34       ` Asutosh Das (asd)
2021-05-25  8:24       ` Avri Altman [this message]
2021-05-25  8:24         ` Avri Altman
2021-05-25  8:24         ` Avri Altman
2021-05-28  7:30         ` Avri Altman
2021-05-28  7:30           ` Avri Altman
2021-05-28  7:30           ` Avri Altman
2021-06-02 21:18           ` Asutosh Das (asd)
2021-06-02 21:18             ` Asutosh Das (asd)
2021-05-25  1:40     ` Can Guo
2021-05-25  1:40       ` Can Guo
2021-05-25 16:40       ` Bart Van Assche
2021-05-25 16:40         ` Bart Van Assche
2021-05-25 16:40         ` Bart Van Assche
2021-05-31 16:04   ` Bean Huo
2021-05-31 16:04     ` Bean Huo
2021-05-31 16:04     ` Bean Huo
2021-06-02  2:14     ` Can Guo
2021-06-02  2:14       ` Can Guo
2021-06-03  0:18     ` Bart Van Assche
2021-06-03  0:18       ` Bart Van Assche
2021-06-03  0:18       ` Bart Van Assche
2021-06-03  2:54   ` Stanley Chu
2021-06-03  2:54     ` Stanley Chu
2021-06-03  2:54     ` Stanley Chu
2021-06-04  1:49     ` Can Guo
2021-06-04  1:49       ` Can Guo
2021-06-17  2:49   ` Bart Van Assche
2021-06-17  2:49     ` Bart Van Assche
2021-06-17  2:49     ` Bart Van Assche
2021-06-23  2:04     ` Can Guo
2021-06-23  2:04       ` Can Guo
2021-06-28 22:58   ` Bart Van Assche
2021-06-28 22:58     ` Bart Van Assche
2021-06-28 22:58     ` Bart Van Assche
2021-06-29  5:41     ` Can Guo
2021-06-29  5:41       ` Can Guo
2021-07-01 15:57       ` Bart Van Assche
2021-07-01 15:57         ` Bart Van Assche
2021-07-01 15:57         ` Bart Van Assche
2021-05-24  8:36 ` [PATCH v1 3/3] scsi: ufs: Utilize Transfer Request List Completion Notification Register Can Guo
2021-05-24  8:36   ` Can Guo
2021-05-24  8:36   ` Can Guo
2021-05-31 16:05   ` Bean Huo
2021-05-31 16:05     ` Bean Huo
2021-05-31 16:05     ` Bean Huo
2021-06-03  2:54   ` Stanley Chu
2021-06-03  2:54     ` Stanley Chu
2021-06-03  2:54     ` Stanley Chu
2021-06-16  3:48 ` [PATCH v1 0/3] Optimize host lock on TR send/compl paths and utilize UTRLCNR Martin K. Petersen

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=DM6PR04MB65752DD2F442C178B2D0233AFC259@DM6PR04MB6575.namprd04.prod.outlook.com \
    --to=avri.altman@wdc.com \
    --cc=adrian.hunter@intel.com \
    --cc=alim.akhtar@samsung.com \
    --cc=asutoshd@codeaurora.org \
    --cc=beanhuo@micron.com \
    --cc=bvanassche@acm.org \
    --cc=cang@codeaurora.org \
    --cc=hongwus@codeaurora.org \
    --cc=jaegeuk@kernel.org \
    --cc=jejb@linux.ibm.com \
    --cc=kernel-team@android.com \
    --cc=kwmad.kim@samsung.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=matthias.bgg@gmail.com \
    --cc=nguyenb@codeaurora.org \
    --cc=satyat@google.com \
    --cc=stanley.chu@mediatek.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.