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] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220926213251.GC15228@asutoshd-linux1.qualcomm.com>
Date:   Mon, 26 Sep 2022 14:32:51 -0700
From:   Asutosh Das <quic_asutoshd@...cinc.com>
To:     Manivannan Sadhasivam <mani@...nel.org>
CC:     <quic_nguyenb@...cinc.com>, <quic_xiaosenh@...cinc.com>,
        <quic_cang@...cinc.com>, <quic_nitirawa@...cinc.com>,
        <quic_rampraka@...cinc.com>, <quic_richardp@...cinc.com>,
        <stanley.chu@...iatek.com>, <adrian.hunter@...el.com>,
        <bvanassche@....org>, <avri.altman@....com>, <beanhuo@...ron.com>,
        <martin.petersen@...cle.com>, <linux-scsi@...r.kernel.org>,
        Alim Akhtar <alim.akhtar@...sung.com>,
        "James E.J. Bottomley" <jejb@...ux.ibm.com>,
        Matthias Brugger <matthias.bgg@...il.com>,
        Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>,
        open list <linux-kernel@...r.kernel.org>,
        "moderated list:ARM/Mediatek SoC support" 
        <linux-arm-kernel@...ts.infradead.org>,
        "moderated list:ARM/Mediatek SoC support" 
        <linux-mediatek@...ts.infradead.org>
Subject: Re: [PATCH v1 04/16] ufs: core: mcq: Introduce Multi Circular Queue

On Mon, Sep 26 2022 at 07:50 -0700, Manivannan Sadhasivam wrote:
>On Thu, Sep 22, 2022 at 06:05:11PM -0700, Asutosh Das wrote:

[...]

>> diff --git a/drivers/ufs/core/ufs-mcq.c b/drivers/ufs/core/ufs-mcq.c
>> new file mode 100644
>> index 0000000..934556f
>> --- /dev/null
>> +++ b/drivers/ufs/core/ufs-mcq.c
[...]
>> +static int ufshcd_mcq_config_nr_queues(struct ufs_hba *hba)
>> +{
>> +	int i, rem;
>> +	u32 hbaq_cap, cmp, tot_queues;
>> +	struct Scsi_Host *host = hba->host;
>> +
>> +	hbaq_cap = hba->mcq_capabilities & 0xff;
>
>Define 0xff
>
>hbaq_cap should be named after the define used for 0xff. It is not quite
>understandable now.
>
Ok. I think you want the name hbaq_cap to be changed to what 0xff signifies.
Is that understanding correct?

>> +
>> +	if (!rw_queues)
>> +		rw_queues = num_possible_cpus();
>> +
>> +	tot_queues = dev_cmd_queue + read_queues + poll_queues + rw_queues;
>> +	if (hbaq_cap < tot_queues) {
>> +		dev_err(hba->dev, "Total queues (%d) exceeds HC capacity (%d)\n",
>> +			tot_queues, hbaq_cap);
>> +		return -EOPNOTSUPP;
>> +	}
>> +
>> +	rem = hbaq_cap - dev_cmd_queue;
>> +	cmp = rem;
>> +	hba->nr_queues[HCTX_TYPE_DEFAULT] = min3(cmp, rw_queues,
>> +						 num_possible_cpus());
>> +	rem -= hba->nr_queues[HCTX_TYPE_DEFAULT];
>> +	cmp = rem;
>> +	hba->nr_queues[HCTX_TYPE_POLL] = min(cmp, poll_queues);
>
>Hmm, so the driver is not using the number of queues set by the user?
>If the number varies, I don't think it should be configurable.
>
I think the driver would use the number of queues set by the user.
Because there's a check(hbaq_cap < tot_queues) above that ensures
that the HBA has enough queues for the given configuration.

-asd

>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ