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
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <38f0094ed6d75c47a1e7205970040926e9f2e33a.camel@mediatek.com>
Date:   Thu, 30 Mar 2023 02:52:44 +0000
From:   Powen Kao (高伯文) <Powen.Kao@...iatek.com>
To:     "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "linux-mediatek@...ts.infradead.org" 
        <linux-mediatek@...ts.infradead.org>,
        "jejb@...ux.ibm.com" <jejb@...ux.ibm.com>,
        "avri.altman@....com" <avri.altman@....com>,
        "bvanassche@....org" <bvanassche@....org>,
        "martin.petersen@...cle.com" <martin.petersen@...cle.com>,
        "linux-scsi@...r.kernel.org" <linux-scsi@...r.kernel.org>,
        "alim.akhtar@...sung.com" <alim.akhtar@...sung.com>,
        "linux-arm-kernel@...ts.infradead.org" 
        <linux-arm-kernel@...ts.infradead.org>,
        "matthias.bgg@...il.com" <matthias.bgg@...il.com>,
        "angelogioacchino.delregno@...labora.com" 
        <angelogioacchino.delregno@...labora.com>
CC:     Peter Wang (王信友) 
        <peter.wang@...iatek.com>,
        Eddie Huang (黃智傑) 
        <eddie.huang@...iatek.com>,
        Jiajie Hao (郝加节) 
        <jiajie.hao@...iatek.com>,
        CC Chou (周志杰) <cc.chou@...iatek.com>,
        Alice Chao (趙珮均) 
        <Alice.Chao@...iatek.com>,
        wsd_upstream <wsd_upstream@...iatek.com>,
        Chun-Hung Wu (巫駿宏) 
        <Chun-hung.Wu@...iatek.com>,
        Chaotian Jing (井朝天) 
        <Chaotian.Jing@...iatek.com>,
        Naomi Chu (朱詠田) <Naomi.Chu@...iatek.com>,
        Stanley Chu (朱原陞) 
        <stanley.chu@...iatek.com>,
        Mason Zhang (章辉) <Mason.Zhang@...iatek.com>
Subject: Re: [PATCH] scsi: ufs: core: Make UFS_MCQ_NUM_DEV_CMD_QUEUES a module
 parameter

On Tue, 2023-03-28 at 20:17 -0700, Bart Van Assche wrote:
> External email : Please do not click links or open attachments until
> you have verified the sender or the content.
> 
> 
> On 3/28/23 03:29, Po-Wen Kao wrote:
> > A dedicated queue for dev commands is not mandatory, hence let
> > UFS_MCQ_NUM_DEV_CMD_QUEUES become module parameter `dev_cmd_queues`
> > to allow sharing first hw queue for dev commands.
> 
> Which queue is selected for device management commands? 

Queue 0 is selected by default.

@@ -423,8 +441,11 @@ int ufshcd_mcq_init(struct ufs_hba *hba)
 
        /* The very first HW queue serves device commands */
        hba->dev_cmd_queue = &hba->uhq[0];

> 
> What is the impact of this change? If a device command is queued on a
> queue with multiple pending commands, does that mean that it can take
> long for the device command to reach the UFS device?
> 
> The answer to the above questions should be in the patch description.
> Please expand the patch description.

I will make commit message clear in next update.

> > +unsigned int dev_cmd_queues = 1;
> > +module_param_cb(dev_cmd_queues, &dev_cmd_queue_count_ops,
> > &dev_cmd_queues, 0644);
> > +MODULE_PARM_DESC(dev_cmd_queues,
> > +              "Number of queues used for dev command. Default
> > value is 1");
> 
> I prefer a solution that does not require any new kernel module
> parameters. That means either a dedicated device command queue for
> all
> host controllers or no dedicated device command queue for any host
> controller.

The motivation of this patch is to adapt UFS driver to different host
hardware. IMHO, some host may implement a dedicated (extra) queue for
dev commands but not all does. In general, one hw queue per CPU (IO
queue) topology is desired, hence sharing a hw queue is inevitable on those host without a dedicated dev cmd queue. The host with dedicated queue will keep the benifit of having fast channel for dev commands.

Thanks

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ