Re: [PATCH v6 1/2] iommu/arm-smmu-v3: Add a cmdq_max_n_shift module parameter

From
Will Deacon <will@kernel.org>
Date
2026-10-02 15:34:00
Also in
linux-iommu, linux-tegra, lkml
Reply to
Kiryl Shutsemau, 2026-09-25
On Fri, Sep 25, 2026 at 11:01:31AM +0100, Kiryl Shutsemau wrote:
On Wed, Sep 23, 2026 at 02:03:36PM -0300, Jason Gunthorpe wrote:
quoted
quoted
[ ... 34 lines skipped ... ]
@@ -40,6 +40,11 @@ module_param(disable_msipolling, bool, 0444);
 MODULE_PARM_DESC(disable_msipolling,
 	"Disable MSI-based polling for CMD_SYNC completion.");
 
+static unsigned int cmdq_max_n_shift;
+module_param(cmdq_max_n_shift, uint, 0444);
+MODULE_PARM_DESC(cmdq_max_n_shift,
+	"Cap on the command queue depth, as log2 of the number of entries. Zero means the hardware maximum; the queue never shrinks below one page.");
The patch looks ok

Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>

But I'd rather use lg2 as name, especially user visible, instead of
n_shift. "shift" is a word for bitwise stuff, this is a 2**N log2
encoded value.
This name has changed twice already. v5 took the value in entries.
Nicolin asked for a log2 value and named it after max_n_shift, which is
what the driver calls this quantity everywhere else.

I would rather not rename it a third time without input from the
maintainer.

Will, this is the user-visible name. Do you have a preference here?
Unless you want it changed I will leave v6 as it is.
I don't have really strong opinions on naming, but since Jason has given
a reasonably complete outline of the change and I have a small preference
for the lg2-style naming (rather than exposing the name of an internal
driver variable), it would be great if you can spin a v7 with that
included so that I can pick it up.

Thanks,

Will
Thread (10 messages) 10 messages, 5 authors, last reply 2026-10-02
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help