lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Mon, 28 Nov 2022 21:29:29 +0530 From: Manivannan Sadhasivam <mani@...nel.org> To: Asutosh Das <quic_asutoshd@...cinc.com> Cc: quic_cang@...cinc.com, martin.petersen@...cle.com, linux-scsi@...r.kernel.org, quic_nguyenb@...cinc.com, quic_xiaosenh@...cinc.com, stanley.chu@...iatek.com, eddie.huang@...iatek.com, daejun7.park@...sung.com, bvanassche@....org, avri.altman@....com, beanhuo@...ron.com, linux-arm-msm@...r.kernel.org, Alim Akhtar <alim.akhtar@...sung.com>, "James E.J. Bottomley" <jejb@...ux.ibm.com>, Jinyoung Choi <j-young.choi@...sung.com>, open list <linux-kernel@...r.kernel.org> Subject: Re: [PATCH v5 10/16] ufs: core: mcq: Use shared tags for MCQ mode On Tue, Nov 22, 2022 at 08:10:23PM -0800, Asutosh Das wrote: > Enable shared tags for MCQ. For UFS, this should > not have a huge performance impact. It however > simplifies the MCQ implementation and reuses most of > the existing code in the issue and completion path. > Also add multiple queue mapping to map_queue(). > > Co-developed-by: Can Guo <quic_cang@...cinc.com> > Signed-off-by: Can Guo <quic_cang@...cinc.com> > Signed-off-by: Asutosh Das <quic_asutoshd@...cinc.com> Reviewed-by: Manivannan Sadhasivam <mani@...nel.org> Thanks, Mani > Reviewed-by: Bart Van Assche <bvanassche@....org> > --- > drivers/ufs/core/ufs-mcq.c | 2 ++ > drivers/ufs/core/ufshcd.c | 28 ++++++++++++++++------------ > 2 files changed, 18 insertions(+), 12 deletions(-) > > diff --git a/drivers/ufs/core/ufs-mcq.c b/drivers/ufs/core/ufs-mcq.c > index ebecc47..e4ddb90 100644 > --- a/drivers/ufs/core/ufs-mcq.c > +++ b/drivers/ufs/core/ufs-mcq.c > @@ -376,6 +376,7 @@ void ufshcd_mcq_make_queues_operational(struct ufs_hba *hba) > > int ufshcd_mcq_init(struct ufs_hba *hba) > { > + struct Scsi_Host *host = hba->host; > struct ufs_hw_queue *hwq; > int ret, i; > > @@ -411,6 +412,7 @@ int ufshcd_mcq_init(struct ufs_hba *hba) > /* Give dev_cmd_queue the minimal number of entries */ > hba->dev_cmd_queue->max_entries = MAX_DEV_CMD_ENTRIES; > > + host->host_tagset = 1; > return 0; > } > > diff --git a/drivers/ufs/core/ufshcd.c b/drivers/ufs/core/ufshcd.c > index 042ecf04..d61e99f 100644 > --- a/drivers/ufs/core/ufshcd.c > +++ b/drivers/ufs/core/ufshcd.c > @@ -2763,24 +2763,28 @@ static inline bool is_device_wlun(struct scsi_device *sdev) > */ > static void ufshcd_map_queues(struct Scsi_Host *shost) > { > - int i; > + struct ufs_hba *hba = shost_priv(shost); > + int i, queue_offset = 0; > + > + if (!is_mcq_supported(hba)) { > + hba->nr_queues[HCTX_TYPE_DEFAULT] = 1; > + hba->nr_queues[HCTX_TYPE_READ] = 0; > + hba->nr_queues[HCTX_TYPE_POLL] = 1; > + hba->nr_hw_queues = 1; > + } > > for (i = 0; i < shost->nr_maps; i++) { > struct blk_mq_queue_map *map = &shost->tag_set.map[i]; > > - switch (i) { > - case HCTX_TYPE_DEFAULT: > - case HCTX_TYPE_POLL: > - map->nr_queues = 1; > - break; > - case HCTX_TYPE_READ: > - map->nr_queues = 0; > + map->nr_queues = hba->nr_queues[i]; > + if (!map->nr_queues) > continue; > - default: > - WARN_ON_ONCE(true); > - } > - map->queue_offset = 0; > + map->queue_offset = queue_offset; > + if (i == HCTX_TYPE_POLL && !is_mcq_supported(hba)) > + map->queue_offset = 0; > + > blk_mq_map_queues(map); > + queue_offset += map->nr_queues; > } > } > > -- > 2.7.4 > -- மணிவண்ணன் சதாசிவம்
Powered by blists - more mailing lists