[PATCH v2] scsi: ufs: ufs-mediatek: configure individual LU queue flags

Bart Van Assche bvanassche at acm.org
Wed Oct 9 10:32:27 PDT 2024


On 10/8/24 10:38 PM, ed.tsai at mediatek.com wrote:
> In addition, because the SCSI probe_type = PROBE_PREFFER_ASYNCHRONOUS,
> sd_probe() is completed by another thread, causing the sd index to be
> obtained asynchronously. Directly setting the queue through sysfs is
> cumbersome. We do not need to change the queue settings at runtime, so
> a simpler and more intuitive approach is to set its flag once the SCSI
> device is confirmed to be ready.

Please set this flag from user space. The example below shows that it is
easy to set this flag from user space without knowing which sd* name
has been assigned to the block device:

$ adb root
$ adb shell 'cat 
/sys/class/scsi_device/0:0:0:2/device/block/*/queue/rq_affinity'
1
$ adb shell 'echo 2 > $(echo 
/sys/class/scsi_device/0:0:0:2/device/block/*/queue/rq_affinity)'
$ adb shell 'cat 
/sys/class/scsi_device/0:0:0:2/device/block/*/queue/rq_affinity'
2

Thanks,

Bart.



More information about the Linux-mediatek mailing list