[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <a86e1dbd34f1db87caf1fb957aeb747b57ded3e9.camel@mediatek.com>
Date: Tue, 8 Oct 2024 23:47:25 +0000
From: Ed Tsai (蔡宗軒) <Ed.Tsai@...iatek.com>
To: Peter Wang (王信友) <peter.wang@...iatek.com>,
"avri.altman@....com" <avri.altman@....com>, "bvanassche@....org"
<bvanassche@....org>, "martin.petersen@...cle.com"
<martin.petersen@...cle.com>, "alim.akhtar@...sung.com"
<alim.akhtar@...sung.com>, "chu.stanley@...il.com" <chu.stanley@...il.com>,
"James.Bottomley@...senPartnership.com"
<James.Bottomley@...senPartnership.com>, "matthias.bgg@...il.com"
<matthias.bgg@...il.com>, AngeloGioacchino Del Regno
<angelogioacchino.delregno@...labora.com>
CC: "linux-scsi@...r.kernel.org" <linux-scsi@...r.kernel.org>, wsd_upstream
<wsd_upstream@...iatek.com>, "linux-kernel@...r.kernel.org"
<linux-kernel@...r.kernel.org>, "linux-mediatek@...ts.infradead.org"
<linux-mediatek@...ts.infradead.org>,
Chun-Hung Wu (巫駿宏) <Chun-hung.Wu@...iatek.com>,
"linux-arm-kernel@...ts.infradead.org" <linux-arm-kernel@...ts.infradead.org>
Subject: Re: [PATCH] scsi: ufs: ufs-mediatek: configure individual LU queue
flags
On Tue, 2024-10-08 at 10:38 -0700, Bart Van Assche wrote:
> On 10/7/24 11:59 PM, ed.tsai@...iatek.com wrote:
> > +static void ufs_mtk_config_scsi_dev(struct scsi_device *sdev)
> > +{
> > +struct ufs_hba *hba = shost_priv(sdev->host);
> > +
> > +dev_dbg(hba->dev, "lu %llu scsi device configured", sdev->lun);
> > +if (sdev->lun == 2)
> > +blk_queue_flag_set(QUEUE_FLAG_SAME_FORCE, sdev->reqeust_queue);
> > +}
>
> There are no block drivers in the upstream kernel that set
> QUEUE_FLAG_SAME_FORCE. An explanation is missing from the patch
> description why this flag is set from the UFS driver instead of by
> writing the value "2" into /sys/class/block/$bdev/queue/rq_affinity.
The LU probing is completed asynchronously by another thread, which
means that "sdc" cannot be guaranteed to be LU2. We do not need to
change the queue settings at runtime. Therefore, a simpler and more
intuitive approach is to set its flag once the SCSI device is confirmed
to be ready.
> Additionally, an explanation is missing why QUEUE_FLAG_SAME_FORCE is
> set but QUEUE_FLAG_SAME_COMP not.
QUEUE_FLAG_SAME_COMP is the default flag for blk mq queue. As this
stage, it should be set by default.
>
> Bart.
Powered by blists - more mailing lists