[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <de8a5748-1dc6-5a5b-6ab9-a40dc273d86e@broadcom.com>
Date: Fri, 2 Oct 2020 09:52:11 -0700
From: Scott Branden <scott.branden@...adcom.com>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: Florian Fainelli <f.fainelli@...il.com>,
Arnd Bergmann <arnd@...db.de>, Olof Johansson <olof@...om.net>,
Kees Cook <keescook@...omium.org>,
linux-kernel@...r.kernel.org,
bcm-kernel-feedback-list@...adcom.com,
Desmond Yan <desmond.yan@...adcom.com>
Subject: Re: [PATCH v5 11/15] misc: bcm-vk: add BCM_VK_QSTATS
On 2020-10-01 9:55 p.m., Greg Kroah-Hartman wrote:
> On Thu, Oct 01, 2020 at 03:12:11PM -0700, 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@...adcom.com>
>>>> Signed-off-by: Desmond Yan <desmond.yan@...adcom.com>
>>>> Signed-off-by: Scott Branden <scott.branden@...adcom.com>
>>>> ---
>>> [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.
>>
>> The following is the part:
>>
>> + if (++qcnts->cnt >= BCM_VK_QSTATS_ACC_CNT) {
>> + /* log average and clear counters */
>> + dev_info(&vk->pdev->dev,
>> + "%s[%d]: Max: [%3d/%3d] Acc %d num %d, Aver %d\n",
>> + tag, qstats->q_num,
>> + qcnts->max_occ, qcnts->max_abs,
>> + qcnts->acc_sum,
>> + qcnts->cnt,
>> + qcnts->acc_sum / qcnts->cnt);
> Ah, that's not ok, don't flood the kernel log for non-error things
> please. If you need to "report" stuff, when all is going well, use the
> other common interfaces for that.
>
> Again, drivers, when all is working, are quiet.
Will change to dev_dbg.
>
> thanks,
>
> greg k-h
Download attachment "smime.p7s" of type "application/pkcs7-signature" (4169 bytes)
Powered by blists - more mailing lists