Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp1025673pxk; Thu, 1 Oct 2020 21:58:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz2hquCFo7pVhpQQWV9Yh/gFewSljntbHKoIn3MCXReJ/pHm+/NYi92HNarRWuphgjUyhq1 X-Received: by 2002:a05:6402:b53:: with SMTP id bx19mr403590edb.161.1601614688600; Thu, 01 Oct 2020 21:58:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601614688; cv=none; d=google.com; s=arc-20160816; b=fQ0jwyMM6GlFljd6W1daS9NaR9Q3ZnwnXcOgFXCXKdGUmb1f4J9ioGvFdT+uz2quQy JV5rYT/99NuYF5lnvszUQtqvSkAS2+9zhHhafli0hsL+03JoG4NnV/ENLNez1DZ9BeKC cwwFwt20fTXtC0C8B98wMzdYq/vlnFIdWLSKJpPeirPyUdSwoUcy2ciauzLh2U5ObVXx +8duPmcoOxG32nL/UIfMC9V4bDcb78JnivEyWLfcMO9Dmy15aTDhSV1iziUGxJAG6+Ea hiDsk/jWh3wS4J3ZNSkR6Ng1EquuPnhD6tnpARfqBdCndQ2eU46GFSPYHG2/ssESMqPa azyg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=TA9s1LMDJfYmTHBvFSGxSwQQtto1BFmaQKfxxqUpcDY=; b=pT74KY2fbXOz4xZubKq8iMvQb+/y9S1jOJEct4JqVvliM1tt0njzxdkBGIb2XX894R Q38jCDSyKYCMToW1WuC9QjRVGuxnetJuhh1mGEc5mNMOp1rmIqVbYa66rMtHWWAuiXHf RS6IsUJgmPqJ8HhcO1QCvmSiBQ6nxNQFbeTXIHV7FhLEbAt2wVx/YpIkS3oC8XlJL62d j2ycWxBNLTmL+Ar4Vg4/GV1MPCjLDPw+ypnH9im7jrw6oNgcbnLsU8Df6mzBrIVEupxv 42uizQDgZpxpXzgES8OxNw3z5I2M4NDm2mT+xOZr8aunynDRyL+CkwwmG9KKb/nb1EKW em1w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=chG3RdGc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p7si225758edy.43.2020.10.01.21.57.43; Thu, 01 Oct 2020 21:58:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=chG3RdGc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725971AbgJBEzf (ORCPT + 99 others); Fri, 2 Oct 2020 00:55:35 -0400 Received: from mail.kernel.org ([198.145.29.99]:42510 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725951AbgJBEzf (ORCPT ); Fri, 2 Oct 2020 00:55:35 -0400 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 1BE2020796; Fri, 2 Oct 2020 04:55:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1601614535; bh=FamPZ+HHgf9+DKHPvSlwIE+9cxI1vXUad3ORQVNzTHQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=chG3RdGcB+M1mHcCQhiqUJW87pI+x2ys1C22PDZFbOowiE1bVdONYyGqRjrBysaoN kSE1P0GLNBo6PlwOgWC1wbtM0bRFQc5GvGoW1DWZZKtK8SLoUlJJ5I0jG8VffrPq+/ NyxL7aO2PwnybSkiCRWtHGB41uOcV5npEzFDtNuk= Date: Fri, 2 Oct 2020 06:55:31 +0200 From: Greg Kroah-Hartman To: Scott Branden Cc: Florian Fainelli , Arnd Bergmann , Olof Johansson , Kees Cook , linux-kernel@vger.kernel.org, bcm-kernel-feedback-list@broadcom.com, Desmond Yan Subject: Re: [PATCH v5 11/15] misc: bcm-vk: add BCM_VK_QSTATS Message-ID: <20201002045531.GB34005@kroah.com> References: <20201001012810.4172-1-scott.branden@broadcom.com> <20201001012810.4172-12-scott.branden@broadcom.com> <5d76c89d-f53a-be22-dcd7-7854a3e1e034@broadcom.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <5d76c89d-f53a-be22-dcd7-7854a3e1e034@broadcom.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > >> Signed-off-by: Desmond Yan > >> Signed-off-by: Scott Branden > >> --- > > > > [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. thanks, greg k-h