From: Mario Limonciello <mario.limonciello@amd.com>
To: Greg KH <gregkh@linuxfoundation.org>
Cc: Lizhi Hou <lizhi.hou@amd.com>,
ogabbay@kernel.org, quic_jhugo@quicinc.com,
dri-devel@lists.freedesktop.org,
maciej.falkowski@linux.intel.com, Max Zhen <max.zhen@amd.com>,
linux-kernel@vger.kernel.org, sonal.santan@amd.com
Subject: Re: [PATCH V1] accel/amdxdna: Add hardware scheduler time quantum support
Date: Sat, 18 Apr 2026 14:38:07 -0500 [thread overview]
Message-ID: <db49c0ba-4e25-4d62-8091-b9557c7b8152@amd.com> (raw)
In-Reply-To: <2026041818-tricky-breeching-73d1@gregkh>
On 4/18/26 02:35, Greg KH wrote:
> On Tue, Apr 14, 2026 at 12:32:20PM -0500, Mario Limonciello wrote:
>>
>>
>> On 4/14/26 12:28, Lizhi Hou wrote:
>>>
>>> On 4/14/26 10:17, Mario Limonciello wrote:
>>>>
>>>>
>>>> On 4/14/26 12:16, Lizhi Hou wrote:
>>>>>
>>>>> On 4/14/26 09:58, Mario Limonciello wrote:
>>>>>>
>>>>>>
>>>>>> On 4/14/26 11:56, Lizhi Hou wrote:
>>>>>>> From: Max Zhen <max.zhen@amd.com>
>>>>>>>
>>>>>>> Add support for configuring the hardware scheduler time quantum to
>>>>>>> improve fairness across concurrent contexts.
>>>>>>>
>>>>>>> The scheduler enforces a fixed time slice per context, preventing
>>>>>>> long-running workloads from monopolizing the device and allowing
>>>>>>> other contexts to make forward progress.
>>>>>>>
>>>>>>> The default time quantum is 30ms and can be configured via the
>>>>>>> time_quantum_ms module parameter.
>>>>>>
>>>>>> Can you talk more about how you want to use it? Adding new
>>>>>> module parameters is generally frowned upon in lieu of doing
>>>>>> something with debugfs at runtime.
>>>>>
>>>>> This is a static setting which is not supposed to change at
>>>>> runtime. So module parameter is used.
>>>>
>>>> But so what happens if user loads driver with default setting and
>>>> then unloads driver and loads with a different setting as module
>>>> option?
>>>>
>>>> Does this flow fall apart because the driver initially programmed 30ms?
>>>
>>> Reloading with new setting will overwrite the default setting. After the
>>> module is loaded, it is not supposed to change before unloading the
>>> module.
>>>
>>
>> + Greg
>>
>> Greg,
>>
>> How do you feel about a module parameter for this purpose? Any other
>> suggestions if you don't like it?
>
> module parameters should almost never never never be added to the
> kernel, ESPECIALLY if it is for a device-specific thing (like in a
> driver like this.) Please don't do that.
>
>> I was thinking a debugfs file still makes sense, but either the debugfs file
>> can do unbind/rebind internally or user using debugfs file can do the
>> unbind/bind sequence in sysfs after touching the debugfs file.
>
> debugfs is for debugging, don't require it for functionality that a
> user/admin actually wants to do for a device as many distros and systems
> disable it entirely due to all of the security holes it exposes to
> admins.
It was for tuning purposes. Max and team decided to make it a compile
time macro. Any tuning can be done by developers recompiling.
prev parent reply other threads:[~2026-04-18 19:38 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-14 16:56 [PATCH V1] accel/amdxdna: Add hardware scheduler time quantum support Lizhi Hou
2026-04-14 16:58 ` Mario Limonciello
2026-04-14 17:16 ` Lizhi Hou
2026-04-14 17:17 ` Mario Limonciello
2026-04-14 17:28 ` Lizhi Hou
2026-04-14 17:32 ` Mario Limonciello
2026-04-14 17:52 ` Zhen, Max
2026-04-15 16:49 ` Lizhi Hou
2026-04-18 7:35 ` Greg KH
2026-04-18 19:38 ` Mario Limonciello [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=db49c0ba-4e25-4d62-8091-b9557c7b8152@amd.com \
--to=mario.limonciello@amd.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lizhi.hou@amd.com \
--cc=maciej.falkowski@linux.intel.com \
--cc=max.zhen@amd.com \
--cc=ogabbay@kernel.org \
--cc=quic_jhugo@quicinc.com \
--cc=sonal.santan@amd.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox