Re: [PATCH v5 11/15] misc: bcm-vk: add BCM_VK_QSTATS
From: Scott Branden
Date: Fri Oct 02 2020 - 12:54:13 EST
On 2020-10-01 3:13 p.m., Florian Fainelli wrote:
>
>
> On 10/1/2020 3:12 PM, Scott Branden wrote:
>>
>>
>> On 2020-09-30 7:33 p.m., Florian Fainelli wrote:
>>>
>>>
>>> On 9/30/2020 6:28 PM, Scott Branden wrote:
>>>> Add BCM_VK_QSTATS Kconfig option to allow for enabling debug VK
>>>> queue statistics.
>>>>
>>>> These statistics keep track of max, abs_max, and average for the
>>>> messages queues.
>>>>
>>>> Co-developed-by: Desmond Yan <desmond.yan@xxxxxxxxxxxx>
>>>> Signed-off-by: Desmond Yan <desmond.yan@xxxxxxxxxxxx>
>>>> Signed-off-by: Scott Branden <scott.branden@xxxxxxxxxxxx>
>>>> ---
>>>
>>> [snip]
>>>
>>>> +#if defined(CONFIG_BCM_VK_QSTATS)
>>>> + /* clear qstats */
>>>> + for (i = 0; i < VK_MSGQ_MAX_NR; i++) {
>>>> + memset(&vk->to_v_msg_chan.qstats[i].qcnts, 0,
>>>> + sizeof(vk->to_v_msg_chan.qstats[i].qcnts));
>>>> + memset(&vk->to_h_msg_chan.qstats[i].qcnts, 0,
>>>> + sizeof(vk->to_h_msg_chan.qstats[i].qcnts));
>>>> + }
>>>> +#endif
>>>> /* clear 4096 bits of bitmap */
>>>> bitmap_clear(vk->bmap, 0, VK_MSG_ID_BITMAP_SIZE);
>>>
>>> It was not clear from looking at this patch how are the statistics exposed and how does one actually get them?
>> The QSTATS, since it is only for debug purpose, it will dump out periodically based on processed_num.
>> Nothing fancy as we only compile it in in extreme case for recreating a scenario.
>
> But what kind of interface is that? Cannot you at least expose those through sysfs if nothing else?
A sysfs interface would not be as useful as we want the dmesg timestamp information.
QSTATS are purely for development/debug issues and enabled via a CONFIG option that won't be turned on by normal users.
Will change to dev_dbg.
Attachment:
smime.p7s
Description: S/MIME Cryptographic Signature